<?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="GtkShortcutTrigger">
<refmeta>
<refentrytitle role="top_of_page" id="GtkShortcutTrigger.top_of_page">GtkShortcutTrigger</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkShortcutTrigger</refname>
<refpurpose>Triggers to track if shortcuts should be activated</refpurpose>
</refnamediv>

<refsect1 id="GtkShortcutTrigger.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="GdkKeyMatch"><returnvalue>GdkKeyMatch</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-trigger-trigger">gtk_shortcut_trigger_trigger</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-trigger-hash">gtk_shortcut_trigger_hash</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-trigger-equal">gtk_shortcut_trigger_equal</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-trigger-compare">gtk_shortcut_trigger_compare</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-shortcut-trigger-to-string">gtk_shortcut_trigger_to_string</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-trigger-print">gtk_shortcut_trigger_print</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-shortcut-trigger-to-label">gtk_shortcut_trigger_to_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-shortcut-trigger-print-label">gtk_shortcut_trigger_print_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-shortcut-trigger-parse-string">gtk_shortcut_trigger_parse_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-keyval-trigger-new">gtk_keyval_trigger_new</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-keyval-trigger-get-modifiers">gtk_keyval_trigger_get_modifiers</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-keyval-trigger-get-keyval">gtk_keyval_trigger_get_keyval</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-mnemonic-trigger-new">gtk_mnemonic_trigger_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-mnemonic-trigger-get-keyval">gtk_mnemonic_trigger_get_keyval</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-alternative-trigger-new">gtk_alternative_trigger_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-alternative-trigger-get-first">gtk_alternative_trigger_get_first</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-alternative-trigger-get-second">gtk_alternative_trigger_get_second</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-never-trigger-get">gtk_never_trigger_get</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="GtkKeyvalTrigger"/><anchor id="GtkAlternativeTrigger"/><anchor id="GtkNeverTrigger"/><refsect1 id="GtkShortcutTrigger.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="GtkShortcutTrigger-struct">GtkShortcutTrigger</link></entry></row>

<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkKeyvalTrigger-struct">GtkKeyvalTrigger</link></entry></row>

<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkMnemonicTrigger">GtkMnemonicTrigger</link></entry></row>

<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkAlternativeTrigger-struct">GtkAlternativeTrigger</link></entry></row>

<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkNeverTrigger-struct">GtkNeverTrigger</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkShortcutTrigger.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkShortcutTrigger
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> GtkKeyvalTrigger
        <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> GtkNeverTrigger
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkAlternativeTrigger
</screen>
</refsect1>

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

<refsect1 id="GtkShortcutTrigger.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> is the object used to track if a <link linkend="GtkShortcut"><type>GtkShortcut</type></link> should be
activated. For this purpose, <link linkend="gtk-shortcut-trigger-trigger"><function>gtk_shortcut_trigger_trigger()</function></link> can be called
on a <link linkend="GdkEvent"><type>GdkEvent</type></link>.</para>
<para><link linkend="GtkShortcutTriggers"><type>GtkShortcutTriggers</type></link> contain functions that allow easy presentation to end
users as well as being printed for debugging.</para>
<para>All <link linkend="GtkShortcutTriggers"><type>GtkShortcutTriggers</type></link> are immutable, you can only specify their properties
during construction. If you want to change a trigger, you have to replace it
with a new one.</para>

</refsect1>
<refsect1 id="GtkShortcutTrigger.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-shortcut-trigger-trigger" role="function">
<title>gtk_shortcut_trigger_trigger&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-trigger"><primary>gtk_shortcut_trigger_trigger</primary></indexterm>
<programlisting language="C"><link linkend="GdkKeyMatch"><returnvalue>GdkKeyMatch</returnvalue></link>
gtk_shortcut_trigger_trigger (<parameter><link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> *self</parameter>,
                              <parameter><link linkend="GdkEvent"><type>GdkEvent</type></link> *event</parameter>,
                              <parameter><link linkend="gboolean"><type>gboolean</type></link> enable_mnemonics</parameter>);</programlisting>
