summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/libsmartcols.h.in
diff options
context:
space:
mode:
authorIgor Gnatenko2016-01-21 10:02:31 +0100
committerIgor Gnatenko2016-01-21 16:41:12 +0100
commitb3256efff24c57f92a4f0357396fc47fa044e1f7 (patch)
treefaf0c2a75614624552d06f41a7536a8d053bb491 /libsmartcols/src/libsmartcols.h.in
parentchrt: use sched_getattr() (diff)
downloadkernel-qcow2-util-linux-b3256efff24c57f92a4f0357396fc47fa044e1f7.tar.gz
kernel-qcow2-util-linux-b3256efff24c57f92a4f0357396fc47fa044e1f7.tar.xz
kernel-qcow2-util-linux-b3256efff24c57f92a4f0357396fc47fa044e1f7.zip
libsmartcols: implement title of table
Reference: https://github.com/karelzak/util-linux/issues/258 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'libsmartcols/src/libsmartcols.h.in')
-rw-r--r--libsmartcols/src/libsmartcols.h.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/libsmartcols/src/libsmartcols.h.in b/libsmartcols/src/libsmartcols.h.in
index 0331f3713..236475a39 100644
--- a/libsmartcols/src/libsmartcols.h.in
+++ b/libsmartcols/src/libsmartcols.h.in
@@ -86,6 +86,15 @@ enum {
SCOLS_FL_HIDDEN = (1 << 5), /* maintain data, but don't print */
};
+/*
+ * Position of table's title
+ */
+enum {
+ SCOLS_TITLE_LEFT = 0,
+ SCOLS_TITLE_CENTER,
+ SCOLS_TITLE_RIGHT
+};
+
extern struct libscols_iter *scols_new_iter(int direction);
extern void scols_free_iter(struct libscols_iter *itr);
extern void scols_reset_iter(struct libscols_iter *itr, int direction);
@@ -177,6 +186,7 @@ extern struct libscols_line *scols_copy_line(struct libscols_line *ln);
/* table */
extern int scols_table_colors_wanted(struct libscols_table *tb);
extern int scols_table_set_name(struct libscols_table *tb, const char *name);
+extern int scols_table_set_title(struct libscols_table *tb, const char *title, int position, const char *color);
extern int scols_table_is_raw(struct libscols_table *tb);
extern int scols_table_is_ascii(struct libscols_table *tb);
extern int scols_table_is_json(struct libscols_table *tb);