X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=display-gtk.h;h=23fea912a9098af2fea81995601382cc023f4b75;hb=565736a471e9ba66cbc68ce76c90d5e0c2fa57cf;hp=56fd5c4d99f515c1597f9cbda16a121840315e98;hpb=2d26dbc9f7d6affc50de2e1013de4589034e55e0;p=ext%2Fsubsurface.git diff --git a/display-gtk.h b/display-gtk.h index 56fd5c4..23fea91 100644 --- a/display-gtk.h +++ b/display-gtk.h @@ -19,6 +19,22 @@ 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 const char *subsurface_USB_name(void); +extern const char *subsurface_icon_name(void); + extern visible_cols_t visible_cols; extern const char *divelist_font; @@ -44,7 +60,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