<para>Checks if the given <parameter>event</parameter>
 triggers <parameter>self</parameter>
.</para>
<refsect3 id="gtk-shortcut-trigger-trigger.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="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>event</para></entry>
<entry role="parameter_description"><para>the event to check</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>enable_mnemonics</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if mnemonics should trigger. Usually the
value of this property is determined by checking that the passed
in <parameter>event</parameter>
is a Key event and has the right modifiers set.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-trigger-trigger.returns" role="returns">
<title>Returns</title>
<para> Whether the event triggered the shortcut</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-trigger-hash" role="function">
<title>gtk_shortcut_trigger_hash&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-hash"><primary>gtk_shortcut_trigger_hash</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_shortcut_trigger_hash (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> trigger</parameter>);</programlisting>
<para>Generates a hash value for a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>.</para>
<para>The output of this function is guaranteed to be the same for a given
value only per-process.  It may change between different processor
architectures or even different versions of GTK.  Do not use this
function as a basis for building protocols or file formats.</para>
<para>The types of <parameter>trigger</parameter>
 is <link linkend="gconstpointer"><type>gconstpointer</type></link> only to allow use of this
function with <link linkend="GHashTable"><type>GHashTable</type></link>. They must each be a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>.</para>
<refsect3 id="gtk-shortcut-trigger-hash.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>trigger</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GtkShortcutTrigger]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-trigger-hash.returns" role="returns">
<title>Returns</title>
<para> a hash value corresponding to <parameter>trigger</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-trigger-equal" role="function">
<title>gtk_shortcut_trigger_equal&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-equal"><primary>gtk_shortcut_trigger_equal</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_shortcut_trigger_equal (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> trigger1</parameter>,
                            <parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> trigger2</parameter>);</programlisting>
<para>Checks if <parameter>trigger1</parameter>
 and <parameter>trigger2</parameter>
 trigger under the same conditions.</para>
<para>The types of <parameter>one</parameter>
 and <parameter>two</parameter>
 are <link linkend="gconstpointer"><type>gconstpointer</type></link> only to allow use of this
function with <link linkend="GHashTable"><type>GHashTable</type></link>. They must each be a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>.</para>
<refsect3 id="gtk-shortcut-trigger-equal.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>trigger1</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GtkShortcutTrigger]</emphasis></entry></row>
<row><entry role="parameter_name"><para>trigger2</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GtkShortcutTrigger]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-trigger-equal.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>trigger1</parameter>
and <parameter>trigger2</parameter>
are equal</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-trigger-compare" role="function">
<title>gtk_shortcut_trigger_compare&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-compare"><primary>gtk_shortcut_trigger_compare</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_shortcut_trigger_compare (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> trigger1</parameter>,
                              <parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> trigger2</parameter>);</programlisting>
<para>The types of <parameter>trigger1</parameter>
 and <parameter>trigger2</parameter>
 are <link linkend="gconstpointer"><type>gconstpointer</type></link> only to allow
