summaryrefslogtreecommitdiff
path: root/gtk/gtkwidget.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-06-22 20:18:05 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-06-22 17:03:38 -0400
commitd1f4068b9471184bd431f04b87c3201fd721d898 (patch)
tree57403bdb16bc7e19e6f6fe2371bb4c4a0f42b575 /gtk/gtkwidget.h
parent7e73da5f738f86dc8afe9c78b6b6c249e7e9eb26 (diff)
downloadgtk+-d1f4068b9471184bd431f04b87c3201fd721d898.tar.gz
Replace stateful actions by property actions
The only cases of stateful actions we've seen so far have been boolean properties, and we don't really want to add much state handling API, so lets just go with property actions for now. Adapt the only user in GtkText.
Diffstat (limited to 'gtk/gtkwidget.h')
-rw-r--r--gtk/gtkwidget.h46
1 files changed, 3 insertions, 43 deletions
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index c1a0482278..a9b1434f27 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1038,38 +1038,6 @@ typedef void (* GtkWidgetActionActivateFunc) (GtkWidget *widget,
const char *action_name,
GVariant *parameter);
-/**
- * GtkWidgetActionGetStateFunc:
- * @widget: the widget to which the action belongs
- * @action_name: the action name
- *
- * The type of the callback functions used to query the state
- * of stateful actions installed with gtk_widget_class_install_action().
- *
- * See the #GAction documentation for more details about the
- * meaning of these properties.
- */
-typedef GVariant * (* GtkWidgetActionGetStateFunc) (GtkWidget *widget,
- const char *action_name);
-
-/**
- * GtkWidgetActionSetStateFunc:
- * @widget: the widget to which the action belongs
- * @action_name: the action name
- * @state: the new state
- *
- * The type of the callback functions used to change the
- * state of actions installed with gtk_widget_class_install_action().
- *
- * The @state must match the @state_type of the action.
- *
- * This callback is used when the action state is
- * changed via the #GActionGroup API.
- */
-typedef void (*GtkWidgetActionSetStateFunc) (GtkWidget *widget,
- const char *action_name,
- GVariant *state);
-
GDK_AVAILABLE_IN_ALL
void gtk_widget_class_install_action (GtkWidgetClass *widget_class,
const char *action_name,
@@ -1077,13 +1045,9 @@ void gtk_widget_class_install_action (GtkWidgetClass
GtkWidgetActionActivateFunc activate);
GDK_AVAILABLE_IN_ALL
-void gtk_widget_class_install_stateful_action (GtkWidgetClass *widget_class,
- const char *action_name,
- const char *parameter_type,
- GtkWidgetActionActivateFunc activate,
- const char *state_type,
- GtkWidgetActionSetStateFunc set_state,
- GtkWidgetActionGetStateFunc get_state);
+void gtk_widget_class_install_property_action (GtkWidgetClass *widget_class,
+ const char *action_name,
+ const char *property_name);
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_class_query_action (GtkWidgetClass *widget_class,
@@ -1097,10 +1061,6 @@ GDK_AVAILABLE_IN_ALL
void gtk_widget_action_enabled_changed (GtkWidget *widget,
const char *action_name,
gboolean enabled);
-GDK_AVAILABLE_IN_ALL
-void gtk_widget_action_state_changed (GtkWidget *widget,
- const char *action_name,
- GVariant *state);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWidget, g_object_unref)