summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-10-16 23:35:55 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-10-16 23:45:23 -0400
commit9bd87b37bc0ce55aa3b23f371f766097db303cd1 (patch)
tree20806599e6a4f05cc94de8d911a154c8846ddfcc /gtk
parent4141ce22901d79dd2137eca61eb616b9662dc2f4 (diff)
downloadgtk+-9bd87b37bc0ce55aa3b23f371f766097db303cd1.tar.gz
Add docs for new API
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkapplication.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 8eb05c99d2..ccd49ec5f1 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -2055,6 +2055,18 @@ gtk_application_foreach_accel_keys (GtkApplication *application,
accels_foreach_key (&application->priv->accels, window, callback, user_data);
}
+/**
+ * gtk_application_list_action_descriptions:
+ * @application: a #GtkApplication
+ *
+ * Lists the detailed action names which have associated accelerators.
+ * See gtk_application_set_accels_for_action().
+ *
+ * Returns: (transfer full): a %NULL-terminated array of strings,
+ * free with g_strfreev() when done
+ *
+ * Since: 3.12
+ */
gchar **
gtk_application_list_action_descriptions (GtkApplication *application)
{
@@ -2106,6 +2118,20 @@ normalise_detailed_name (const gchar *detailed_action_name)
return action_and_target;
}
+/**
+ * gtk_application_set_accels_for_action:
+ * @application: a #GtkApplication
+ * @detailed_action_name: a detailed action name, specifying and action
+ * and target to associate accelerators with
+ * @accels: a list of accelerators in the format understood by
+ * gtk_accelerator_parse()
+ *
+ * Sets one or more keyboard accelerator that will trigger the
+ * given action. The first item in @accels will be the primary
+ * accelerator, which may be displayed in the UI.
+ *
+ * Since: 3.12
+ */
void
gtk_application_set_accels_for_action (GtkApplication *application,
const gchar *detailed_action_name,
@@ -2123,6 +2149,20 @@ gtk_application_set_accels_for_action (GtkApplication *application,
g_free (action_and_target);
}
+/**
+ * gtk_application_get_accels_for_action:
+ * @application: a #GtkApplication
+ * @detailed_action_name: a detailed action name, specifying and action
+ * and target to obtain accelerators for
+ *
+ * Gets the accelerators that are currently associated with
+ * the given action.
+ *
+ * Returns: (transfer full): accelerators for @detailed_action_name, as
+ * a %NULL-terminated array. Free with g_strfreev() when no longer needed
+ *
+ * Since: 3.12
+ */
gchar **
gtk_application_get_accels_for_action (GtkApplication *application,
const gchar *detailed_action_name)