29 struct cds_list_head entry
;
42 struct cds_list_head cols
;
53 void * (* data_iter
)(void *data
);
54 void (* data_bind
)(struct ui_table
*tbl
, const void *data
);
64 typedef void (* ui_tab_event_cb
) (struct ui_tab
*tab
, enum ui_tab_event_t evt
,
68 struct ui_col
*active
;
72 ui_tab_event_cb on_tab_event
;
75 extern void ui_table_init(struct ui_table
*tbl
);
76 extern void ui_table_uninit(struct ui_table
*tbl
);
77 extern void ui_table_clear(struct ui_table
*tbl
);
78 extern void ui_table_pos_set(struct ui_table
*tbl
, int y
, int x
);
79 extern void ui_table_height_set(struct ui_table
*tbl
, int height
);
81 extern void ui_table_col_add(struct ui_table
*tbl
, uint32_t id
, const char *name
,
83 extern void ui_table_col_color_set(struct ui_table
*tbl
, int col_id
, int color
);
84 extern void ui_table_col_align_set(struct ui_table
*tbl
, int col_id
, enum ui_align align
);
85 extern void ui_table_col_delim_set(struct ui_table
*tbl
, const char *delim
);
87 extern void ui_table_row_add(struct ui_table
*tbl
);
88 extern void ui_table_row_show(struct ui_table
*tbl
);
89 extern void ui_table_row_col_set(struct ui_table
*tbl
, uint32_t col_id
,
92 extern void ui_table_header_color_set(struct ui_table
*tbl
, int color
);
93 extern void ui_table_header_print(struct ui_table
*tbl
);
95 extern void ui_table_event_send(struct ui_table
*tbl
, enum ui_event_id id
);
96 extern void ui_table_data_iter_set(struct ui_table
*tbl
, void * (* iter
)(void *data
));
97 extern void ui_table_data_bind_set(struct ui_table
*tbl
,
98 void (* bind
)(struct ui_table
*tbl
, const void *data
));
99 extern void ui_table_data_bind(struct ui_table
*tbl
);
100 extern int ui_table_data_count(struct ui_table
*tbl
);
101 extern int ui_table_scroll_height(struct ui_table
*tbl
);
103 extern struct ui_tab
*ui_tab_create(void);
104 extern void ui_tab_destroy(struct ui_tab
*tab
);
105 extern void ui_tab_pos_set(struct ui_tab
*tab
, int y
, int x
);
106 extern void ui_tab_event_cb_set(struct ui_tab
*tab
, ui_tab_event_cb cb
);
107 extern void ui_tab_active_color_set(struct ui_tab
*tab
, int color
);
108 extern void ui_tab_show(struct ui_tab
*tab
);
109 extern void ui_tab_entry_add(struct ui_tab
*tab
, uint32_t id
, const char *name
);
110 extern void ui_tab_event_send(struct ui_tab
*tab
, uint32_t id
);