blob: 32c26ce41a9ab7f1da9328cc11f9d2d962f8cd56 (
plain) (
tree)
|
|
/*
* Prints table or tree.
*
* Copyright (C) 2014 Ondrej Oprala <ooprala@redhat.com>
* Copyright (C) 2014 Karel Zak <kzak@redhat.com>
*
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
*/
#ifndef _LIBSMARTCOLS_H
#define _LIBSMARTCOLS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
#include <sys/types.h>
#define LIBSMARTCOLS_VERSION "@LIBSMARTCOLS_VERSION@"
struct libscols_iter;
struct libscols_symbols;
struct libscols_cell;
/* iter.c */
enum {
SCOLS_ITER_FORWARD = 0,
SCOLS_ITER_BACKWARD
};
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);
extern int scols_iter_get_direction(struct libscols_iter *itr);
/* symbols.c */
extern struct libscols_symbols *scols_new_symbols(void);
struct libscols_symbols *scols_copy_symbols(const struct libscols_symbols *sb);
extern void scols_free_symbols(struct libscols_symbols *sb);
extern int scols_symbols_set_branch(struct libscols_symbols *sb, const char *str);
extern int scols_symbols_set_vertical(struct libscols_symbols *sb, const char *str);
extern int scols_symbols_set_right(struct libscols_symbols *sb, const char *str);
/* cell.c */
extern int scols_reset_cell(struct libscols_cell *ce);
extern int scols_cell_set_data(struct libscols_cell *ce, const char *str);
extern const char *scols_cell_get_data(const struct libscols_cell *ce);
extern int scols_cell_set_color(struct libscols_cell *ce, const char *color);
extern const char *scols_cell_get_color(const struct libscols_cell *ce);
/* column.c */
extern struct libscols_column *scols_new_column(void);
extern void scols_ref_column(struct libscols_column *cl);
extern void scols_unref_column(struct libscols_column *cl);
extern struct libscols_column *scols_copy_column(const struct libscols_column *cl);
extern int scols_column_set_whint(struct libscols_column *cl, double whint);
extern double scols_column_get_whint(struct libscols_column *cl);
extern int scols_column_set_flags(struct libscols_column *cl, int flags);
extern int scols_column_get_flags(struct libscols_column *cl);
extern const struct libscols_cell *scols_column_get_header(struct libscols_column *cl);
extern int scols_column_set_color(struct libscols_column *cl, const char *color);
extern const char *scols_column_get_color(struct libscols_column *cl);
#ifdef __cplusplus
}
#endif
#endif /* _LIBSMARTCOLS_H */
|