summaryrefslogtreecommitdiff
path: root/plugins/gtkui/gtkui_api.h
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-20 20:53:22 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-10-20 20:53:22 +0200
commit1233aa87bcad5a87024ebe9031fc732172cd99ff (patch)
tree65c04eab84f09bc947f1a549c80dd6a0007cd458 /plugins/gtkui/gtkui_api.h
parente3f56e349af1f8481f4aeb7dc428f9e68804b35e (diff)
gtkui: proper single-instance widget support
Diffstat (limited to 'plugins/gtkui/gtkui_api.h')
-rw-r--r--plugins/gtkui/gtkui_api.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/gtkui/gtkui_api.h b/plugins/gtkui/gtkui_api.h
index 55580d37..789a674a 100644
--- a/plugins/gtkui/gtkui_api.h
+++ b/plugins/gtkui/gtkui_api.h
@@ -121,6 +121,12 @@ typedef struct ddb_gtkui_widget_s {
struct ddb_gtkui_widget_s *next; // points to next widget in the same container
} ddb_gtkui_widget_t;
+
+// flags for passing to w_reg_widget
+
+// tell the widget manager, that this widget can only have single instance
+#define DDB_WF_SINGLE_INSTANCE 0x00000001
+
typedef struct {
DB_gui_t gui;
@@ -130,10 +136,10 @@ typedef struct {
// register new widget type;
// type strings are passed at the end of argument list terminated with NULL
// for example:
- // w_reg_widget("My Visualization", my_viz_create, "my_viz_ng", "my_viz", NULL);
+ // w_reg_widget("My Visualization", 0, my_viz_create, "my_viz_ng", "my_viz", NULL);
// this call will register new type "my_viz_ng", with support for another
// "my_viz" type string
- void (*w_reg_widget) (const char *title, ddb_gtkui_widget_t *(*create_func) (void), ...);
+ void (*w_reg_widget) (const char *title, uint32_t flags, ddb_gtkui_widget_t *(*create_func) (void), ...);
// unregister existing widget type
void (*w_unreg_widget) (const char *type);