<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<refentry id="gtk-Keyboard-Accelerators">
<refmeta>
<refentrytitle role="top_of_page" id="gtk-Keyboard-Accelerators.top_of_page">Accelerator Groups</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Accelerator Groups</refname>
<refpurpose>Groups of global keyboard accelerators for an entire GtkWindow</refpurpose>
</refnamediv>

<refsynopsisdiv id="gtk-Keyboard-Accelerators.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<anchor id="GtkAccelGroup"/>
<synopsis>

#include &lt;gtk/gtk.h&gt;

                    <link linkend="GtkAccelGroup-struct">GtkAccelGroup</link>;
<link linkend="GtkAccelGroup">GtkAccelGroup</link>*      <link linkend="gtk-accel-group-new">gtk_accel_group_new</link>                 (void);
#define             <link linkend="gtk-accel-group-ref">gtk_accel_group_ref</link>
#define             <link linkend="gtk-accel-group-unref">gtk_accel_group_unref</link>
<link linkend="void">void</link>                <link linkend="gtk-accel-group-connect">gtk_accel_group_connect</link>             (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods,
                                                         <link linkend="GtkAccelFlags">GtkAccelFlags</link> accel_flags,
                                                         <link linkend="GClosure">GClosure</link> *closure);
<link linkend="void">void</link>                <link linkend="gtk-accel-group-connect-by-path">gtk_accel_group_connect_by_path</link>     (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         const <link linkend="gchar">gchar</link> *accel_path,
                                                         <link linkend="GClosure">GClosure</link> *closure);
<link linkend="gboolean">gboolean</link>            (<link linkend="GtkAccelGroupActivate">*GtkAccelGroupActivate</link>)            (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="GObject">GObject</link> *acceleratable,
                                                         <link linkend="guint">guint</link> keyval,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> modifier);
<link linkend="gboolean">gboolean</link>            (<link linkend="GtkAccelGroupFindFunc">*GtkAccelGroupFindFunc</link>)            (<link linkend="GtkAccelKey">GtkAccelKey</link> *key,
                                                         <link linkend="GClosure">GClosure</link> *closure,
                                                         <link linkend="gpointer">gpointer</link> data);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-accel-group-disconnect">gtk_accel_group_disconnect</link>          (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="GClosure">GClosure</link> *closure);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-accel-group-disconnect-key">gtk_accel_group_disconnect_key</link>      (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods);
<link linkend="GtkAccelGroupEntry">GtkAccelGroupEntry</link>* <link linkend="gtk-accel-group-query">gtk_accel_group_query</link>               (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods,
                                                         <link linkend="guint">guint</link> *n_entries);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-accel-group-activate">gtk_accel_group_activate</link>            (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="GQuark">GQuark</link> accel_quark,
                                                         <link linkend="GObject">GObject</link> *acceleratable,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods);