use of this function as a <link linkend="GCompareFunc"><type>GCompareFunc</type></link>. They must each be a
<link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>.</para>
<refsect3 id="gtk-shortcut-trigger-compare.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>trigger1</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GtkShortcutTrigger]</emphasis></entry></row>
<row><entry role="parameter_name"><para>trigger2</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>type</acronym> GtkShortcutTrigger]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-trigger-compare.returns" role="returns">
<title>Returns</title>
<para> An integer less than, equal to, or greater than zero if
<parameter>trigger1</parameter>
is found, respectively, to be less than, to match,
or be greater than <parameter>trigger2</parameter>
.</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-trigger-to-string" role="function">
<title>gtk_shortcut_trigger_to_string&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-to-string"><primary>gtk_shortcut_trigger_to_string</primary></indexterm>
<programlisting language="C"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_shortcut_trigger_to_string (<parameter><link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> *self</parameter>);</programlisting>
<para>Prints the given trigger into a human-readable string.
This is a small wrapper around <link linkend="gtk-shortcut-trigger-print"><function>gtk_shortcut_trigger_print()</function></link>
to help when debugging.</para>
<refsect3 id="gtk-shortcut-trigger-to-string.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="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-trigger-to-string.returns" role="returns">
<title>Returns</title>
<para>a new string. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-trigger-print" role="function">
<title>gtk_shortcut_trigger_print&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-print"><primary>gtk_shortcut_trigger_print</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_shortcut_trigger_print (<parameter><link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> *self</parameter>,
                            <parameter><link linkend="GString"><type>GString</type></link> *string</parameter>);</programlisting>
<para>Prints the given trigger into a string for the developer.
This is meant for debugging and logging.</para>
<para>The form of the representation may change at any time
and is not guaranteed to stay identical.</para>
<refsect3 id="gtk-shortcut-trigger-print.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="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>string</para></entry>
<entry role="parameter_description"><para>a <link linkend="GString"><type>GString</type></link> to print into</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-trigger-to-label" role="function">
<title>gtk_shortcut_trigger_to_label&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-to-label"><primary>gtk_shortcut_trigger_to_label</primary></indexterm>
<programlisting language="C"><link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_shortcut_trigger_to_label (<parameter><link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> *self</parameter>,
                               <parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>);</programlisting>
<para>Gets textual representation for the given trigger. This
function is returning a translated string for presentation
to end users for example in menu items or in help texts.</para>
<para>The <parameter>display</parameter>
 in use may influence the resulting string in
various forms, such as resolving hardware keycodes or by
causing display-specific modifier names.</para>
<para>The form of the representation may change at any time and is
not guaranteed to stay identical.</para>
<refsect3 id="gtk-shortcut-trigger-to-label.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="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para><link linkend="GdkDisplay"><type>GdkDisplay</type></link> to print for</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-trigger-to-label.returns" role="returns">
<title>Returns</title>
<para>a new string. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-trigger-print-label" role="function">
<title>gtk_shortcut_trigger_print_label&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-print-label"><primary>gtk_shortcut_trigger_print_label</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_shortcut_trigger_print_label (<parameter><link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> *self</parameter>,
                                  <parameter><link linkend="GdkDisplay"><type>GdkDisplay</type></link> *display</parameter>,
                                  <parameter><link linkend="GString"><type>GString</type></link> *string</parameter>);</programlisting>
<para>Prints the given trigger into a string. This function is
returning a translated string for presentation to end users
for example in menu items or in help texts.</para>
<para>The <parameter>display</parameter>
 in use may influence the resulting string in
