aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/gtk/gtkactionobserver.c
diff options
context:
space:
mode:
Diffstat (limited to 'libqmenumodel/src/gtk/gtkactionobserver.c')
-rw-r--r--libqmenumodel/src/gtk/gtkactionobserver.c40
1 files changed, 35 insertions, 5 deletions
diff --git a/libqmenumodel/src/gtk/gtkactionobserver.c b/libqmenumodel/src/gtk/gtkactionobserver.c
index cf70b20..fda0ae7 100644
--- a/libqmenumodel/src/gtk/gtkactionobserver.c
+++ b/libqmenumodel/src/gtk/gtkactionobserver.c
@@ -23,7 +23,7 @@
G_DEFINE_INTERFACE (GtkActionObserver, gtk_action_observer, G_TYPE_OBJECT)
-/**
+/*< private >
* SECTION:gtkactionobserver
* @short_description: an interface implemented by objects that are
* interested in monitoring actions for changes
@@ -54,7 +54,7 @@ gtk_action_observer_default_init (GtkActionObserverInterface *class)
{
}
-/**
+/*< private >
* gtk_action_observer_action_added:
* @observer: a #GtkActionObserver
* @observable: the source of the event
@@ -85,7 +85,7 @@ gtk_action_observer_action_added (GtkActionObserver *observer,
->action_added (observer, observable, action_name, parameter_type, enabled, state);
}
-/**
+/*< private >
* gtk_action_observer_action_enabled_changed:
* @observer: a #GtkActionObserver
* @observable: the source of the event
@@ -110,7 +110,7 @@ gtk_action_observer_action_enabled_changed (GtkActionObserver *observer,
->action_enabled_changed (observer, observable, action_name, enabled);
}
-/**
+/*< private >
* gtk_action_observer_action_state_changed:
* @observer: a #GtkActionObserver
* @observable: the source of the event
@@ -135,7 +135,7 @@ gtk_action_observer_action_state_changed (GtkActionObserver *observer,
->action_state_changed (observer, observable, action_name, state);
}
-/**
+/*< private >
* gtk_action_observer_action_removed:
* @observer: a #GtkActionObserver
* @observable: the source of the event
@@ -157,3 +157,33 @@ gtk_action_observer_action_removed (GtkActionObserver *observer,
GTK_ACTION_OBSERVER_GET_IFACE (observer)
->action_removed (observer, observable, action_name);
}
+
+/*< private >
+ * gtk_action_observer_primary_accel_changed:
+ * @observer: a #GtkActionObserver
+ * @observable: the source of the event
+ * @action_name: the name of the action
+ * @action_and_target: detailed action of the changed accel, in “action and target” format
+ *
+ * This function is called when an action that the observer is
+ * registered to receive events for has one of its accelerators changed.
+ *
+ * Accelerator changes are reported for all targets associated with the
+ * action. The @action_and_target string should be used to check if the
+ * reported target is the one that the observer is interested in.
+ */
+void
+gtk_action_observer_primary_accel_changed (GtkActionObserver *observer,
+ GtkActionObservable *observable,
+ const gchar *action_name,
+ const gchar *action_and_target)
+{
+ GtkActionObserverInterface *iface;
+
+ g_return_if_fail (GTK_IS_ACTION_OBSERVER (observer));
+
+ iface = GTK_ACTION_OBSERVER_GET_IFACE (observer);
+
+ if (iface->primary_accel_changed)
+ iface->primary_accel_changed (observer, observable, action_name, action_and_target);
+}