summaryrefslogtreecommitdiff
path: root/gladeui/glade-widget-adaptor.h
diff options
context:
space:
mode:
authorDenis Washington <denisw@src.gnome.org>2011-11-15 17:56:03 +0100
committerDenis Washington <denisw@src.gnome.org>2011-11-15 17:56:03 +0100
commitaccb7534ce503a25070224c739d995486100d77b (patch)
tree275e75062f413179891a2c008c0082c68a2fbb82 /gladeui/glade-widget-adaptor.h
parente90717a501d3e99509c0e6ade83e3876d4a84f68 (diff)
downloadglade-command-set-sensitive.tar.gz
Add glade_command_set_sensitive() and port a bit of the GTK+ plugin code to itcommand-set-sensitive
The aim of this is to let all changes to the sensitivity of properties through the command system so that the code in the "gbinding" branch can cleanly react to the source or target of a property binding becoming insensitive (e.g. by undoably removing the binding).
Diffstat (limited to 'gladeui/glade-widget-adaptor.h')
-rw-r--r--gladeui/glade-widget-adaptor.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/gladeui/glade-widget-adaptor.h b/gladeui/glade-widget-adaptor.h
index ab33a531..a1a2a29f 100644
--- a/gladeui/glade-widget-adaptor.h
+++ b/gladeui/glade-widget-adaptor.h
@@ -553,6 +553,21 @@ typedef GladeEditable *(* GladeCreateEditableFunc) (GladeWidgetAdaptor *adapto
GladeEditorPageType type);
+/**
+ * GladeAdjustPropertyFlagsFunc:
+ * @adaptor: A #GladeWidgetAdaptor
+ * @widget: The #GladeWidget
+ * @use_command: whether to use the GladeCommand interface
+ *
+ * This is called after a widget is loaded or a widget's
+ * property value has changed. It allows the backend to keep the
+ * sensitive/enabled flags of all properties consistent with the
+ * property values.
+ */
+typedef void (* GladeAdjustPropertyFlagsFunc) (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ gboolean use_command);
+
/* Note that everything that must be processed at the creation of
* every instance is managed on the instance structure, and everywhere
* that we want to take advantage of inheritance is handled in the class
@@ -659,7 +674,8 @@ struct _GladeWidgetAdaptorClass
GladeCreateEPropFunc create_eprop; /* Creates a GladeEditorProperty */
GladeStringFromValueFunc string_from_value; /* Creates a string for a value */
GladeCreateEditableFunc create_editable; /* Creates a page for the editor */
-
+ GladeAdjustPropertyFlagsFunc adjust_property_flags; /* Appropiately sets all properties' sensitive/enabled flags */
+
void (* glade_reserved1) (void);
void (* glade_reserved2) (void);
void (* glade_reserved3) (void);
@@ -667,7 +683,6 @@ struct _GladeWidgetAdaptorClass
void (* glade_reserved5) (void);
void (* glade_reserved6) (void);
void (* glade_reserved7) (void);
- void (* glade_reserved8) (void);
};
#define glade_widget_adaptor_create_widget(adaptor, query, ...) \
@@ -845,6 +860,10 @@ GladeWidgetAdaptor *glade_widget_adaptor_get_parent_adaptor (GladeWidgetAdapto
gboolean glade_widget_adaptor_has_internal_children (GladeWidgetAdaptor *adaptor);
+void glade_widget_adaptor_adjust_property_flags (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ gboolean use_command);
+
G_END_DECLS
#endif /* _GLADE_WIDGET_ADAPTOR_H_ */