]> git.street.me.uk Git - andy/viking.git/blobdiff - src/uibuilder.h
Enable Cache conversion in the Python tool viking-cache.py
[andy/viking.git] / src / uibuilder.h
index 6b29f4bd16079fb3cae3334abe4b2e8caa732392..7052e5b18d0724576f4c9ad1dd33c5c3335d8df4 100644 (file)
@@ -35,6 +35,7 @@ typedef union {
   const gchar *s;
   GdkColor c;
   GList *sl;
+  gpointer ptr; // For internal usage - don't save this value in a file!
 } VikLayerParamData;
 
 typedef enum {
@@ -50,6 +51,7 @@ typedef enum {
   VIK_LAYER_WIDGET_COLOR,
   VIK_LAYER_WIDGET_COMBOBOX,
   VIK_LAYER_WIDGET_FILELIST,
+  VIK_LAYER_WIDGET_BUTTON,
 } VikLayerWidgetType;
 
 /* id is index */
@@ -71,6 +73,7 @@ VIK_LAYER_PARAM_COLOR,
  */
 
 VIK_LAYER_PARAM_STRING_LIST,
+VIK_LAYER_PARAM_PTR, // Not really a 'parameter' but useful to route to extended configuration (e.g. toolbar order)
 } VikLayerParamType;
 
 typedef enum {
@@ -141,6 +144,17 @@ typedef struct {
 VikLayerParamData vik_lpd_true_default ( void );
 VikLayerParamData vik_lpd_false_default ( void );
 
+typedef enum {
+  UI_CHG_LAYER = 0,
+  UI_CHG_PARAM,
+  UI_CHG_PARAM_ID,
+  UI_CHG_WIDGETS,
+  UI_CHG_LABELS,
+  UI_CHG_LAST
+} ui_change_index;
+
+typedef gpointer ui_change_values[UI_CHG_LAST];
+
 GtkWidget *a_uibuilder_new_widget ( VikLayerParam *param, VikLayerParamData data );
 VikLayerParamData a_uibuilder_widget_get_value ( GtkWidget *widget, VikLayerParam *param );
 gint a_uibuilder_properties_factory ( const gchar *dialog_name,
@@ -149,11 +163,12 @@ gint a_uibuilder_properties_factory ( const gchar *dialog_name,
                                       guint16 params_count,
                                       gchar **groups,
                                       guint8 groups_count,
-                                      gboolean (*setparam) (gpointer,guint16,VikLayerParamData,gpointer,gboolean),
+                                      gboolean (*setparam) (gpointer,guint16,VikLayerParamData,gpointer,gboolean), // AKA VikLayerFuncSetParam in viklayer.h
                                       gpointer pass_along1,
                                       gpointer pass_along2,
-                                      VikLayerParamData (*getparam) (gpointer,guint16,gboolean),
-                                      gpointer pass_along_getparam );
+                                      VikLayerParamData (*getparam) (gpointer,guint16,gboolean),  // AKA VikLayerFuncGetParam in viklayer.h
+                                      gpointer pass_along_getparam,
+                                      void (*changeparam) (GtkWidget*, ui_change_values) ); // AKA VikLayerFuncChangeParam in viklayer.h
                                       /* pass_along1 and pass_along2 are for set_param first and last params */
 
 VikLayerParamData *a_uibuilder_run_dialog ( const gchar *dialog_name, GtkWindow *parent, VikLayerParam *params,