X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=display-gtk.h;h=8ca5a450e35002bcc2fa708c11402a7c7c165a3b;hb=269b5c02864d26722669bc47d779f72dbccf2fc7;hp=56fd5c4d99f515c1597f9cbda16a121840315e98;hpb=25e18211ec99ff15c26315eff87fc31816ce8f33;p=ext%2Fsubsurface.git diff --git a/display-gtk.h b/display-gtk.h index 56fd5c4..8ca5a45 100644 --- a/display-gtk.h +++ b/display-gtk.h @@ -19,6 +19,19 @@ typedef struct { gboolean otu; } visible_cols_t; +typedef enum { + PREF_BOOL, + PREF_STRING +} pref_type_t; + +#define BOOL_TO_PTR(_cond) ((_cond) ? (void *)1 : NULL) +#define PTR_TO_BOOL(_ptr) ((_ptr) != NULL) + +extern void subsurface_open_conf(void); +extern void subsurface_set_conf(char *name, pref_type_t type, const void *value); +extern const void *subsurface_get_conf(char *name, pref_type_t type); +extern void subsurface_close_conf(void); + extern visible_cols_t visible_cols; extern const char *divelist_font; @@ -44,7 +57,17 @@ typedef void (*data_func_t)(GtkTreeViewColumn *col, GtkTreeIter *iter, gpointer data); +typedef gint (*sort_func_t)(GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer user_data); + +#define ALIGN_LEFT 1 +#define ALIGN_RIGHT 2 +#define INVISIBLE 4 +#define UNSORTABLE 8 + extern GtkTreeViewColumn *tree_view_column(GtkWidget *tree_view, int index, const char *title, - data_func_t data_func, PangoAlignment align, gboolean visible); + data_func_t data_func, unsigned int flags); #endif