From ff76366652e455d19f9766966a186ff5f396bea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Wed, 14 Oct 2009 04:09:48 +0200 Subject: [PATCH] Move documentation from templates to inline comments: GtkAccelGroup https://bugzilla.gnome.org/show_bug.cgi?id=597865 --- docs/reference/gtk/tmpl/gtkaccelgroup.sgml | 327 --------------------- gtk/gtkaccelgroup.c | 25 ++ gtk/gtkaccelgroup.h | 26 ++ 3 files changed, 51 insertions(+), 327 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtkaccelgroup.sgml diff --git a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml b/docs/reference/gtk/tmpl/gtkaccelgroup.sgml deleted file mode 100644 index c6170c5d25..0000000000 --- a/docs/reference/gtk/tmpl/gtkaccelgroup.sgml +++ /dev/null @@ -1,327 +0,0 @@ - -Accelerator Groups - - -Groups of global keyboard accelerators for an entire GtkWindow - - - -A #GtkAccelGroup represents a group of keyboard accelerators, -typically attached to a toplevel #GtkWindow (with -gtk_window_add_accel_group()). Usually you won't need to create a -#GtkAccelGroup directly; instead, when using #GtkItemFactory, GTK+ -automatically sets up the accelerators for your menus in the item -factory's #GtkAccelGroup. - - - -Note that accelerators are different from -mnemonics. Accelerators are shortcuts for -activating a menu item; they appear alongside the menu item they're a -shortcut for. For example "Ctrl+Q" might appear alongside the "Quit" -menu item. Mnemonics are shortcuts for GUI elements such as text -entries or buttons; they appear as underlined characters. See -gtk_label_new_with_mnemonic(). Menu items can have both accelerators -and mnemonics, of course. - - - - -gtk_window_add_accel_group(), gtk_accel_map_change_entry(), -gtk_item_factory_new(), gtk_label_new_with_mnemonic() - - - - - - - -An object representing and maintaining a group of accelerators. - - - - - - - - -@accelgroup: the object which received the signal. -@arg1: -@arg2: -@arg3: -@Returns: - - - - - - -@accelgroup: the object which received the signal. -@arg1: -@arg2: -@arg3: - - - - - - - - - - - - - - - - -@Returns: - - - - -Deprecated equivalent of g_object_ref(). - - -@Returns: the accel group that was passed in - - - - -Deprecated equivalent of g_object_unref(). - - - - - - - - - -@accel_group: -@accel_key: -@accel_mods: -@accel_flags: -@closure: - - - - - - - -@accel_group: -@accel_path: -@closure: - - - - - - - -@accel_group: -@acceleratable: -@keyval: -@modifier: -@Returns: - - - - - - - -@key: -@closure: -@data: -@Returns: -@Since: 2.2 - - - - - - - -@accel_group: -@closure: -@Returns: - - - - - - - -@accel_group: -@accel_key: -@accel_mods: -@Returns: - - - - - - - -@accel_group: -@accel_key: -@accel_mods: -@n_entries: -@Returns: - - - - - - - -@accel_group: -@accel_quark: -@acceleratable: -@accel_key: -@accel_mods: -@Returns: - - - - - - - -@accel_group: - - - - - - - -@accel_group: - - - - - - - -@accel_group: -@Returns: - - - - - - - -@closure: -@Returns: - - - - - - - -@accel_group: -@Returns: - - - - - - - -@object: -@accel_key: -@accel_mods: -@Returns: - - - - - - - -@object: -@Returns: - - - - - - - -@accel_group: -@find_func: -@data: -@Returns: - - - - - - - -@accel_key: -@accel_mods: -@accel_flags: - - - - - - -@keyval: -@modifiers: -@Returns: - - - - - - - -@accelerator: -@accelerator_key: -@accelerator_mods: - - - - - - - -@accelerator_key: -@accelerator_mods: -@Returns: - - - - - - - -@accelerator_key: -@accelerator_mods: -@Returns: - - - - - - - -@default_mod_mask: - - - - - - - -@Returns: - - diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index b26fd63a05..03ade12668 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -37,6 +37,31 @@ #include "gtkmarshalers.h" #include "gtkalias.h" +/** + * SECTION:gtkaccelgroup + * @Short_description: Groups of global keyboard accelerators for an entire GtkWindow + * @Title: Accelerator Groups + * @See_also:gtk_window_add_accel_group(), gtk_accel_map_change_entry(), + * gtk_item_factory_new(), gtk_label_new_with_mnemonic() + * + * A #GtkAccelGroup represents a group of keyboard accelerators, + * typically attached to a toplevel #GtkWindow (with + * gtk_window_add_accel_group()). Usually you won't need to create a + * #GtkAccelGroup directly; instead, when using #GtkItemFactory, GTK+ + * automatically sets up the accelerators for your menus in the item + * factory's #GtkAccelGroup. + * + * + * Note that accelerators are different from + * mnemonics. Accelerators are shortcuts for + * activating a menu item; they appear alongside the menu item they're a + * shortcut for. For example "Ctrl+Q" might appear alongside the "Quit" + * menu item. Mnemonics are shortcuts for GUI elements such as text + * entries or buttons; they appear as underlined characters. See + * gtk_label_new_with_mnemonic(). Menu items can have both accelerators + * and mnemonics, of course. + */ + /* --- prototypes --- */ static void gtk_accel_group_finalize (GObject *object); diff --git a/gtk/gtkaccelgroup.h b/gtk/gtkaccelgroup.h index 80780dba5a..b1e874491e 100644 --- a/gtk/gtkaccelgroup.h +++ b/gtk/gtkaccelgroup.h @@ -66,10 +66,23 @@ typedef gboolean (*GtkAccelGroupActivate) (GtkAccelGroup *accel_group, guint keyval, GdkModifierType modifier); +/** + * GtkAccelGroupFindFunc: + * @key: + * @closure: + * @data: + * + * Since: 2.2 + */ typedef gboolean (*GtkAccelGroupFindFunc) (GtkAccelKey *key, GClosure *closure, gpointer data); +/** + * GtkAccelGroup: + * + * An object representing and maintaining a group of accelerators. + */ struct _GtkAccelGroup { GObject parent; @@ -180,7 +193,20 @@ struct _GtkAccelGroupEntry #ifndef GTK_DISABLE_DEPRECATED +/** + * gtk_accel_group_ref: + * + * Deprecated equivalent of g_object_ref(). + * + * Returns: the accel group that was passed in + */ #define gtk_accel_group_ref g_object_ref + +/** + * gtk_accel_group_unref: + * + * Deprecated equivalent of g_object_unref(). + */ #define gtk_accel_group_unref g_object_unref #endif /* GTK_DISABLE_DEPRECATED */