various forms, such as resolving hardware keycodes or by
causing display-specific modifier names.</para>
<para>The form of the representation may change at any time and is
not guaranteed to stay identical.</para>
<refsect3 id="gtk-shortcut-trigger-print-label.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="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>display</para></entry>
<entry role="parameter_description"><para><link linkend="GdkDisplay"><type>GdkDisplay</type></link> to print for</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>string</para></entry>
<entry role="parameter_description"><para>a <link linkend="GString"><type>GString</type></link> to print into</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-trigger-print-label.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if something was printed or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if the
trigger did not have a textual representation suitable
for end users.</para>
</refsect3></refsect2>
<refsect2 id="gtk-shortcut-trigger-parse-string" role="function">
<title>gtk_shortcut_trigger_parse_string&#160;()</title>
<indexterm zone="gtk-shortcut-trigger-parse-string"><primary>gtk_shortcut_trigger_parse_string</primary></indexterm>
<programlisting language="C"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
gtk_shortcut_trigger_parse_string (<parameter>const <link linkend="char"><type>char</type></link> *string</parameter>);</programlisting>
<para>Tries to parse the given string into a trigger. On success,
the parsed trigger is returned. When parsing failed, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is
returned.</para>
<para>The accepted strings are:</para>
<itemizedlist>
<listitem><para><literal>never</literal>, for <link linkend="GtkNeverTrigger"><type>GtkNeverTrigger</type></link></para></listitem>
<listitem><para>a string parsed by <link linkend="gtk-accelerator-parse"><function>gtk_accelerator_parse()</function></link>, for a <link linkend="GtkKeyvalTrigger"><type>GtkKeyvalTrigger</type></link>, e.g. <literal>&lt;Control&gt;C</literal></para></listitem>
<listitem><para>underscore, followed by a single character, for MnemonicTrigger, e.g. <literal>_l</literal></para></listitem>
<listitem><para>two valid trigger strings, separated by a <literal>|</literal> character, for a
<link linkend="GtkAlternativeTrigger"><type>GtkAlternativeTrigger</type></link>: <literal>&lt;Control&gt;q|&amp;lt;Control&gt;w</literal></para></listitem>
</itemizedlist>

<para><emphasis role="annotation">[<acronym>constructor</acronym>]</emphasis></para><refsect3 id="gtk-shortcut-trigger-parse-string.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>string</para></entry>
<entry role="parameter_description"><para>the string to parse</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-shortcut-trigger-parse-string.returns" role="returns">
<title>Returns</title>
<para>a new <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on error. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-keyval-trigger-new" role="function">
<title>gtk_keyval_trigger_new&#160;()</title>
<indexterm zone="gtk-keyval-trigger-new"><primary>gtk_keyval_trigger_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
gtk_keyval_trigger_new (<parameter><link linkend="guint"><type>guint</type></link> keyval</parameter>,
                        <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> modifiers</parameter>);</programlisting>
<para>Creates a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> that will trigger whenever
the key with the given <parameter>keyval</parameter>
 and <parameter>modifiers</parameter>
 is pressed.</para>
<refsect3 id="gtk-keyval-trigger-new.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>keyval</para></entry>
<entry role="parameter_description"><para>The keyval to trigger for</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>modifiers</para></entry>
<entry role="parameter_description"><para>the modifiers that need to be present</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-keyval-trigger-new.returns" role="returns">
<title>Returns</title>
<para> A new <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-keyval-trigger-get-modifiers" role="function">
<title>gtk_keyval_trigger_get_modifiers&#160;()</title>
<indexterm zone="gtk-keyval-trigger-get-modifiers"><primary>gtk_keyval_trigger_get_modifiers</primary></indexterm>
<programlisting language="C"><link linkend="GdkModifierType"><returnvalue>GdkModifierType</returnvalue></link>
gtk_keyval_trigger_get_modifiers (<parameter><link linkend="GtkKeyvalTrigger"><type>GtkKeyvalTrigger</type></link> *self</parameter>);</programlisting>
<para>Gets the modifiers that must be present to succeed
triggering <parameter>self</parameter>
.</para>
<refsect3 id="gtk-keyval-trigger-get-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 keyval <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-keyval-trigger-get-modifiers.returns" role="returns">
<title>Returns</title>
<para> the modifiers</para>
</refsect3></refsect2>
<refsect2 id="gtk-keyval-trigger-get-keyval" role="function">
<title>gtk_keyval_trigger_get_keyval&#160;()</title>
<indexterm zone="gtk-keyval-trigger-get-keyval"><primary>gtk_keyval_trigger_get_keyval</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_keyval_trigger_get_keyval (<parameter><link linkend="GtkKeyvalTrigger"><type>GtkKeyvalTrigger</type></link> *self</parameter>);</programlisting>
<para>Gets the keyval that must be pressed to succeed
triggering <parameter>self</parameter>
.</para>
<refsect3 id="gtk-keyval-trigger-get-keyval.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 keyval <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-keyval-trigger-get-keyval.returns" role="returns">
<title>Returns</title>
<para> the keyval</para>
</refsect3></refsect2>
<refsect2 id="gtk-mnemonic-trigger-new" role="function">
<title>gtk_mnemonic_trigger_new&#160;()</title>
<indexterm zone="gtk-mnemonic-trigger-new"><primary>gtk_mnemonic_trigger_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
gtk_mnemonic_trigger_new (<parameter><link linkend="guint"><type>guint</type></link> keyval</parameter>);</programlisting>
<para>Creates a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> that will trigger whenever the key with
the given <parameter>keyval</parameter>
 is pressed and mnemonics have been activated.</para>
