enum gp_widget_table_row_op { GP_TABLE_ROW_RESET, GP_TABLE_ROW_ADVANCE, GP_TABLE_ROW_TELL, }; typedef struct gp_widget_table_col_dsc { /** Column human readable ID */ const char *id; /** An index to map the human readable ID to */ unsigned long idx; /** If sort is not set this describes if column is sortable */ int sortable:1; } gp_widget_table_col_dsc; typedef struct gp_widget_table_col_ops { int (*seek_row)(gp_widget *self, int op, unsigned int pos); int (*get_cell)(gp_widget *self, gp_widget_table_cell *cell, unsigned int col_idx); void (*sort)(gp_widget *self, int desc, unsigned int col_idx); /** Optional on_event handler */ int (*on_event)(gp_widget_event *ev); void *on_event_priv; /** NULL id terminated column map array */ gp_widget_table_col_dsc col_map[]; } gp_widget_table_col_ops;