]> git.street.me.uk Git - andy/viking.git/blobdiff - src/viklayer.h
Fix debug message
[andy/viking.git] / src / viklayer.h
index 4bfd90af1bbd973a126e46c3ba40463bab8f11dc..0225fe5ee291d9ceedc812b42f866bc389f5e5ee 100644 (file)
@@ -26,6 +26,7 @@
 #include <gtk/gtk.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
 
+#include "uibuilder.h"
 #include "vikwindow.h"
 #include "viktreeview.h"
 #include "vikviewport.h"
@@ -94,6 +95,7 @@ typedef enum {
 typedef gpointer (*VikToolConstructorFunc) (VikWindow *, VikViewport *);
 typedef void (*VikToolDestructorFunc) (gpointer);
 typedef VikLayerToolFuncStatus (*VikToolMouseFunc) (VikLayer *, GdkEventButton *, gpointer);
+typedef VikLayerToolFuncStatus (*VikToolMouseMoveFunc) (VikLayer *, GdkEventMotion *, gpointer);
 typedef void (*VikToolActivationFunc) (VikLayer *, gpointer);
 typedef gboolean (*VikToolKeyFunc) (VikLayer *, GdkEventKey *, gpointer);
 
@@ -105,76 +107,17 @@ struct _VikToolInterface {
   VikToolActivationFunc activate;
   VikToolActivationFunc deactivate;
   VikToolMouseFunc click;
-  VikToolMouseFunc move;
+  VikToolMouseMoveFunc move;
   VikToolMouseFunc release;
   VikToolKeyFunc key_press; /* return FALSE if we don't use the key press -- should return AFLSE most of the time if we want any shortcuts / UI keybindings to work! use sparingly. */
-  const GdkPixdata *cursor;
+  GdkCursorType cursor_type;
+  const GdkPixdata *cursor_data;
+  const GdkCursor *cursor;
 };
 
 /* Parameters (for I/O and Properties) */
+/* --> moved to uibuilder.h */
 
-typedef union {
-  gdouble d;
-  guint32 u;
-  gint32 i;
-  gboolean b;
-  const gchar *s;
-  GdkColor c;
-  GList *sl;
-} VikLayerParamData;
-
-typedef struct {
-  const gchar *name;
-  guint8 type;
-  gint16 group;
-  const gchar *title;
-  guint8 widget_type;
-  gpointer widget_data;
-  gpointer extra_widget_data;
-} VikLayerParam;
-
-enum {
-VIK_LAYER_NOT_IN_PROPERTIES=-2,
-VIK_LAYER_GROUP_NONE=-1
-};
-
-enum {
-VIK_LAYER_WIDGET_CHECKBUTTON=0,
-VIK_LAYER_WIDGET_RADIOGROUP,
-VIK_LAYER_WIDGET_RADIOGROUP_STATIC,
-VIK_LAYER_WIDGET_SPINBUTTON,
-VIK_LAYER_WIDGET_ENTRY,
-VIK_LAYER_WIDGET_FILEENTRY,
-VIK_LAYER_WIDGET_HSCALE,
-VIK_LAYER_WIDGET_COLOR,
-VIK_LAYER_WIDGET_COMBOBOX,
-VIK_LAYER_WIDGET_FILELIST,
-};
-
-typedef struct {
-  gdouble min;
-  gdouble max;
-  gdouble step;
-  guint8 digits;
-} VikLayerParamScale;
-
-/* id is index */
-enum {
-VIK_LAYER_PARAM_DOUBLE=1,
-VIK_LAYER_PARAM_UINT,
-VIK_LAYER_PARAM_INT,
-VIK_LAYER_PARAM_STRING,
-VIK_LAYER_PARAM_BOOLEAN,
-VIK_LAYER_PARAM_COLOR,
-
-/* NOTE: string layer works auniquely: data.sl should NOT be free'd when
- * the internals call get_param -- i.e. it should be managed w/in the layer.
- * The value passed by the internals into set_param should also be managed
- * by the layer -- i.e. free'd by the layer.
- */
-
-VIK_LAYER_PARAM_STRING_LIST,
-};
 
 /* layer interface functions */
 
@@ -340,11 +283,4 @@ VikLayer *vik_layer_get_and_reset_trigger();
 void vik_layer_emit_update_secondary ( VikLayer *vl ); /* to be called by aggregate layer only. doesn't set the trigger */
 void vik_layer_emit_update_although_invisible ( VikLayer *vl );
 
-GdkCursor *vik_layer_get_tool_cursor ( gint layer_id, gint tool_id );
-void vik_layer_cursors_init();
-void vik_layer_cursors_uninit();
-
-
-
-
 #endif