<para>Mnemonics are activated by calling code when a key event with the right
modifiers is detected.</para>
<refsect3 id="gtk-mnemonic-trigger-new.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>keyval</para></entry>
<entry role="parameter_description"><para>The keyval to trigger for</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-mnemonic-trigger-new.returns" role="returns">
<title>Returns</title>
<para>A new <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>type</acronym> GtkMnemonicTrigger]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-mnemonic-trigger-get-keyval" role="function">
<title>gtk_mnemonic_trigger_get_keyval&#160;()</title>
<indexterm zone="gtk-mnemonic-trigger-get-keyval"><primary>gtk_mnemonic_trigger_get_keyval</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_mnemonic_trigger_get_keyval (<parameter><link linkend="GtkMnemonicTrigger"><type>GtkMnemonicTrigger</type></link> *self</parameter>);</programlisting>
<para>Gets the keyval that must be pressed to succeed triggering <parameter>self</parameter>
.</para>
<refsect3 id="gtk-mnemonic-trigger-get-keyval.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 mnemonic <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-mnemonic-trigger-get-keyval.returns" role="returns">
<title>Returns</title>
<para> the keyval</para>
</refsect3></refsect2>
<refsect2 id="gtk-alternative-trigger-new" role="function">
<title>gtk_alternative_trigger_new&#160;()</title>
<indexterm zone="gtk-alternative-trigger-new"><primary>gtk_alternative_trigger_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
gtk_alternative_trigger_new (<parameter><link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> *first</parameter>,
                             <parameter><link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> *second</parameter>);</programlisting>
