summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/table.c
diff options
context:
space:
mode:
authorIgor Gnatenko2016-01-24 23:47:42 +0100
committerIgor Gnatenko2016-01-25 00:12:14 +0100
commit703d0196ee37f04cdef1b74b6af4b97252c961b0 (patch)
tree56842fc8edbf971c717e0de9763a33cfc8f7d89e /libsmartcols/src/table.c
parentlibsmartcols: position of title in fact unsigned (diff)
downloadkernel-qcow2-util-linux-703d0196ee37f04cdef1b74b6af4b97252c961b0.tar.gz
kernel-qcow2-util-linux-703d0196ee37f04cdef1b74b6af4b97252c961b0.tar.xz
kernel-qcow2-util-linux-703d0196ee37f04cdef1b74b6af4b97252c961b0.zip
libsmartcols: add few methods to get information about title
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'libsmartcols/src/table.c')
-rw-r--r--libsmartcols/src/table.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/libsmartcols/src/table.c b/libsmartcols/src/table.c
index 3a787fae3..933379f65 100644
--- a/libsmartcols/src/table.c
+++ b/libsmartcols/src/table.c
@@ -168,6 +168,45 @@ int scols_table_set_title(struct libscols_table *tb, const char *title, unsigned
}
/**
+ * scols_table_get_title:
+ * @tb: a pointer to a struct libscols_table instance
+ *
+ * Returns: Title of the table, or %NULL in case of blank title.
+ *
+ * Since: 2.28
+ */
+const char *scols_table_get_title(struct libscols_table *tb)
+{
+ return tb->title;
+}
+
+/**
+ * scols_table_get_title_position:
+ * @tb: a pointer to a struct libscols_table instance
+ *
+ * Returns: Title's position of the table.
+ *
+ * Since: 2.28
+ */
+unsigned int scols_table_get_title_position(struct libscols_table *tb)
+{
+ return tb->title_pos;
+}
+
+/**
+ * scols_table_get_title_color:
+ * @tb: a pointer to a struct libscols_table instance
+ *
+ * Returns: Title's color of the table, or %NULL in case of not set color.
+ *
+ * Since: 2.28
+ */
+const char *scols_table_get_title_color(struct libscols_table *tb)
+{
+ return tb->title_color;
+}
+
+/**
* scols_table_add_column:
* @tb: a pointer to a struct libscols_table instance
* @cl: a pointer to a struct libscols_column instance