<link linkend="void">void</link>                <link linkend="gtk-accel-group-lock">gtk_accel_group_lock</link>                (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);
<link linkend="void">void</link>                <link linkend="gtk-accel-group-unlock">gtk_accel_group_unlock</link>              (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-accel-group-get-is-locked">gtk_accel_group_get_is_locked</link>       (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);
<link linkend="GtkAccelGroup">GtkAccelGroup</link>*      <link linkend="gtk-accel-group-from-accel-closure">gtk_accel_group_from_accel_closure</link>  (<link linkend="GClosure">GClosure</link> *closure);
<link linkend="GdkModifierType">GdkModifierType</link>     <link linkend="gtk-accel-group-get-modifier-mask">gtk_accel_group_get_modifier_mask</link>   (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-accel-groups-activate">gtk_accel_groups_activate</link>           (<link linkend="GObject">GObject</link> *object,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods);
<link linkend="GSList">GSList</link>*             <link linkend="gtk-accel-groups-from-object">gtk_accel_groups_from_object</link>        (<link linkend="GObject">GObject</link> *object);
<link linkend="GtkAccelKey">GtkAccelKey</link>*        <link linkend="gtk-accel-group-find">gtk_accel_group_find</link>                (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="GtkAccelGroupFindFunc">GtkAccelGroupFindFunc</link> find_func,
                                                         <link linkend="gpointer">gpointer</link> data);
                    <link linkend="GtkAccelKey">GtkAccelKey</link>;
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-accelerator-valid">gtk_accelerator_valid</link>               (<link linkend="guint">guint</link> keyval,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> modifiers);
<link linkend="void">void</link>                <link linkend="gtk-accelerator-parse">gtk_accelerator_parse</link>               (const <link linkend="gchar">gchar</link> *accelerator,
                                                         <link linkend="guint">guint</link> *accelerator_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> *accelerator_mods);
<link linkend="gchar">gchar</link>*              <link linkend="gtk-accelerator-name">gtk_accelerator_name</link>                (<link linkend="guint">guint</link> accelerator_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accelerator_mods);
<link linkend="gchar">gchar</link>*              <link linkend="gtk-accelerator-get-label">gtk_accelerator_get_label</link>           (<link linkend="guint">guint</link> accelerator_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accelerator_mods);
<link linkend="void">void</link>                <link linkend="gtk-accelerator-set-default-mod-mask">gtk_accelerator_set_default_mod_mask</link>
                                                        (<link linkend="GdkModifierType">GdkModifierType</link> default_mod_mask);
<link linkend="guint">guint</link>               <link linkend="gtk-accelerator-get-default-mod-mask">gtk_accelerator_get_default_mod_mask</link>
                                                        (void);
</synopsis>
</refsynopsisdiv>

<refsect1 id="gtk-Keyboard-Accelerators.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GtkAccelGroup
</synopsis>
</refsect1>





<refsect1 id="gtk-Keyboard-Accelerators.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="GtkAccelGroup--is-locked">is-locked</link>&quot;                <link linkend="gboolean">gboolean</link>              : Read
  &quot;<link linkend="GtkAccelGroup--modifier-mask">modifier-mask</link>&quot;            <link linkend="GdkModifierType">GdkModifierType</link>       : Read
</synopsis>
</refsect1>

<refsect1 id="gtk-Keyboard-Accelerators.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GtkAccelGroup-accel-activate">accel-activate</link>&quot;                                 : Has Details
  &quot;<link linkend="GtkAccelGroup-accel-changed">accel-changed</link>&quot;                                  : Run First / Has Details
</synopsis>
</refsect1>


<refsect1 id="gtk-Keyboard-Accelerators.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> represents a group of keyboard accelerators,
typically attached to a toplevel <link linkend="GtkWindow"><type>GtkWindow</type></link> (with
<link linkend="gtk-window-add-accel-group"><function>gtk_window_add_accel_group()</function></link>). Usually you won't need to create a
<link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> directly; instead, when using <link linkend="GtkItemFactory"><type>GtkItemFactory</type></link>, GTK+
automatically sets up the accelerators for your menus in the item
factory's <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>.
</para>
<para>
Note that <firstterm>accelerators</firstterm> are different from
<firstterm>mnemonics</firstterm>. 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
<link linkend="gtk-label-new-with-mnemonic"><function>gtk_label_new_with_mnemonic()</function></link>. Menu items can have both accelerators
and mnemonics, of course.
</para>
</refsect1>

<refsect1 id="gtk-Keyboard-Accelerators.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkAccelGroup-struct" role="struct">
<title>GtkAccelGroup</title>
<indexterm zone="GtkAccelGroup-struct"><primary sortas="AccelGroup">GtkAccelGroup</primary></indexterm><programlisting>typedef struct _GtkAccelGroup GtkAccelGroup;</programlisting>
<para>
An object representing and maintaining a group of accelerators.
</para></refsect2>
<refsect2 id="gtk-accel-group-new" role="function">
<title>gtk_accel_group_new ()</title>
<indexterm zone="gtk-accel-group-new"><primary sortas="accel_group_new">gtk_accel_group_new</primary></indexterm><programlisting><link linkend="GtkAccelGroup">GtkAccelGroup</link>*      gtk_accel_group_new                 (void);</programlisting>
<para>
Creates a new <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> object
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-ref" role="macro" condition="deprecated:">
<title>gtk_accel_group_ref</title>
<indexterm zone="gtk-accel-group-ref" role="deprecated"><primary sortas="accel_group_ref">gtk_accel_group_ref</primary></indexterm><programlisting>#define	gtk_accel_group_ref	g_object_ref
</programlisting>
<warning><para><literal>gtk_accel_group_ref</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Deprecated equivalent of <link linkend="g-object-ref"><function>g_object_ref()</function></link>.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the accel group that was passed in
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-unref" role="macro" condition="deprecated:">
<title>gtk_accel_group_unref</title>
<indexterm zone="gtk-accel-group-unref" role="deprecated"><primary sortas="accel_group_unref">gtk_accel_group_unref</primary></indexterm><programlisting>#define	gtk_accel_group_unref	g_object_unref
</programlisting>
<warning><para><literal>gtk_accel_group_unref</literal> is deprecated and should not be used in newly-written code.</para></warning>
<para>
Deprecated equivalent of <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</para></refsect2>
<refsect2 id="gtk-accel-group-connect" role="function">
<title>gtk_accel_group_connect ()</title>
<indexterm zone="gtk-accel-group-connect"><primary sortas="accel_group_connect">gtk_accel_group_connect</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_accel_group_connect             (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods,
                                                         <link linkend="GtkAccelFlags">GtkAccelFlags</link> accel_flags,
                                                         <link linkend="GClosure">GClosure</link> *closure);</programlisting>
<para>
Installs an accelerator in this group. When <parameter>accel_group</parameter> is being activated
in response to a call to <link linkend="gtk-accel-groups-activate"><function>gtk_accel_groups_activate()</function></link>, <parameter>closure</parameter> will be
invoked if the <parameter>accel_key</parameter> and <parameter>accel_mods</parameter> from <link linkend="gtk-accel-groups-activate"><function>gtk_accel_groups_activate()</function></link>
match those of this connection.
</para>
<para>
The signature used for the <parameter>closure</parameter> is that of <link linkend="GtkAccelGroupActivate"><type>GtkAccelGroupActivate</type></link>.
</para>
<para>
Note that, due to implementation details, a single closure can only be
connected to one accelerator group.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara>      the accelerator group to install an accelerator in
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_key</parameter>&#160;:</term>
<listitem><simpara>        key value of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_mods</parameter>&#160;:</term>
<listitem><simpara>       modifier combination of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_flags</parameter>&#160;:</term>
<listitem><simpara>      a flag mask to configure this accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
<listitem><simpara>          closure to be executed upon accelerator activation
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-connect-by-path" role="function">
<title>gtk_accel_group_connect_by_path ()</title>
<indexterm zone="gtk-accel-group-connect-by-path"><primary sortas="accel_group_connect_by_path">gtk_accel_group_connect_by_path</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_accel_group_connect_by_path     (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         const <link linkend="gchar">gchar</link> *accel_path,
                                                         <link linkend="GClosure">GClosure</link> *closure);</programlisting>
<para>
Installs an accelerator in this group, using an accelerator path to look
up the appropriate key and modifiers (see <link linkend="gtk-accel-map-add-entry"><function>gtk_accel_map_add_entry()</function></link>).
When <parameter>accel_group</parameter> is being activated in response to a call to
<link linkend="gtk-accel-groups-activate"><function>gtk_accel_groups_activate()</function></link>, <parameter>closure</parameter> will be invoked if the <parameter>accel_key</parameter> and
<parameter>accel_mods</parameter> from <link linkend="gtk-accel-groups-activate"><function>gtk_accel_groups_activate()</function></link> match the key and modifiers
for the path.
</para>
<para>
The signature used for the <parameter>closure</parameter> is that of <link linkend="GtkAccelGroupActivate"><type>GtkAccelGroupActivate</type></link>.
</para>
<para>
Note that <parameter>accel_path</parameter> string will be stored in a <link linkend="GQuark"><type>GQuark</type></link>. Therefore, if you
pass a static string, you can save some memory by interning it first with 
<link linkend="g-intern-static-string"><function>g_intern_static_string()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara>      the accelerator group to install an accelerator in
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_path</parameter>&#160;:</term>
<listitem><simpara>       path used for determining key and modifiers.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
<listitem><simpara>          closure to be executed upon accelerator activation
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GtkAccelGroupActivate" role="function">
<title>GtkAccelGroupActivate ()</title>
<indexterm zone="GtkAccelGroupActivate"><primary sortas="AccelGroupActivate">GtkAccelGroupActivate</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            (*GtkAccelGroupActivate)            (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="GObject">GObject</link> *acceleratable,
                                                         <link linkend="guint">guint</link> keyval,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> modifier);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>acceleratable</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>keyval</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>modifier</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GtkAccelGroupFindFunc" role="function" condition="since:2.2">
<title>GtkAccelGroupFindFunc ()</title>
<indexterm zone="GtkAccelGroupFindFunc" role="2.2"><primary sortas="AccelGroupFindFunc">GtkAccelGroupFindFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            (*GtkAccelGroupFindFunc)            (<link linkend="GtkAccelKey">GtkAccelKey</link> *key,
                                                         <link linkend="GClosure">GClosure</link> *closure,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>key</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.2</para></refsect2>
<refsect2 id="gtk-accel-group-disconnect" role="function">
<title>gtk_accel_group_disconnect ()</title>
<indexterm zone="gtk-accel-group-disconnect"><primary sortas="accel_group_disconnect">gtk_accel_group_disconnect</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_accel_group_disconnect          (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="GClosure">GClosure</link> *closure);</programlisting>
<para>
Removes an accelerator previously installed through
<link linkend="gtk-accel-group-connect"><function>gtk_accel_group_connect()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara> the accelerator group to remove an accelerator from
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
<listitem><simpara>     the closure to remove from this accelerator group
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>     <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the closure was found and got disconnected
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-disconnect-key" role="function">
<title>gtk_accel_group_disconnect_key ()</title>
<indexterm zone="gtk-accel-group-disconnect-key"><primary sortas="accel_group_disconnect_key">gtk_accel_group_disconnect_key</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_accel_group_disconnect_key      (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods);</programlisting>
<para>
Removes an accelerator previously installed through
<link linkend="gtk-accel-group-connect"><function>gtk_accel_group_connect()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara>      the accelerator group to install an accelerator in
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_key</parameter>&#160;:</term>
<listitem><simpara>        key value of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_mods</parameter>&#160;:</term>
<listitem><simpara>       modifier combination of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>          <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if there was an accelerator which could be 
                   removed, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-query" role="function">
<title>gtk_accel_group_query ()</title>
<indexterm zone="gtk-accel-group-query"><primary sortas="accel_group_query">gtk_accel_group_query</primary></indexterm><programlisting><link linkend="GtkAccelGroupEntry">GtkAccelGroupEntry</link>* gtk_accel_group_query               (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods,
                                                         <link linkend="guint">guint</link> *n_entries);</programlisting>
<para>
Queries an accelerator group for all entries matching <parameter>accel_key</parameter> and 
<parameter>accel_mods</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara>      the accelerator group to query
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_key</parameter>&#160;:</term>
<listitem><simpara>        key value of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_mods</parameter>&#160;:</term>
<listitem><simpara>       modifier combination of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_entries</parameter>&#160;:</term>
<listitem><simpara>        location to return the number of entries found, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>          an array of <parameter>n_entries</parameter> <link linkend="GtkAccelGroupEntry"><type>GtkAccelGroupEntry</type></link> elements, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>. The array is owned by GTK+ and must not be freed. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-activate" role="function">
<title>gtk_accel_group_activate ()</title>
<indexterm zone="gtk-accel-group-activate"><primary sortas="accel_group_activate">gtk_accel_group_activate</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_accel_group_activate            (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="GQuark">GQuark</link> accel_quark,
                                                         <link linkend="GObject">GObject</link> *acceleratable,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods);</programlisting>
<para>
Finds the first accelerator in <parameter>accel_group</parameter> 
that matches <parameter>accel_key</parameter> and <parameter>accel_mods</parameter>, and
activates it.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara>   a <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_quark</parameter>&#160;:</term>
<listitem><simpara>   the quark for the accelerator name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>acceleratable</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GObject"><type>GObject</type></link>, usually a <link linkend="GtkWindow"><type>GtkWindow</type></link>, on which
                to activate the accelerator.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_key</parameter>&#160;:</term>
<listitem><simpara>     accelerator keyval from a key event
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_mods</parameter>&#160;:</term>
<listitem><simpara>    keyboard state mask from a key event
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if an accelerator was activated and handled this keypress
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-lock" role="function">
<title>gtk_accel_group_lock ()</title>
<indexterm zone="gtk-accel-group-lock"><primary sortas="accel_group_lock">gtk_accel_group_lock</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_accel_group_lock                (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);</programlisting>
<para>
Locks the given accelerator group.
</para>
<para>
Locking an acelerator group prevents the accelerators contained
within it to be changed during runtime. Refer to
<link linkend="gtk-accel-map-change-entry"><function>gtk_accel_map_change_entry()</function></link> about runtime accelerator changes.
</para>
<para>
If called more than once, <parameter>accel_group</parameter> remains locked until
<link linkend="gtk-accel-group-unlock"><function>gtk_accel_group_unlock()</function></link> has been called an equivalent number
of times.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-unlock" role="function">
<title>gtk_accel_group_unlock ()</title>
<indexterm zone="gtk-accel-group-unlock"><primary sortas="accel_group_unlock">gtk_accel_group_unlock</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_accel_group_unlock              (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);</programlisting>
<para>
Undoes the last call to <link linkend="gtk-accel-group-lock"><function>gtk_accel_group_lock()</function></link> on this <parameter>accel_group</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-get-is-locked" role="function" condition="since:2.14">
<title>gtk_accel_group_get_is_locked ()</title>
<indexterm zone="gtk-accel-group-get-is-locked" role="2.14"><primary sortas="accel_group_get_is_locked">gtk_accel_group_get_is_locked</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_accel_group_get_is_locked       (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);</programlisting>
<para>
Locks are added and removed using <link linkend="gtk-accel-group-lock"><function>gtk_accel_group_lock()</function></link> and
<link linkend="gtk-accel-group-unlock"><function>gtk_accel_group_unlock()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if there are 1 or more locks on the <parameter>accel_group</parameter>,
<link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>
<refsect2 id="gtk-accel-group-from-accel-closure" role="function">
<title>gtk_accel_group_from_accel_closure ()</title>
<indexterm zone="gtk-accel-group-from-accel-closure"><primary sortas="accel_group_from_accel_closure">gtk_accel_group_from_accel_closure</primary></indexterm><programlisting><link linkend="GtkAccelGroup">GtkAccelGroup</link>*      gtk_accel_group_from_accel_closure  (<link linkend="GClosure">GClosure</link> *closure);</programlisting>
<para>
Finds the <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> to which <parameter>closure</parameter> is connected; 
see <link linkend="gtk-accel-group-connect"><function>gtk_accel_group_connect()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GClosure"><type>GClosure</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> to which <parameter>closure</parameter> is connected, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-get-modifier-mask" role="function" condition="since:2.14">
<title>gtk_accel_group_get_modifier_mask ()</title>
<indexterm zone="gtk-accel-group-get-modifier-mask" role="2.14"><primary sortas="accel_group_get_modifier_mask">gtk_accel_group_get_modifier_mask</primary></indexterm><programlisting><link linkend="GdkModifierType">GdkModifierType</link>     gtk_accel_group_get_modifier_mask   (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group);</programlisting>
<para>
Gets a <link linkend="GdkModifierType"><type>GdkModifierType</type></link> representing the mask for this
<parameter>accel_group</parameter>. For example, <link linkend="GDK-CONTROL-MASK--CAPS"><type>GDK_CONTROL_MASK</type></link>, <link linkend="GDK-SHIFT-MASK--CAPS"><type>GDK_SHIFT_MASK</type></link>, etc.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the modifier mask for this accel group.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>
<refsect2 id="gtk-accel-groups-activate" role="function">
<title>gtk_accel_groups_activate ()</title>
<indexterm zone="gtk-accel-groups-activate"><primary sortas="accel_groups_activate">gtk_accel_groups_activate</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_accel_groups_activate           (<link linkend="GObject">GObject</link> *object,
                                                         <link linkend="guint">guint</link> accel_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accel_mods);</programlisting>
<para>
Finds the first accelerator in any <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> attached
to <parameter>object</parameter> that matches <parameter>accel_key</parameter> and <parameter>accel_mods</parameter>, and
activates that accelerator.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>object</parameter>&#160;:</term>
<listitem><simpara>        the <link linkend="GObject"><type>GObject</type></link>, usually a <link linkend="GtkWindow"><type>GtkWindow</type></link>, on which
                to activate the accelerator.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_key</parameter>&#160;:</term>
<listitem><simpara>     accelerator keyval from a key event
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_mods</parameter>&#160;:</term>
<listitem><simpara>    keyboard state mask from a key event
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if an accelerator was activated and handled this keypress
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-groups-from-object" role="function">
<title>gtk_accel_groups_from_object ()</title>
<indexterm zone="gtk-accel-groups-from-object"><primary sortas="accel_groups_from_object">gtk_accel_groups_from_object</primary></indexterm><programlisting><link linkend="GSList">GSList</link>*             gtk_accel_groups_from_object        (<link linkend="GObject">GObject</link> *object);</programlisting>
<para>
Gets a list of all accel groups which are attached to <parameter>object</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>object</parameter>&#160;:</term>
<listitem><simpara>        a <link linkend="GObject"><type>GObject</type></link>, usually a <link linkend="GtkWindow"><type>GtkWindow</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a list of all accel groups which are attached to <parameter>object</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accel-group-find" role="function">
<title>gtk_accel_group_find ()</title>
<indexterm zone="gtk-accel-group-find"><primary sortas="accel_group_find">gtk_accel_group_find</primary></indexterm><programlisting><link linkend="GtkAccelKey">GtkAccelKey</link>*        gtk_accel_group_find                (<link linkend="GtkAccelGroup">GtkAccelGroup</link> *accel_group,
                                                         <link linkend="GtkAccelGroupFindFunc">GtkAccelGroupFindFunc</link> find_func,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Finds the first entry in an accelerator group for which 
<parameter>find_func</parameter> returns <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> and returns its <link linkend="GtkAccelKey"><type>GtkAccelKey</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>find_func</parameter>&#160;:</term>
<listitem><simpara> a function to filter the entries of <parameter>accel_group</parameter> with
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara> data to pass to <parameter>find_func</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the key of the first entry passing <parameter>find_func</parameter>. The key is 
owned by GTK+ and must not be freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GtkAccelKey" role="struct">
<title>GtkAccelKey</title>
<indexterm zone="GtkAccelKey"><primary sortas="AccelKey">GtkAccelKey</primary></indexterm><programlisting>typedef struct {
  guint           accel_key;
  GdkModifierType accel_mods;
  guint           accel_flags : 16;
} GtkAccelKey;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="gtk-accelerator-valid" role="function">
<title>gtk_accelerator_valid ()</title>
<indexterm zone="gtk-accelerator-valid"><primary sortas="accelerator_valid">gtk_accelerator_valid</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_accelerator_valid               (<link linkend="guint">guint</link> keyval,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> modifiers);</programlisting>
<para>
Determines whether a given keyval and modifier mask constitute
a valid keyboard accelerator. For example, the <link linkend="GDK-a"><type>GDK_a</type></link> keyval
plus <link linkend="GDK-CONTROL-MASK--CAPS"><type>GDK_CONTROL_MASK</type></link> is valid - this is a "Ctrl+a" accelerator.
But, you can't, for instance, use the <link linkend="GDK-Control-L"><type>GDK_Control_L</type></link> keyval
as an accelerator.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>keyval</parameter>&#160;:</term>
<listitem><simpara>    a GDK keyval
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>modifiers</parameter>&#160;:</term>
<listitem><simpara> modifier mask
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>   <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the accelerator is valid
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accelerator-parse" role="function">
<title>gtk_accelerator_parse ()</title>
<indexterm zone="gtk-accelerator-parse"><primary sortas="accelerator_parse">gtk_accelerator_parse</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_accelerator_parse               (const <link linkend="gchar">gchar</link> *accelerator,
                                                         <link linkend="guint">guint</link> *accelerator_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> *accelerator_mods);</programlisting>
<para>
Parses a string representing an accelerator. The
format looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1" or
"&lt;Release&gt;z" (the last one is for key release).
The parser is fairly liberal and allows lower or upper case,
and also abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;".
</para>
<para>
If the parse fails, <parameter>accelerator_key</parameter> and <parameter>accelerator_mods</parameter> will
be set to 0 (zero).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accelerator</parameter>&#160;:</term>
<listitem><simpara>      string representing an accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accelerator_key</parameter>&#160;:</term>
<listitem><simpara>  return location for accelerator keyval
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accelerator_mods</parameter>&#160;:</term>
<listitem><simpara> return location for accelerator modifier mask
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accelerator-name" role="function">
<title>gtk_accelerator_name ()</title>
<indexterm zone="gtk-accelerator-name"><primary sortas="accelerator_name">gtk_accelerator_name</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              gtk_accelerator_name                (<link linkend="guint">guint</link> accelerator_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accelerator_mods);</programlisting>
<para>
Converts an accelerator keyval and modifier mask
into a string parseable by <link linkend="gtk-accelerator-parse"><function>gtk_accelerator_parse()</function></link>.
For example, if you pass in <link linkend="GDK-q"><type>GDK_q</type></link> and <link linkend="GDK-CONTROL-MASK--CAPS"><type>GDK_CONTROL_MASK</type></link>,
this function returns "&lt;Control&gt;q". 
</para>
<para>
If you need to display accelerators in the user interface,
see <link linkend="gtk-accelerator-get-label"><function>gtk_accelerator_get_label()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accelerator_key</parameter>&#160;:</term>
<listitem><simpara>  accelerator keyval
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accelerator_mods</parameter>&#160;:</term>
<listitem><simpara> accelerator modifier mask
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly-allocated accelerator name
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accelerator-get-label" role="function" condition="since:2.6">
<title>gtk_accelerator_get_label ()</title>
<indexterm zone="gtk-accelerator-get-label" role="2.6"><primary sortas="accelerator_get_label">gtk_accelerator_get_label</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              gtk_accelerator_get_label           (<link linkend="guint">guint</link> accelerator_key,
                                                         <link linkend="GdkModifierType">GdkModifierType</link> accelerator_mods);</programlisting>
<para>
Converts an accelerator keyval and modifier mask into a string 
which can be used to represent the accelerator to the user.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accelerator_key</parameter>&#160;:</term>
<listitem><simpara>  accelerator keyval
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accelerator_mods</parameter>&#160;:</term>
<listitem><simpara> accelerator modifier mask
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a newly-allocated string representing the accelerator.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-accelerator-set-default-mod-mask" role="function">
<title>gtk_accelerator_set_default_mod_mask ()</title>
<indexterm zone="gtk-accelerator-set-default-mod-mask"><primary sortas="accelerator_set_default_mod_mask">gtk_accelerator_set_default_mod_mask</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_accelerator_set_default_mod_mask
                                                        (<link linkend="GdkModifierType">GdkModifierType</link> default_mod_mask);</programlisting>
<para>
Sets the modifiers that will be considered significant for keyboard
accelerators. The default mod mask is <link linkend="GDK-CONTROL-MASK--CAPS"><type>GDK_CONTROL_MASK</type></link> |
<link linkend="GDK-SHIFT-MASK--CAPS"><type>GDK_SHIFT_MASK</type></link> | <link linkend="GDK-MOD1-MASK--CAPS"><type>GDK_MOD1_MASK</type></link> | <link linkend="GDK-SUPER-MASK--CAPS"><type>GDK_SUPER_MASK</type></link> | 
<link linkend="GDK-HYPER-MASK--CAPS"><type>GDK_HYPER_MASK</type></link> | <link linkend="GDK-META-MASK--CAPS"><type>GDK_META_MASK</type></link>, that is, Control, Shift, Alt, 
Super, Hyper and Meta. Other modifiers will by default be ignored 
by <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link>.
You must include at least the three modifiers Control, Shift
and Alt in any value you pass to this function.
</para>
<para>
The default mod mask should be changed on application startup,
before using any accelerator groups.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>default_mod_mask</parameter>&#160;:</term>
<listitem><simpara> accelerator modifier mask
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-accelerator-get-default-mod-mask" role="function">
<title>gtk_accelerator_get_default_mod_mask ()</title>
<indexterm zone="gtk-accelerator-get-default-mod-mask"><primary sortas="accelerator_get_default_mod_mask">gtk_accelerator_get_default_mod_mask</primary></indexterm><programlisting><link linkend="guint">guint</link>               gtk_accelerator_get_default_mod_mask
                                                        (void);</programlisting>
<para>
Gets the value set by <link linkend="gtk-accelerator-set-default-mod-mask"><function>gtk_accelerator_set_default_mod_mask()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the default accelerator modifier mask
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="gtk-Keyboard-Accelerators.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkAccelGroup--is-locked" role="property"><title>The <literal>&quot;is-locked&quot;</literal> property</title>
<indexterm zone="GtkAccelGroup--is-locked"><primary sortas="AccelGroup:is-locked">GtkAccelGroup:is-locked</primary></indexterm><programlisting>  &quot;is-locked&quot;                <link linkend="gboolean">gboolean</link>              : Read</programlisting>
<para>Is the accel group locked.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkAccelGroup--modifier-mask" role="property"><title>The <literal>&quot;modifier-mask&quot;</literal> property</title>
<indexterm zone="GtkAccelGroup--modifier-mask"><primary sortas="AccelGroup:modifier-mask">GtkAccelGroup:modifier-mask</primary></indexterm><programlisting>  &quot;modifier-mask&quot;            <link linkend="GdkModifierType">GdkModifierType</link>       : Read</programlisting>
<para>Modifier Mask.</para><para>Default value: GDK_SHIFT_MASK|GDK_CONTROL_MASK|GDK_MOD1_MASK|GDK_SUPER_MASK|GDK_HYPER_MASK|GDK_META_MASK</para>
</refsect2>
</refsect1>

<refsect1 id="gtk-Keyboard-Accelerators.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkAccelGroup-accel-activate" role="signal"><title>The <literal>&quot;accel-activate&quot;</literal> signal</title>
<indexterm zone="GtkAccelGroup-accel-activate"><primary sortas="AccelGroup::accel-activate">GtkAccelGroup::accel-activate</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            user_function                      (<link linkend="GtkAccelGroup">GtkAccelGroup</link>  *accel_group,
                                                        <link linkend="GObject">GObject</link>        *acceleratable,
                                                        <link linkend="guint">guint</link>           keyval,
                                                        <link linkend="GdkModifierType">GdkModifierType</link> modifier,
                                                        <link linkend="gpointer">gpointer</link>        user_data)          : Has Details</programlisting>
<para>
The accel-activate signal is an implementation detail of
<link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> and not meant to be used by applications.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>acceleratable</parameter>&#160;:</term>
<listitem><simpara> the object on which the accelerator was activated
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>keyval</parameter>&#160;:</term>
<listitem><simpara> the accelerator keyval
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>modifier</parameter>&#160;:</term>
<listitem><simpara> the modifier combination of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the accelerator was activated
</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkAccelGroup-accel-changed" role="signal"><title>The <literal>&quot;accel-changed&quot;</literal> signal</title>
<indexterm zone="GtkAccelGroup-accel-changed"><primary sortas="AccelGroup::accel-changed">GtkAccelGroup::accel-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkAccelGroup">GtkAccelGroup</link>  *accel_group,
                                                        <link linkend="guint">guint</link>           keyval,
                                                        <link linkend="GdkModifierType">GdkModifierType</link> modifier,
                                                        <link linkend="GClosure">GClosure</link>       *accel_closure,
                                                        <link linkend="gpointer">gpointer</link>        user_data)          : Run First / Has Details</programlisting>
<para>
The accel-changed signal is emitted when a <link linkend="GtkAccelGroupEntry"><type>GtkAccelGroupEntry</type></link>
is added to or removed from the accel group.
</para>
<para>
Widgets like <link linkend="GtkAccelLabel"><type>GtkAccelLabel</type></link> which display an associated 
accelerator should connect to this signal, and rebuild 
their visual representation if the <parameter>accel_closure</parameter> is theirs.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>accel_group</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>keyval</parameter>&#160;:</term>
<listitem><simpara> the accelerator keyval
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>modifier</parameter>&#160;:</term>
<listitem><simpara> the modifier combination of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_closure</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="GClosure"><type>GClosure</type></link> of the accelerator
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>


<refsect1 id="gtk-Keyboard-Accelerators.see-also">
<title>See Also</title>
<para>
<link linkend="gtk-window-add-accel-group"><function>gtk_window_add_accel_group()</function></link>, <link linkend="gtk-accel-map-change-entry"><function>gtk_accel_map_change_entry()</function></link>,
<link linkend="gtk-item-factory-new"><function>gtk_item_factory_new()</function></link>, <link linkend="gtk-label-new-with-mnemonic"><function>gtk_label_new_with_mnemonic()</function></link>
</para>
</refsect1>

</refentry>