<para>Creates a <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> that will trigger whenever
either of the two given triggers gets triggered.</para>
<para>Note that nesting is allowed, so if you want more than two
alternative, create a new alternative trigger for each option.</para>
<refsect3 id="gtk-alternative-trigger-new.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>first</para></entry>
<entry role="parameter_description"><para>The first trigger that may trigger. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>second</para></entry>
<entry role="parameter_description"><para>The second trigger that may trigger. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-alternative-trigger-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-alternative-trigger-get-first" role="function">
<title>gtk_alternative_trigger_get_first&#160;()</title>
<indexterm zone="gtk-alternative-trigger-get-first"><primary>gtk_alternative_trigger_get_first</primary></indexterm>
<programlisting language="C"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
gtk_alternative_trigger_get_first (<parameter><link linkend="GtkAlternativeTrigger"><type>GtkAlternativeTrigger</type></link> *self</parameter>);</programlisting>
<para>Gets the first of the two alternative triggers that may
trigger <parameter>self</parameter>
. <link linkend="gtk-alternative-trigger-get-second"><function>gtk_alternative_trigger_get_second()</function></link> will
return the other one.</para>
<refsect3 id="gtk-alternative-trigger-get-first.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>an alternative <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-alternative-trigger-get-first.returns" role="returns">
<title>Returns</title>
<para>the first alternative trigger. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-alternative-trigger-get-second" role="function">
<title>gtk_alternative_trigger_get_second&#160;()</title>
<indexterm zone="gtk-alternative-trigger-get-second"><primary>gtk_alternative_trigger_get_second</primary></indexterm>
<programlisting language="C"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
gtk_alternative_trigger_get_second (<parameter><link linkend="GtkAlternativeTrigger"><type>GtkAlternativeTrigger</type></link> *self</parameter>);</programlisting>
<para>Gets the second of the two alternative triggers that may
trigger <parameter>self</parameter>
. <link linkend="gtk-alternative-trigger-get-first"><function>gtk_alternative_trigger_get_first()</function></link> will
return the other one.</para>
<refsect3 id="gtk-alternative-trigger-get-second.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>an alternative <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-alternative-trigger-get-second.returns" role="returns">
<title>Returns</title>
<para>the second alternative trigger. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-never-trigger-get" role="function">
<title>gtk_never_trigger_get&#160;()</title>
<indexterm zone="gtk-never-trigger-get"><primary>gtk_never_trigger_get</primary></indexterm>
<programlisting language="C"><link linkend="GtkShortcutTrigger"><returnvalue>GtkShortcutTrigger</returnvalue></link>&#160;*
gtk_never_trigger_get (<parameter><type>void</type></parameter>);</programlisting>
<para>Gets the never trigger. This is a singleton for a trigger
that never triggers. Use this trigger instead of <link linkend="NULL:CAPS"><literal>NULL</literal></link>
because it implements all virtual functions.</para>
<refsect3 id="gtk-never-trigger-get.returns" role="returns">
<title>Returns</title>
<para>The never trigger. </para>
<para><emphasis role="annotation">[<acronym>type</acronym> GtkNeverTrigger][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkShortcutTrigger.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkShortcutTrigger-struct" role="struct">
<title>GtkShortcutTrigger</title>
<indexterm zone="GtkShortcutTrigger-struct"><primary>GtkShortcutTrigger</primary></indexterm>
<programlisting language="C">typedef struct _GtkShortcutTrigger GtkShortcutTrigger;</programlisting>
<para>A trigger for a key shortcut.</para>
</refsect2>
<refsect2 id="GtkKeyvalTrigger-struct" role="struct">
<title>GtkKeyvalTrigger</title>
<indexterm zone="GtkKeyvalTrigger-struct"><primary>GtkKeyvalTrigger</primary></indexterm>
<programlisting language="C">typedef struct _GtkKeyvalTrigger GtkKeyvalTrigger;</programlisting>
<para>A <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> that triggers when a specific keyval
and (optionally) modifiers are pressed.</para>
</refsect2>
<refsect2 id="GtkMnemonicTrigger" role="struct">
<title>GtkMnemonicTrigger</title>
<indexterm zone="GtkMnemonicTrigger"><primary>GtkMnemonicTrigger</primary></indexterm>
<programlisting language="C">typedef struct _GtkMnemonicTrigger GtkMnemonicTrigger;</programlisting>
<para>A <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> that triggers when a specific mnemonic
is pressed.</para>
</refsect2>
<refsect2 id="GtkAlternativeTrigger-struct" role="struct">
<title>GtkAlternativeTrigger</title>
<indexterm zone="GtkAlternativeTrigger-struct"><primary>GtkAlternativeTrigger</primary></indexterm>
<programlisting language="C">typedef struct _GtkAlternativeTrigger GtkAlternativeTrigger;</programlisting>
<para>A <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> that triggers when either of two
<link linkend="GtkShortcutTriggers"><type>GtkShortcutTriggers</type></link> trigger.</para>
</refsect2>
<refsect2 id="GtkNeverTrigger-struct" role="struct">
<title>GtkNeverTrigger</title>
<indexterm zone="GtkNeverTrigger-struct"><primary>GtkNeverTrigger</primary></indexterm>
<programlisting language="C">typedef struct _GtkNeverTrigger GtkNeverTrigger;</programlisting>
<para>A <link linkend="GtkShortcutTrigger"><type>GtkShortcutTrigger</type></link> that never triggers.</para>
</refsect2>

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

</refsect1>

</refentry>
