<?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 pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkShortcutController">
<refmeta>
<refentrytitle role="top_of_page" id="GtkShortcutController.top_of_page">GtkShortcutController</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkShortcutController</refname>
<refpurpose>Event controller for shortcuts</refpurpose>
</refnamediv>

<refsect1 id="GtkShortcutController.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkEventController"><returnvalue>GtkEventController</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-shortcut-controller-new">gtk_shortcut_controller_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkEventController"><returnvalue>GtkEventController</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-shortcut-controller-new-for-model">gtk_shortcut_controller_new_for_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-controller-set-mnemonics-modifiers">gtk_shortcut_controller_set_mnemonics_modifiers</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GdkModifierType"><returnvalue>GdkModifierType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-controller-get-mnemonics-modifiers">gtk_shortcut_controller_get_mnemonics_modifiers</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-controller-set-scope">gtk_shortcut_controller_set_scope</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkShortcutScope"><returnvalue>GtkShortcutScope</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-controller-get-scope">gtk_shortcut_controller_get_scope</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-controller-add-shortcut">gtk_shortcut_controller_add_shortcut</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-controller-remove-shortcut">gtk_shortcut_controller_remove_shortcut</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkShortcutController.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="GdkModifierType"><type>GdkModifierType</type></link></entry><entry role="property_name"><link linkend="GtkShortcutController--mnemonic-modifiers">mnemonic-modifiers</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GListModel"><type>GListModel</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkShortcutController--model">model</link></entry><entry role="property_flags">Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GtkShortcutScope"><type>GtkShortcutScope</type></link></entry><entry role="property_name"><link linkend="GtkShortcutController--scope">scope</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="GtkShortcutManager"/><refsect1 id="GtkShortcutController.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkShortcutController-struct">GtkShortcutController</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkShortcutScope">GtkShortcutScope</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkShortcutManager-struct">GtkShortcutManager</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkShortcutManagerInterface">GtkShortcutManagerInterface</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkShortcutController.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GInterface">GInterface</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkShortcutManager
    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkEventController">GtkEventController</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkShortcutController
</screen>
</refsect1>
<refsect1 id="GtkShortcutController.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GtkShortcutManager requires
 <link linkend="GObject">GObject</link>.</para>

</refsect1>
<refsect1 id="GtkShortcutController.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkShortcutController implements
 <link linkend="GListModel">GListModel</link> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>

</refsect1>
<refsect1 id="GtkShortcutController.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
GtkShortcutManager is implemented by
 <link linkend="GtkAboutDialog">GtkAboutDialog</link>,  <link linkend="GtkAppChooserDialog">GtkAppChooserDialog</link>,  <link linkend="GtkApplicationWindow">GtkApplicationWindow</link>,  <link linkend="GtkAssistant">GtkAssistant</link>,  <link linkend="GtkColorChooserDialog">GtkColorChooserDialog</link>,  <link linkend="GtkDialog">GtkDialog</link>,  <link linkend="GtkEmojiChooser">GtkEmojiChooser</link>,  <link linkend="GtkFileChooserDialog">GtkFileChooserDialog</link>,  <link linkend="GtkFontChooserDialog">GtkFontChooserDialog</link>,  <link linkend="GtkMessageDialog">GtkMessageDialog</link>,  <link linkend="GtkPageSetupUnixDialog">GtkPageSetupUnixDialog</link>,  <link linkend="GtkPopover">GtkPopover</link>,  <link linkend="GtkPopoverMenu">GtkPopoverMenu</link>,  <link linkend="GtkPrintUnixDialog">GtkPrintUnixDialog</link>,  <link linkend="GtkShortcutsWindow">GtkShortcutsWindow</link> and  <link linkend="GtkWindow">GtkWindow</link>.</para>

</refsect1>

<refsect1 id="GtkShortcutController.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkShortcutController.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> is an event controller that manages shortcuts.</para>
<para>Most common shortcuts are using this controller implicitly, e.g. by
adding a mnemonic underline to a <link linkend="GtkLabel"><type>GtkLabel</type></link>, or by installing a key
binding using <link linkend="gtk-widget-class-add-binding"><function>gtk_widget_class_add_binding()</function></link>, or by adding accelerators
to global actions using <link linkend="gtk-application-set-accels-for-action"><function>gtk_application_set_accels_for_action()</function></link>.</para>
<para>But it is possible to create your own shortcut controller, and add
shortcuts to it.</para>
<para><link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> implements <link linkend="GListModel"><type>GListModel</type></link> for querying the shortcuts that
have been added to it.</para>
<refsect2><title>GtkShortcutController as a GtkBuildable</title><para>GtkShortcutControllers can be creates in ui files to set up shortcuts
in the same place as the widgets.</para>
<para>An example of a UI definition fragment with GtkShortcutController:</para>
<informalexample><programlisting role="example"><![CDATA[
  <object class='GtkButton'>
    <child>
      <object class='GtkShortcutController'>
        <property name='scope'>managed</property>
        <child>
          <object class='GtkShortcut'>
            <property name='trigger'><Control>k</property>
            <property name='action'>activate</property>
          </object>
        </child>
      </object>
    </child>
  </object>
]]></programlisting></informalexample>
<para></para>
</refsect2>

