|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/gtk/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Accelerator Groups</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="prev" href="gtk-General.html" title="Main loop and Events">
<link rel="next" href="gtk-Accelerator-Maps.html" title="Accelerator Maps">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and
GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk-General.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="gtk-Accelerator-Maps.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2580399" class="shortcut">Top</a>
 | 
<a href="#id2581326" class="shortcut">Description</a>
 | 
<a href="#id2581169" class="shortcut">Object Hierarchy</a>
 | 
<a href="#id2581194" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gtk-Keyboard-Accelerators"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2580399"></a><span class="refentrytitle">Accelerator Groups</span>
</h2>
<p>Accelerator Groups — Groups of global keyboard accelerators for an entire GtkWindow</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<a name="GtkAccelGroup"></a><pre class="synopsis">
#include <gtk/gtk.h>
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup-struct">GtkAccelGroup</a>;
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>* <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-new">gtk_accel_group_new</a> (void);
#define <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-ref">gtk_accel_group_ref</a>
#define <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-unref">gtk_accel_group_unref</a>
void <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-connect">gtk_accel_group_connect</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods,
<a href="gtk-Standard-Enumerations.html#GtkAccelFlags">GtkAccelFlags</a> accel_flags,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure);
void <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-connect-by-path">gtk_accel_group_connect_by_path</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *accel_path,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroupActivate">*GtkAccelGroupActivate</a>) (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *acceleratable,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> keyval,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> modifier);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroupFindFunc">*GtkAccelGroupFindFunc</a>) (<a href="gtk-Keyboard-Accelerators.html#GtkAccelKey">GtkAccelKey</a> *key,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-disconnect">gtk_accel_group_disconnect</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-disconnect-key">gtk_accel_group_disconnect_key</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods);
GtkAccelGroupEntry* <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-query">gtk_accel_group_query</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *n_entries);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-activate">gtk_accel_group_activate</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> accel_quark,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *acceleratable,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods);
void <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-lock">gtk_accel_group_lock</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group);
void <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-unlock">gtk_accel_group_unlock</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group);
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>* <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-from-accel-closure">gtk_accel_group_from_accel_closure</a>
(<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Keyboard-Accelerators.html#gtk-accel-groups-activate">gtk_accel_groups_activate</a> (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods);
<a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a>* <a href="gtk-Keyboard-Accelerators.html#gtk-accel-groups-from-object">gtk_accel_groups_from_object</a> (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object);
<a href="gtk-Keyboard-Accelerators.html#GtkAccelKey">GtkAccelKey</a>* <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-find">gtk_accel_group_find</a> (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroupFindFunc">GtkAccelGroupFindFunc</a> find_func,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
<a href="gtk-Keyboard-Accelerators.html#GtkAccelKey">GtkAccelKey</a>;
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-valid">gtk_accelerator_valid</a> (<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> keyval,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> modifiers);
void <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-parse">gtk_accelerator_parse</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *accelerator,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *accelerator_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> *accelerator_mods);
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-name">gtk_accelerator_name</a> (<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accelerator_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accelerator_mods);
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-get-label">gtk_accelerator_get_label</a> (<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accelerator_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accelerator_mods);
void <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-set-default-mod-mask">gtk_accelerator_set_default_mod_mask</a>
(<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> default_mod_mask);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-get-default-mod-mask">gtk_accelerator_get_default_mod_mask</a>
(void);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2581169"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----GtkAccelGroup
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2581194"></a><h2>Signals</h2>
<pre class="synopsis">
"<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup-accel-activate">accel-activate</a>"
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> user_function (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *acceleratable,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> keyval,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> *modifier,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Has details
"<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup-accel-changed">accel-changed</a>"
void user_function (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> keyval,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> *modifier,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *accel_closure,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first / Has details
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2581326"></a><h2>Description</h2>
<p>
A <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> represents a group of keyboard accelerators,
typically attached to a toplevel <a href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> (with
<a href="GtkWindow.html#gtk-window-add-accel-group"><code class="function">gtk_window_add_accel_group()</code></a>). Usually you won't need to create a
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> directly; instead, when using <a href="GtkItemFactory.html" title="GtkItemFactory"><span class="type">GtkItemFactory</span></a>, GTK+
automatically sets up the accelerators for your menus in the item
factory's <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>.
</p>
<p>
Note that <em class="firstterm">accelerators</em> are different from
<em class="firstterm">mnemonics</em>. 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
<a href="GtkLabel.html#gtk-label-new-with-mnemonic"><code class="function">gtk_label_new_with_mnemonic()</code></a>. Menu items can have both accelerators
and mnemonics, of course.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2581429"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2581439"></a><h3>
<a name="GtkAccelGroup-struct"></a>GtkAccelGroup</h3>
<a class="indexterm" name="id2581452"></a><pre class="programlisting">typedef struct _GtkAccelGroup GtkAccelGroup;</pre>
<p>
An object representing and maintaining a group of accelerators.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2581469"></a><h3>
<a name="gtk-accel-group-new"></a>gtk_accel_group_new ()</h3>
<a class="indexterm" name="id2581481"></a><pre class="programlisting"><a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>* gtk_accel_group_new (void);</pre>
<p>
Creates a new <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a new <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> object
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2581537"></a><h3>
<a name="gtk-accel-group-ref"></a>gtk_accel_group_ref</h3>
<a class="indexterm" name="id2581552"></a><pre class="programlisting">#define gtk_accel_group_ref g_object_ref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_accel_group_ref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated equivalent of <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"
><code class="function">g_object_ref()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the accel group that was passed in
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2581606"></a><h3>
<a name="gtk-accel-group-unref"></a>gtk_accel_group_unref</h3>
<a class="indexterm" name="id2581621"></a><pre class="programlisting">#define gtk_accel_group_unref g_object_unref
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_accel_group_unref</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated equivalent of <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2581661"></a><h3>
<a name="gtk-accel-group-connect"></a>gtk_accel_group_connect ()</h3>
<a class="indexterm" name="id2581673"></a><pre class="programlisting">void gtk_accel_group_connect (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods,
<a href="gtk-Standard-Enumerations.html#GtkAccelFlags">GtkAccelFlags</a> accel_flags,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure);</pre>
<p>
Installs an accelerator in this group. When <em class="parameter"><code>accel_group</code></em> is being activated
in response to a call to <a href="gtk-Keyboard-Accelerators.html#gtk-accel-groups-activate"><code class="function">gtk_accel_groups_activate()</code></a>, <em class="parameter"><code>closure</code></em> will be
invoked if the <em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mods</code></em> from <a href="gtk-Keyboard-Accelerators.html#gtk-accel-groups-activate"><code class="function">gtk_accel_groups_activate()</code></a>
match those of this connection.
</p>
<p>
The signature used for the <em class="parameter"><code>closure</code></em> is that of <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroupActivate"><span class="type">GtkAccelGroupActivate</span></a>.
</p>
<p>
Note that, due to implementation details, a single closure can only be
connected to one accelerator group.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> the accelerator group to install an accelerator in
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_key</code></em> :</span></td>
<td> key value of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></td>
<td> modifier combination of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_flags</code></em> :</span></td>
<td> a flag mask to configure this accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>closure</code></em> :</span></td>
<td> closure to be executed upon accelerator activation
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2581885"></a><h3>
<a name="gtk-accel-group-connect-by-path"></a>gtk_accel_group_connect_by_path ()</h3>
<a class="indexterm" name="id2581899"></a><pre class="programlisting">void gtk_accel_group_connect_by_path (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *accel_path,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure);</pre>
<p>
Installs an accelerator in this group, using an accelerator path to look
up the appropriate key and modifiers (see <a href="gtk-Accelerator-Maps.html#gtk-accel-map-add-entry"><code class="function">gtk_accel_map_add_entry()</code></a>).
When <em class="parameter"><code>accel_group</code></em> is being activated in response to a call to
<a href="gtk-Keyboard-Accelerators.html#gtk-accel-groups-activate"><code class="function">gtk_accel_groups_activate()</code></a>, <em class="parameter"><code>closure</code></em> will be invoked if the <em class="parameter"><code>accel_key</code></em> and
<em class="parameter"><code>accel_mods</code></em> from <a href="gtk-Keyboard-Accelerators.html#gtk-accel-groups-activate"><code class="function">gtk_accel_groups_activate()</code></a> match the key and modifiers
for the path.
</p>
<p>
The signature used for the <em class="parameter"><code>closure</code></em> is that of <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroupActivate"><span class="type">GtkAccelGroupActivate</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> the accelerator group to install an accelerator in
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_path</code></em> :</span></td>
<td> path used for determining key and modifiers.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>closure</code></em> :</span></td>
<td> closure to be executed upon accelerator activation
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2582075"></a><h3>
<a name="GtkAccelGroupActivate"></a>GtkAccelGroupActivate ()</h3>
<a class="indexterm" name="id2582088"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> (*GtkAccelGroupActivate) (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *acceleratable,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> keyval,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> modifier);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>acceleratable</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>keyval</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>modifier</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2582209"></a><h3>
<a name="GtkAccelGroupFindFunc"></a>GtkAccelGroupFindFunc ()</h3>
<a class="indexterm" name="id2582225"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> (*GtkAccelGroupFindFunc) (<a href="gtk-Keyboard-Accelerators.html#GtkAccelKey">GtkAccelKey</a> *key,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>key</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>closure</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.2
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2582327"></a><h3>
<a name="gtk-accel-group-disconnect"></a>gtk_accel_group_disconnect ()</h3>
<a class="indexterm" name="id2582341"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_accel_group_disconnect (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure);</pre>
<p>
Removes an accelerator previously installed through
<a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-connect"><code class="function">gtk_accel_group_connect()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> the accelerator group to remove an accelerator from
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>closure</code></em> :</span></td>
<td> the closure to remove from this accelerator group
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the closure was found and got disconnected
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2582447"></a><h3>
<a name="gtk-accel-group-disconnect-key"></a>gtk_accel_group_disconnect_key ()</h3>
<a class="indexterm" name="id2582461"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_accel_group_disconnect_key (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods);</pre>
<p>
Removes an accelerator previously installed through
<a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-connect"><code class="function">gtk_accel_group_connect()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> the accelerator group to install an accelerator in
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_key</code></em> :</span></td>
<td> key value of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></td>
<td> modifier combination of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if there was an accelerator which could be
removed, <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2582600"></a><h3>
<a name="gtk-accel-group-query"></a>gtk_accel_group_query ()</h3>
<a class="indexterm" name="id2582613"></a><pre class="programlisting">GtkAccelGroupEntry* gtk_accel_group_query (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *n_entries);</pre>
<p>
Queries an accelerator group for all entries matching <em class="parameter"><code>accel_key</code></em> and
<em class="parameter"><code>accel_mods</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> the accelerator group to query
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_key</code></em> :</span></td>
<td> key value of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></td>
<td> modifier combination of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_entries</code></em> :</span></td>
<td> location to return the number of entries found, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> an array of <em class="parameter"><code>n_entries</code></em> <span class="type">GtkAccelGroupEntry</span> elements, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>. The array is owned by GTK+ and must not be freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2582789"></a><h3>
<a name="gtk-accel-group-activate"></a>gtk_accel_group_activate ()</h3>
<a class="indexterm" name="id2582803"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_accel_group_activate (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Quarks.html#GQuark"
>GQuark</a> accel_quark,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *acceleratable,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_quark</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>acceleratable</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_key</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2582945"></a><h3>
<a name="gtk-accel-group-lock"></a>gtk_accel_group_lock ()</h3>
<a class="indexterm" name="id2582958"></a><pre class="programlisting">void gtk_accel_group_lock (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group);</pre>
<p>
Locks the given accelerator group.
</p>
<p>
Locking an acelerator group prevents the accelerators contained
within it to be changed during runtime. Refer to
<a href="gtk-Accelerator-Maps.html#gtk-accel-map-change-entry"><code class="function">gtk_accel_map_change_entry()</code></a> about runtime accelerator changes.
</p>
<p>
If called more than once, <em class="parameter"><code>accel_group</code></em> remains locked until
<a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-unlock"><code class="function">gtk_accel_group_unlock()</code></a> has been called an equivalent number
of times.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> a <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2583057"></a><h3>
<a name="gtk-accel-group-unlock"></a>gtk_accel_group_unlock ()</h3>
<a class="indexterm" name="id2583069"></a><pre class="programlisting">void gtk_accel_group_unlock (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group);</pre>
<p>
Undoes the last call to <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-lock"><code class="function">gtk_accel_group_lock()</code></a> on this <em class="parameter"><code>accel_group</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> a <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2583145"></a><h3>
<a name="gtk-accel-group-from-accel-closure"></a>gtk_accel_group_from_accel_closure ()</h3>
<a class="indexterm" name="id2583159"></a><pre class="programlisting"><a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a>* gtk_accel_group_from_accel_closure
(<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *closure);</pre>
<p>
Finds the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> to which <em class="parameter"><code>closure</code></em> is connected;
see <a href="gtk-Keyboard-Accelerators.html#gtk-accel-group-connect"><code class="function">gtk_accel_group_connect()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>closure</code></em> :</span></td>
<td> a <a
href="../gobject/gobject-Closures.html#GClosure"
><span class="type">GClosure</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> to which <em class="parameter"><code>closure</code></em> is connected, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2583277"></a><h3>
<a name="gtk-accel-groups-activate"></a>gtk_accel_groups_activate ()</h3>
<a class="indexterm" name="id2583291"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_accel_groups_activate (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accel_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accel_mods);</pre>
<p>
Finds the first accelerator in any <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> attached
to <em class="parameter"><code>object</code></em> that matches <em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mods</code></em>, and
activates that accelerator.
If an accelerator was activated and handled this keypress, <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>
is returned.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td> the <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>, usually a <a href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>, on which
to activate the accelerator.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_key</code></em> :</span></td>
<td> accelerator keyval from a key event
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></td>
<td> keyboard state mask from a key event
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the accelerator was handled, <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2583472"></a><h3>
<a name="gtk-accel-groups-from-object"></a>gtk_accel_groups_from_object ()</h3>
<a class="indexterm" name="id2583485"></a><pre class="programlisting"><a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a>* gtk_accel_groups_from_object (<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *object);</pre>
<p>
Gets a list of all accel groups which are attached to <em class="parameter"><code>object</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>object</code></em> :</span></td>
<td> a <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a>, usually a <a href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a list of all accel groups which are attached to <em class="parameter"><code>object</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2583574"></a><h3>
<a name="gtk-accel-group-find"></a>gtk_accel_group_find ()</h3>
<a class="indexterm" name="id2583587"></a><pre class="programlisting"><a href="gtk-Keyboard-Accelerators.html#GtkAccelKey">GtkAccelKey</a>* gtk_accel_group_find (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroupFindFunc">GtkAccelGroupFindFunc</a> find_func,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre>
<p>
Finds the first entry in an accelerator group for which
<em class="parameter"><code>find_func</code></em> returns <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> and returns its <a href="gtk-Keyboard-Accelerators.html#GtkAccelKey"><span class="type">GtkAccelKey</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> a <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>find_func</code></em> :</span></td>
<td> a function to filter the entries of <em class="parameter"><code>accel_group</code></em> with
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data</code></em> :</span></td>
<td> data to pass to <em class="parameter"><code>find_func</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the key of the first entry passing <em class="parameter"><code>find_func</code></em>. The key is
owned by GTK+ and must not be freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2583743"></a><h3>
<a name="GtkAccelKey"></a>GtkAccelKey</h3>
<a class="indexterm" name="id2583755"></a><pre class="programlisting">typedef struct {
guint accel_key;
GdkModifierType accel_mods;
guint accel_flags : 16;
} GtkAccelKey;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2583772"></a><h3>
<a name="gtk-accelerator-valid"></a>gtk_accelerator_valid ()</h3>
<a class="indexterm" name="id2583786"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_accelerator_valid (<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> keyval,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> modifiers);</pre>
<p>
Determines whether a given keyval and modifier mask constitute
a valid keyboard accelerator. For example, the <span class="type">GDK_a</span> keyval
plus <a
href="../gdk/gdk-Windows.html#GDK-CONTROL-MASK:CAPS"
><span class="type">GDK_CONTROL_MASK</span></a> is valid - this is a "Ctrl+a" accelerator.
But, you can't, for instance, use the <span class="type">GDK_Control_L</span> keyval
as an accelerator.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>keyval</code></em> :</span></td>
<td> a GDK keyval
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>modifiers</code></em> :</span></td>
<td> modifier mask
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the accelerator is valid
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2583910"></a><h3>
<a name="gtk-accelerator-parse"></a>gtk_accelerator_parse ()</h3>
<a class="indexterm" name="id2583924"></a><pre class="programlisting">void gtk_accelerator_parse (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *accelerator,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> *accelerator_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> *accelerator_mods);</pre>
<p>
Parses a string representing an accelerator. The
format looks like "<Control>a" or "<Shift><Alt>F1" or
"<Release>z" (the last one is for key release).
The parser is fairly liberal and allows lower or upper case,
and also abbreviations such as "<Ctl>" and "<Ctrl>".
</p>
<p>
If the parse fails, <em class="parameter"><code>accelerator_key</code></em> and <em class="parameter"><code>accelerator_mods</code></em> will
be set to 0 (zero).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accelerator</code></em> :</span></td>
<td> string representing an accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accelerator_key</code></em> :</span></td>
<td> return location for accelerator keyval
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accelerator_mods</code></em> :</span></td>
<td> return location for accelerator modifier mask
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2584044"></a><h3>
<a name="gtk-accelerator-name"></a>gtk_accelerator_name ()</h3>
<a class="indexterm" name="id2584057"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_accelerator_name (<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accelerator_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accelerator_mods);</pre>
<p>
Converts an accelerator keyval and modifier mask
into a string parseable by <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-parse"><code class="function">gtk_accelerator_parse()</code></a>.
For example, if you pass in <span class="type">GDK_q</span> and <a
href="../gdk/gdk-Windows.html#GDK-CONTROL-MASK:CAPS"
><span class="type">GDK_CONTROL_MASK</span></a>,
this function returns "<Control>q".
</p>
<p>
If you need to display accelerators in the user interface,
see <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-get-label"><code class="function">gtk_accelerator_get_label()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accelerator_key</code></em> :</span></td>
<td> accelerator keyval
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accelerator_mods</code></em> :</span></td>
<td> accelerator modifier mask
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a newly-allocated accelerator name
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2584187"></a><h3>
<a name="gtk-accelerator-get-label"></a>gtk_accelerator_get_label ()</h3>
<a class="indexterm" name="id2584203"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_accelerator_get_label (<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> accelerator_key,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> accelerator_mods);</pre>
<p>
Converts an accelerator keyval and modifier mask into a string
which can be used to represent the accelerator to the user.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accelerator_key</code></em> :</span></td>
<td> accelerator keyval
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accelerator_mods</code></em> :</span></td>
<td> accelerator modifier mask
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a newly-allocated string representing the accelerator.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2584293"></a><h3>
<a name="gtk-accelerator-set-default-mod-mask"></a>gtk_accelerator_set_default_mod_mask ()</h3>
<a class="indexterm" name="id2584306"></a><pre class="programlisting">void gtk_accelerator_set_default_mod_mask
(<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> default_mod_mask);</pre>
<p>
Sets the modifiers that will be considered significant for keyboard
accelerators. The default mod mask is <a
href="../gdk/gdk-Windows.html#GDK-CONTROL-MASK:CAPS"
><span class="type">GDK_CONTROL_MASK</span></a> |
<a
href="../gdk/gdk-Windows.html#GDK-SHIFT-MASK:CAPS"
><span class="type">GDK_SHIFT_MASK</span></a> | <a
href="../gdk/gdk-Windows.html#GDK-MOD1-MASK:CAPS"
><span class="type">GDK_MOD1_MASK</span></a> | <a
href="../gdk/gdk-Windows.html#GDK-SUPER-MASK:CAPS"
><span class="type">GDK_SUPER_MASK</span></a> |
<a
href="../gdk/gdk-Windows.html#GDK-HYPER-MASK:CAPS"
><span class="type">GDK_HYPER_MASK</span></a> | <a
href="../gdk/gdk-Windows.html#GDK-META-MASK:CAPS"
><span class="type">GDK_META_MASK</span></a>, that is, Control, Shift, Alt,
Super, Hyper and Meta. Other modifiers will by default be ignored
by <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a>.
You must include at least the three modifiers Control, Shift
and Alt in any value you pass to this function.
</p>
<p>
The default mod mask should be changed on application startup,
before using any accelerator groups.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>default_mod_mask</code></em> :</span></td>
<td> accelerator modifier mask
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2584431"></a><h3>
<a name="gtk-accelerator-get-default-mod-mask"></a>gtk_accelerator_get_default_mod_mask ()</h3>
<a class="indexterm" name="id2584445"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> gtk_accelerator_get_default_mod_mask
(void);</pre>
<p>
Gets the value set by <a href="gtk-Keyboard-Accelerators.html#gtk-accelerator-set-default-mod-mask"><code class="function">gtk_accelerator_set_default_mod_mask()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the default accelerator modifier mask
</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2584499"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id2584510"></a><h3>
<a name="GtkAccelGroup-accel-activate"></a>The "accel-activate" signal</h3>
<a class="indexterm" name="id2584521"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> user_function (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a> *acceleratable,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> keyval,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> *modifier,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Has details</pre>
<p>
The accel-activate signal is an implementation detail of
<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> and not meant to be used by applications.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> which received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>acceleratable</code></em> :</span></td>
<td> the object on which the accelerator was activated
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>keyval</code></em> :</span></td>
<td> the accelerator keyval
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>modifier</code></em> :</span></td>
<td> the modifier combination of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the accelerator was activated
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2584698"></a><h3>
<a name="GtkAccelGroup-accel-changed"></a>The "accel-changed" signal</h3>
<a class="indexterm" name="id2584709"></a><pre class="programlisting">void user_function (<a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup">GtkAccelGroup</a> *accel_group,
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> keyval,
<a
href="../gdk/gdk-Windows.html#GdkModifierType"
>GdkModifierType</a> *modifier,
<a
href="../gobject/gobject-Closures.html#GClosure"
>GClosure</a> *accel_closure,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run first / Has details</pre>
<p>
The accel-changed signal is emitted when a <span class="type">GtkAccelGroupEntry</span>
is added to or removed from the accel group.
</p>
<p>
Widgets like <a href="GtkAccelLabel.html" title="GtkAccelLabel"><span class="type">GtkAccelLabel</span></a> which display an associated
accelerator should connect to this signal, and rebuild
their visual representation if the <em class="parameter"><code>accel_closure</code></em> is theirs.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_group</code></em> :</span></td>
<td> the <a href="gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> which received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>keyval</code></em> :</span></td>
<td> the accelerator keyval
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>modifier</code></em> :</span></td>
<td> the modifier combination of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>accel_closure</code></em> :</span></td>
<td> the <a
href="../gobject/gobject-Closures.html#GClosure"
><span class="type">GClosure</span></a> of the accelerator
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2584897"></a><h2>See Also</h2>
<p>
<a href="GtkWindow.html#gtk-window-add-accel-group"><code class="function">gtk_window_add_accel_group()</code></a>, <a href="gtk-Accelerator-Maps.html#gtk-accel-map-change-entry"><code class="function">gtk_accel_map_change_entry()</code></a>,
<a href="GtkItemFactory.html#gtk-item-factory-new"><code class="function">gtk_item_factory_new()</code></a>, <a href="GtkLabel.html#gtk-label-new-with-mnemonic"><code class="function">gtk_label_new_with_mnemonic()</code></a>
</p>
</div>
</div>
</body>
</html>