summaryrefslogtreecommitdiff
path: root/gtk/gtkaccelgroup.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-01-07 00:13:33 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-01-07 00:13:33 +0000
commited29c8ddd8ad7a5d01c2e75d69496c1388364490 (patch)
tree510dc954cdc4e94cc88142465568e68283c55fab /gtk/gtkaccelgroup.c
parentef121a06fffa3095cb454259a4a153b719405264 (diff)
downloadgtk+-ed29c8ddd8ad7a5d01c2e75d69496c1388364490.tar.gz
Replace GTK_NO_CHECK_CASTS by G_DISABLE_CAST_CHECKS.
* docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by G_DISABLE_CAST_CHECKS. * gtk/gtkaccelgroup.c (gtk_accel_group_from_accel_closure, gtk_accel_group_query, gtk_accel_group_find, gtk_accel_groups_from_object): Document. * gtk/gtkaccellabel.c (gtk_accel_label_set_accel_closure): Document. * gtk/tmpl/gtktypeutils.sgml: Replace GTK_NO_CHECK_CASTS by G_DISABLE_CAST_CHECKS, fix some markup and add stuff. * gtk/tmpl/gtkaccelgroup.sgml, gtk/tmpl/gtkwidget.sgml: Additions. * gtk/gtk-sections.txt: Make gtk_accel_group_get_type private.
Diffstat (limited to 'gtk/gtkaccelgroup.c')
-rw-r--r--gtk/gtkaccelgroup.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index 0e9b4866a6..080b3d0ecb 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -241,6 +241,13 @@ _gtk_accel_group_detach (GtkAccelGroup *accel_group,
g_object_unref (accel_group);
}
+/**
+ * gtk_accel_groups_from_object:
+ * @object: a #GObject, usually a #GtkWindow
+ * @returns: a list of all accel groups which are attached to @object
+ *
+ * Gets a list of all accel groups which are attached to @object.
+ */
GSList*
gtk_accel_groups_from_object (GObject *object)
{
@@ -249,6 +256,18 @@ gtk_accel_groups_from_object (GObject *object)
return g_object_get_qdata (object, quark_acceleratable_groups);
}
+/**
+ * gtk_accel_group_find:
+ * @accel_group: a #GtkAccelGroup
+ * @find_func: a function to filter the entries of @accel_group with
+ * @data: data to pass to @find_func
+ * @returns: the key of the first entry passing @find_func. The key is
+ * owned by GTK+ and must not be freed.
+ *
+ * Finds the first entry in an accelerator group for which @find_func
+ * returns %TRUE and returns its #GtkAccelKey.
+ *
+ */
GtkAccelKey*
gtk_accel_group_find (GtkAccelGroup *accel_group,
gboolean (*find_func) (GtkAccelKey *key,
@@ -651,6 +670,17 @@ _gtk_accel_group_reconnect (GtkAccelGroup *accel_group,
g_object_unref (accel_group);
}
+/**
+ * gtk_accel_group_query:
+ * @accel_group: the accelerator group to query
+ * @accel_key: key value of the accelerator
+ * @accel_mods: modifier combination of the accelerator
+ * @n_entries: location to return the number of entries found, or %NULL
+ * @returns: an array of @n_entries #GtkAccelGroupEntry elements, or %NULL. The array is owned by GTK+ and must not be freed.
+ *
+ * Queries an accelerator group for all entries matching @accel_key and
+ * @accel_mods.
+ */
GtkAccelGroupEntry*
gtk_accel_group_query (GtkAccelGroup *accel_group,
guint accel_key,
@@ -670,6 +700,14 @@ gtk_accel_group_query (GtkAccelGroup *accel_group,
return entries;
}
+/**
+ * gtk_accel_group_from_accel_closure:
+ * @closure: a #GClosure
+ * @returns: the #GtkAccelGroup to which @closure is connected, or %NULL.
+ *
+ * Finds the #GtkAccelGroup to which @closure is connected;
+ * see gtk_accel_group_connect().
+ */
GtkAccelGroup*
gtk_accel_group_from_accel_closure (GClosure *closure)
{
@@ -711,7 +749,7 @@ _gtk_accel_group_activate (GtkAccelGroup *accel_group,
/**
* gtk_accel_groups_activate:
- * @object: the #Gobject, usually a #GtkWindow, on which
+ * @object: the #GObject, usually a #GtkWindow, on which
* to activate the accelerator.
* @accel_key: accelerator keyval from a key event
* @accel_mods: keyboard state mask from a key event