</refsect1>
<refsect1 id="GtkShortcutController.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-shortcut-controller-new" role="function">
<title>gtk_shortcut_controller_new&#160;()</title>
<indexterm zone="gtk-shortcut-controller-new"><primary>gtk_shortcut_controller_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkEventController"><returnvalue>GtkEventController</returnvalue></link>&#160;*
gtk_shortcut_controller_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new shortcut controller.</para>
<refsect3 id="gtk-shortcut-controller-new.returns" role="returns">
<title>Returns</title>
<para> a newly created shortcut controller</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-controller-new-for-model" role="function">
<title>gtk_shortcut_controller_new_for_model&#160;()</title>
<indexterm zone="gtk-shortcut-controller-new-for-model"><primary>gtk_shortcut_controller_new_for_model</primary></indexterm>
<programlisting language="C"><link linkend="GtkEventController"><returnvalue>GtkEventController</returnvalue></link>&#160;*
gtk_shortcut_controller_new_for_model (<parameter><link linkend="GListModel"><type>GListModel</type></link> *model</parameter>);</programlisting>
<para>Creates a new shortcut controller that takes its shortcuts from
the given list model.</para>
<para>A controller created by this function does not let you add or
remove individual shortcuts using the shortcut controller api,
but you can change the contents of the model.</para>
<refsect3 id="gtk-shortcut-controller-new-for-model.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GListModel"><type>GListModel</type></link> containing shortcuts</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-controller-new-for-model.returns" role="returns">
<title>Returns</title>
<para> a newly created shortcut controller</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-controller-set-mnemonics-modifiers" role="function">
<title>gtk_shortcut_controller_set_mnemonics_modifiers&#160;()</title>
<indexterm zone="gtk-shortcut-controller-set-mnemonics-modifiers"><primary>gtk_shortcut_controller_set_mnemonics_modifiers</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_shortcut_controller_set_mnemonics_modifiers
                               (<parameter><link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> *self</parameter>,
                                <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> modifiers</parameter>);</programlisting>
<para>Sets the controller to have the given <parameter>mnemonics_modifiers</parameter>
.</para>
<para>The mnemonics modifiers determines which modifiers need to be pressed to allow
activation of shortcuts with mnemonics triggers.</para>
<para>GTK normally uses the Alt modifier for mnemonics, except in <link linkend="GtkPopoverMenus"><type>GtkPopoverMenus</type></link>,
where mnemonics can be triggered without any modifiers. It should be very
rarely necessary to change this, and doing so is likely to interfere with
other shortcuts.</para>
<para>This value is only relevant for local shortcut controllers. Global and managed
shortcut controllers will have their shortcuts activated from other places which
have their own modifiers for activating mnemonics.</para>
<refsect3 id="gtk-shortcut-controller-set-mnemonics-modifiers.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutController"><type>GtkShortcutController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>modifiers</para></entry>
<entry role="parameter_description"><para>the new mnemonics_modifiers to use</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-controller-get-mnemonics-modifiers" role="function">
<title>gtk_shortcut_controller_get_mnemonics_modifiers&#160;()</title>
<indexterm zone="gtk-shortcut-controller-get-mnemonics-modifiers"><primary>gtk_shortcut_controller_get_mnemonics_modifiers</primary></indexterm>
<programlisting language="C"><link linkend="GdkModifierType"><returnvalue>GdkModifierType</returnvalue></link>
gtk_shortcut_controller_get_mnemonics_modifiers
                               (<parameter><link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> *self</parameter>);</programlisting>
<para>Gets the mnemonics modifiers for when this controller activates its shortcuts. See
<link linkend="gtk-shortcut-controller-set-mnemonics-modifiers"><function>gtk_shortcut_controller_set_mnemonics_modifiers()</function></link> for details.</para>
<refsect3 id="gtk-shortcut-controller-get-mnemonics-modifiers.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutController"><type>GtkShortcutController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-controller-get-mnemonics-modifiers.returns" role="returns">
<title>Returns</title>
<para> the controller's mnemonics modifiers</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-controller-set-scope" role="function">
<title>gtk_shortcut_controller_set_scope&#160;()</title>
<indexterm zone="gtk-shortcut-controller-set-scope"><primary>gtk_shortcut_controller_set_scope</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_shortcut_controller_set_scope (<parameter><link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> *self</parameter>,
                                   <parameter><link linkend="GtkShortcutScope"><type>GtkShortcutScope</type></link> scope</parameter>);</programlisting>
<para>Sets the controller to have the given <parameter>scope</parameter>
.</para>
<para>The scope allows shortcuts to be activated outside of the normal
event propagation. In particular, it allows installing global
keyboard shortcuts that can be activated even when a widget does
not have focus.</para>
<para>With <link linkend="GTK-SHORTCUT-SCOPE-LOCAL:CAPS"><literal>GTK_SHORTCUT_SCOPE_LOCAL</literal></link>, shortcuts will only be activated
when the widget has focus.</para>
<refsect3 id="gtk-shortcut-controller-set-scope.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutController"><type>GtkShortcutController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>scope</para></entry>
<entry role="parameter_description"><para>the new scope to use</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-controller-get-scope" role="function">
<title>gtk_shortcut_controller_get_scope&#160;()</title>
<indexterm zone="gtk-shortcut-controller-get-scope"><primary>gtk_shortcut_controller_get_scope</primary></indexterm>
<programlisting language="C"><link linkend="GtkShortcutScope"><returnvalue>GtkShortcutScope</returnvalue></link>
gtk_shortcut_controller_get_scope (<parameter><link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> *self</parameter>);</programlisting>
<para>Gets the scope for when this controller activates its shortcuts. See
<link linkend="gtk-shortcut-controller-set-scope"><function>gtk_shortcut_controller_set_scope()</function></link> for details.</para>
<refsect3 id="gtk-shortcut-controller-get-scope.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutController"><type>GtkShortcutController</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-controller-get-scope.returns" role="returns">
<title>Returns</title>
<para> the controller's scope</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-controller-add-shortcut" role="function">
<title>gtk_shortcut_controller_add_shortcut&#160;()</title>
<indexterm zone="gtk-shortcut-controller-add-shortcut"><primary>gtk_shortcut_controller_add_shortcut</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_shortcut_controller_add_shortcut (<parameter><link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> *self</parameter>,
                                      <parameter><link linkend="GtkShortcut"><type>GtkShortcut</type></link> *shortcut</parameter>);</programlisting>
<para>Adds <parameter>shortcut</parameter>
 to the list of shortcuts handled by <parameter>self</parameter>
.</para>
<para>If this controller uses an external shortcut list, this
function does nothing.</para>
<refsect3 id="gtk-shortcut-controller-add-shortcut.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the controller</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>shortcut</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcut"><type>GtkShortcut</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-controller-remove-shortcut" role="function">
<title>gtk_shortcut_controller_remove_shortcut&#160;()</title>
<indexterm zone="gtk-shortcut-controller-remove-shortcut"><primary>gtk_shortcut_controller_remove_shortcut</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_shortcut_controller_remove_shortcut
                               (<parameter><link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> *self</parameter>,
                                <parameter><link linkend="GtkShortcut"><type>GtkShortcut</type></link> *shortcut</parameter>);</programlisting>
<para>Removes <parameter>shortcut</parameter>
 from the list of shortcuts handled by <parameter>self</parameter>
.</para>
<para>If <parameter>shortcut</parameter>
 had not been added to <parameter>controller</parameter>
 or this controller
uses an external shortcut list, this function does nothing.</para>
<refsect3 id="gtk-shortcut-controller-remove-shortcut.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the controller</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>shortcut</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcut"><type>GtkShortcut</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkShortcutController.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkShortcutController-struct" role="struct">
<title>GtkShortcutController</title>
<indexterm zone="GtkShortcutController-struct"><primary>GtkShortcutController</primary></indexterm>
<programlisting language="C">typedef struct _GtkShortcutController GtkShortcutController;</programlisting>
</refsect2>
<refsect2 id="GtkShortcutScope" role="enum">
<title>enum GtkShortcutScope</title>
<indexterm zone="GtkShortcutScope"><primary>GtkShortcutScope</primary></indexterm>
<para>Describes where <link linkend="GtkShortcuts"><type>GtkShortcuts</type></link> added to a
<link linkend="GtkShortcutController"><type>GtkShortcutController</type></link> get handled.</para>
<refsect3 id="GtkShortcutScope.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SHORTCUT-SCOPE-LOCAL:CAPS">GTK_SHORTCUT_SCOPE_LOCAL</para></entry>
<entry role="enum_member_description"><para>Shortcuts are handled inside
the widget the controller belongs to.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SHORTCUT-SCOPE-MANAGED:CAPS">GTK_SHORTCUT_SCOPE_MANAGED</para></entry>
<entry role="enum_member_description"><para>Shortcuts are handled by
the first ancestor that is a <link linkend="GtkShortcutManager"><type>GtkShortcutManager</type></link></para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SHORTCUT-SCOPE-GLOBAL:CAPS">GTK_SHORTCUT_SCOPE_GLOBAL</para></entry>
<entry role="enum_member_description"><para>Shortcuts are handled by
the root widget.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GtkShortcutManager-struct" role="struct">
<title>GtkShortcutManager</title>
<indexterm zone="GtkShortcutManager-struct"><primary>GtkShortcutManager</primary></indexterm>
<programlisting language="C">typedef struct _GtkShortcutManager GtkShortcutManager;</programlisting>
<para>This object is used to implement support for <link linkend="GtkShortcutScopes"><type>GtkShortcutScopes</type></link>. Every
widget that implements <link linkend="GtkShortcutManager"><type>GtkShortcutManager</type></link> will be used as a
<link linkend="GTK-SHORTCUT-SCOPE-MANAGED:CAPS"><literal>GTK_SHORTCUT_SCOPE_MANAGED</literal></link>.</para>
</refsect2>
<refsect2 id="GtkShortcutManagerInterface" role="struct">
<title>struct GtkShortcutManagerInterface</title>
<indexterm zone="GtkShortcutManagerInterface"><primary>GtkShortcutManagerInterface</primary></indexterm>
<programlisting language="C">struct GtkShortcutManagerInterface {
  void                  (* add_controller)              (GtkShortcutManager           *self,
                                                         GtkShortcutController        *controller);
  void                  (* remove_controller)           (GtkShortcutManager           *self,
                                                         GtkShortcutController        *controller);
};
</programlisting>
<para>The list of functions that can be implemented for the <link linkend="GtkShortcutManager"><type>GtkShortcutManager</type></link> interface.</para>
<para>Note that no function is mandatory to implement, the default implementation will work
fine.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkShortcutController.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkShortcutController--mnemonic-modifiers" role="property"><title>The <literal>“mnemonic-modifiers”</literal> property</title>
<indexterm zone="GtkShortcutController--mnemonic-modifiers"><primary>GtkShortcutController:mnemonic-modifiers</primary></indexterm>
<programlisting>  “mnemonic-modifiers”       <link linkend="GdkModifierType"><type>GdkModifierType</type></link></programlisting>
<para>The modifiers that need to be pressed to allow mnemonics activation.</para>
<para>Owner: GtkShortcutController</para>
<para>Flags: Read / Write</para>
<para>Default value: GDK_ALT_MASK</para>
</refsect2>
<refsect2 id="GtkShortcutController--model" role="property"><title>The <literal>“model”</literal> property</title>
<indexterm zone="GtkShortcutController--model"><primary>GtkShortcutController:model</primary></indexterm>
<programlisting>  “model”                    <link linkend="GListModel"><type>GListModel</type></link>&#160;*</programlisting>
<para>A list model to take shortcuts from</para>
<para>Owner: GtkShortcutController</para>
<para>Flags: Write / Construct&#160;Only</para>
</refsect2>
<refsect2 id="GtkShortcutController--scope" role="property"><title>The <literal>“scope”</literal> property</title>
<indexterm zone="GtkShortcutController--scope"><primary>GtkShortcutController:scope</primary></indexterm>
<programlisting>  “scope”                    <link linkend="GtkShortcutScope"><type>GtkShortcutScope</type></link></programlisting>
<para>What scope the shortcuts will be handled in.</para>
<para>Owner: GtkShortcutController</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_SHORTCUT_SCOPE_LOCAL</para>
</refsect2>

</refsect1>
<refsect1 id="GtkShortcutController.see-also">
<title>See Also</title>
<para><link linkend="GtkEventController"><type>GtkEventController</type></link>, <link linkend="GtkShortcut"><type>GtkShortcut</type></link></para>

</refsect1>

</refentry>
