48
48
<td class="function_type">
49
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
49
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
51
51
<td class="function_name">
52
52
<a class="link" href="GActionGroup.html#g-action-group-list-actions" title="g_action_group_list_actions ()">g_action_group_list_actions</a> <span class="c_punctuation">()</span>
56
56
<td class="function_type">
57
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
57
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
59
59
<td class="function_name">
60
60
<a class="link" href="GActionGroup.html#g-action-group-query-action" title="g_action_group_query_action ()">g_action_group_query_action</a> <span class="c_punctuation">()</span>
64
64
<td class="function_type">
65
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
65
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
67
67
<td class="function_name">
68
68
<a class="link" href="GActionGroup.html#g-action-group-has-action" title="g_action_group_has_action ()">g_action_group_has_action</a> <span class="c_punctuation">()</span>
72
72
<td class="function_type">
73
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
73
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
75
75
<td class="function_name">
76
76
<a class="link" href="GActionGroup.html#g-action-group-get-action-enabled" title="g_action_group_get_action_enabled ()">g_action_group_get_action_enabled</a> <span class="c_punctuation">()</span>
80
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> *
80
<td class="function_type">const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> *
82
82
<td class="function_name">
83
83
<a class="link" href="GActionGroup.html#g-action-group-get-action-parameter-type" title="g_action_group_get_action_parameter_type ()">g_action_group_get_action_parameter_type</a> <span class="c_punctuation">()</span>
87
<td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> *
87
<td class="function_type">const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> *
89
89
<td class="function_name">
90
90
<a class="link" href="GActionGroup.html#g-action-group-get-action-state-type" title="g_action_group_get_action_state_type ()">g_action_group_get_action_state_type</a> <span class="c_punctuation">()</span>
94
94
<td class="function_type">
95
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
95
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
97
97
<td class="function_name">
98
98
<a class="link" href="GActionGroup.html#g-action-group-get-action-state-hint" title="g_action_group_get_action_state_hint ()">g_action_group_get_action_state_hint</a> <span class="c_punctuation">()</span>
102
102
<td class="function_type">
103
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
103
<a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
105
105
<td class="function_name">
106
106
<a class="link" href="GActionGroup.html#g-action-group-get-action-state" title="g_action_group_get_action_state ()">g_action_group_get_action_state</a> <span class="c_punctuation">()</span>
211
211
<div class="refsect1">
212
212
<a name="GActionGroup.object-hierarchy"></a><h2>Object Hierarchy</h2>
213
<pre class="screen"> GInterface
213
<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
214
214
<span class="lineart">╰──</span> GActionGroup
218
218
<a name="GActionGroup.prerequisites"></a><h2>Prerequisites</h2>
220
220
GActionGroup requires
221
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
221
<a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
223
223
<div class="refsect1">
224
224
<a name="GActionGroup.derived-interfaces"></a><h2>Known Derived Interfaces</h2>
248
248
<p>The main way to interact with the actions in a GActionGroup is to
249
249
activate them with <a class="link" href="GActionGroup.html#g-action-group-activate-action" title="g_action_group_activate_action ()"><code class="function">g_action_group_activate_action()</code></a>. Activating an
250
action may require a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> parameter. The required type of the
250
action may require a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> parameter. The required type of the
251
251
parameter can be inquired with <a class="link" href="GActionGroup.html#g-action-group-get-action-parameter-type" title="g_action_group_get_action_parameter_type ()"><code class="function">g_action_group_get_action_parameter_type()</code></a>.
252
252
Actions may be disabled, see <a class="link" href="GActionGroup.html#g-action-group-get-action-enabled" title="g_action_group_get_action_enabled ()"><code class="function">g_action_group_get_action_enabled()</code></a>.
253
253
Activating a disabled action has no effect.</p>
254
<p>Actions may optionally have a state in the form of a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>. The
254
<p>Actions may optionally have a state in the form of a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>. The
255
255
current state of an action can be inquired with
256
256
<a class="link" href="GActionGroup.html#g-action-group-get-action-state" title="g_action_group_get_action_state ()"><code class="function">g_action_group_get_action_state()</code></a>. Activating a stateful action may
257
257
change its state, but it is also possible to set the state by calling
282
282
<a name="GActionGroup.functions_details"></a><h2>Functions</h2>
283
283
<div class="refsect2">
284
284
<a name="g-action-group-list-actions"></a><h3>g_action_group_list_actions ()</h3>
285
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
285
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
286
286
g_action_group_list_actions (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>);</pre>
287
287
<p>Lists the actions contained within <em class="parameter"><code>action_group</code></em>
289
<p>The caller is responsible for freeing the list with <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> when
289
<p>The caller is responsible for freeing the list with <a href="../glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> when
290
290
it is no longer required.</p>
291
291
<div class="refsect3">
292
292
<a name="id-1.4.22.4.12.2.6"></a><h4>Parameters</h4>
306
306
<div class="refsect3">
307
307
<a name="id-1.4.22.4.12.2.7"></a><h4>Returns</h4>
308
<p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of the names of the
308
<p> a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of the names of the
309
309
actions in the groupb. </p>
310
310
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
315
315
<div class="refsect2">
316
316
<a name="g-action-group-query-action"></a><h3>g_action_group_query_action ()</h3>
317
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
317
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
318
318
g_action_group_query_action (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
319
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
320
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *enabled</code></em>,
321
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> **parameter_type</code></em>,
322
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> **state_type</code></em>,
323
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> **state_hint</code></em>,
324
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> **state</code></em>);</pre>
319
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
320
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *enabled</code></em>,
321
<em class="parameter"><code>const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> **parameter_type</code></em>,
322
<em class="parameter"><code>const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> **state_type</code></em>,
323
<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> **state_hint</code></em>,
324
<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> **state</code></em>);</pre>
325
325
<p>Queries all aspects of the named action within an <em class="parameter"><code>action_group</code></em>
327
327
<p>This function acquires the information available from
341
341
information. The interface also provides default implementations of
342
342
those functions that call this function. All implementations,
343
343
therefore, must override either this function or all of the others.</p>
344
<p>If the action exists, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is returned and any of the requested
345
fields (as indicated by having a non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> reference passed in) are
346
filled. If the action doesn't exist, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and the
344
<p>If the action exists, <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is returned and any of the requested
345
fields (as indicated by having a non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> reference passed in) are
346
filled. If the action doesn't exist, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and the
347
347
fields may or may not have been modified.</p>
348
348
<div class="refsect3">
349
349
<a name="id-1.4.22.4.12.3.10"></a><h4>Parameters</h4>
373
373
<td class="parameter_name"><p>parameter_type</p></td>
374
<td class="parameter_description"><p> the parameter type, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none needed. </p></td>
374
<td class="parameter_description"><p> the parameter type, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none needed. </p></td>
375
375
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
378
378
<td class="parameter_name"><p>state_type</p></td>
379
<td class="parameter_description"><p> the state type, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if stateless. </p></td>
379
<td class="parameter_description"><p> the state type, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if stateless. </p></td>
380
380
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
383
383
<td class="parameter_name"><p>state_hint</p></td>
384
<td class="parameter_description"><p> the state hint, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. </p></td>
384
<td class="parameter_description"><p> the state hint, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if none. </p></td>
385
385
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
388
388
<td class="parameter_name"><p>state</p></td>
389
<td class="parameter_description"><p> the current state, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if stateless. </p></td>
389
<td class="parameter_description"><p> the current state, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if stateless. </p></td>
390
390
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
395
395
<div class="refsect3">
396
396
<a name="id-1.4.22.4.12.3.11"></a><h4>Returns</h4>
397
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the action exists, else <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
397
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the action exists, else <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a></p>
400
400
<p class="since">Since 2.32</p>
403
403
<div class="refsect2">
404
404
<a name="g-action-group-has-action"></a><h3>g_action_group_has_action ()</h3>
405
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
405
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
406
406
g_action_group_has_action (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
407
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
407
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
408
408
<p>Checks if the named action exists within <em class="parameter"><code>action_group</code></em>
410
410
<div class="refsect3">
440
440
<div class="refsect2">
441
441
<a name="g-action-group-get-action-enabled"></a><h3>g_action_group_get_action_enabled ()</h3>
442
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
442
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
443
443
g_action_group_get_action_enabled (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
444
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
444
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
445
445
<p>Checks if the named action within <em class="parameter"><code>action_group</code></em>
446
446
is currently enabled.</p>
447
447
<p>An action must be enabled in order to be activated or in order to
479
479
<div class="refsect2">
480
480
<a name="g-action-group-get-action-parameter-type"></a><h3>g_action_group_get_action_parameter_type ()</h3>
481
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> *
481
<pre class="programlisting">const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> *
482
482
g_action_group_get_action_parameter_type
483
483
(<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
484
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
484
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
485
485
<p>Queries the type of the parameter that must be given when activating
486
486
the named action within <em class="parameter"><code>action_group</code></em>
488
488
<p>When activating the action using <a class="link" href="GActionGroup.html#g-action-group-activate-action" title="g_action_group_activate_action ()"><code class="function">g_action_group_activate_action()</code></a>,
489
the <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> given to that function must be of the type returned
489
the <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> given to that function must be of the type returned
490
490
by this function.</p>
491
<p>In the case that this function returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, you must not give any
492
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>, but <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> instead.</p>
491
<p>In the case that this function returns <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, you must not give any
492
<a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>, but <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> instead.</p>
493
493
<p>The parameter type of a particular action will never change but it is
494
494
possible for an action to be removed and for a new action to be added
495
495
with the same name but a different parameter type.</p>
526
526
<div class="refsect2">
527
527
<a name="g-action-group-get-action-state-type"></a><h3>g_action_group_get_action_state_type ()</h3>
528
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> *
528
<pre class="programlisting">const <a href="../glib/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> *
529
529
g_action_group_get_action_state_type (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
530
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
530
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
531
531
<p>Queries the type of the state of the named action within
532
532
<em class="parameter"><code>action_group</code></em>
534
534
<p>If the action is stateful then this function returns the
535
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> of the state. All calls to
536
<a class="link" href="GActionGroup.html#g-action-group-change-action-state" title="g_action_group_change_action_state ()"><code class="function">g_action_group_change_action_state()</code></a> must give a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of this
537
type and <a class="link" href="GActionGroup.html#g-action-group-get-action-state" title="g_action_group_get_action_state ()"><code class="function">g_action_group_get_action_state()</code></a> will return a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>
535
<a href="../glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> of the state. All calls to
536
<a class="link" href="GActionGroup.html#g-action-group-change-action-state" title="g_action_group_change_action_state ()"><code class="function">g_action_group_change_action_state()</code></a> must give a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of this
537
type and <a class="link" href="GActionGroup.html#g-action-group-get-action-state" title="g_action_group_get_action_state ()"><code class="function">g_action_group_get_action_state()</code></a> will return a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>
538
538
of the same type.</p>
539
<p>If the action is not stateful then this function will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
540
In that case, <a class="link" href="GActionGroup.html#g-action-group-get-action-state" title="g_action_group_get_action_state ()"><code class="function">g_action_group_get_action_state()</code></a> will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
539
<p>If the action is not stateful then this function will return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
540
In that case, <a class="link" href="GActionGroup.html#g-action-group-get-action-state" title="g_action_group_get_action_state ()"><code class="function">g_action_group_get_action_state()</code></a> will return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
541
541
and you must not call <a class="link" href="GActionGroup.html#g-action-group-change-action-state" title="g_action_group_change_action_state ()"><code class="function">g_action_group_change_action_state()</code></a>.</p>
542
542
<p>The state type of a particular action will never change but it is
543
543
possible for an action to be removed and for a new action to be added
576
576
<div class="refsect2">
577
577
<a name="g-action-group-get-action-state-hint"></a><h3>g_action_group_get_action_state_hint ()</h3>
578
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
578
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
579
579
g_action_group_get_action_state_hint (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
580
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
580
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
581
581
<p>Requests a hint about the valid range of values for the state of the
582
582
named action within <em class="parameter"><code>action_group</code></em>
584
<p>If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned it either means that the action is not stateful
584
<p>If <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned it either means that the action is not stateful
585
585
or that there is no hint about the valid range of values for the
586
586
state of the action.</p>
587
<p>If a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> array is returned then each item in the array is a
588
possible value for the state. If a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> pair (ie: two-tuple) is
587
<p>If a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> array is returned then each item in the array is a
588
possible value for the state. If a <a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> pair (ie: two-tuple) is
589
589
returned then the tuple specifies the inclusive lower and upper bound
590
590
of valid values for the state.</p>
591
591
<p>In any case, the information is merely a hint. It may be possible to
592
592
have a state value outside of the hinted range and setting a value
593
593
within the range may fail.</p>
594
<p>The return value (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) should be freed with
595
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a> when it is no longer required.</p>
594
<p>The return value (if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) should be freed with
595
<a href="../glib/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a> when it is no longer required.</p>
596
596
<div class="refsect3">
597
597
<a name="id-1.4.22.4.12.8.9"></a><h4>Parameters</h4>
598
598
<div class="informaltable"><table width="100%" border="0">
626
626
<div class="refsect2">
627
627
<a name="g-action-group-get-action-state"></a><h3>g_action_group_get_action_state ()</h3>
628
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
628
<pre class="programlisting"><a href="../glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> *
629
629
g_action_group_get_action_state (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
630
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
630
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
631
631
<p>Queries the current state of the named action within <em class="parameter"><code>action_group</code></em>
633
<p>If the action is not stateful then <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned. If the
633
<p>If the action is not stateful then <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned. If the
634
634
action is stateful then the type of the return value is the type
635
635
given by <a class="link" href="GActionGroup.html#g-action-group-get-action-state-type" title="g_action_group_get_action_state_type ()"><code class="function">g_action_group_get_action_state_type()</code></a>.</p>
636
<p>The return value (if non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) should be freed with
637
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a> when it is no longer required.</p>
636
<p>The return value (if non-<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) should be freed with
637
<a href="../glib/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a> when it is no longer required.</p>
638
638
<div class="refsect3">
639
639
<a name="id-1.4.22.4.12.9.7"></a><h4>Parameters</h4>
640
640
<div class="informaltable"><table width="100%" border="0">
669
669
<a name="g-action-group-change-action-state"></a><h3>g_action_group_change_action_state ()</h3>
670
670
<pre class="programlisting"><span class="returnvalue">void</span>
671
671
g_action_group_change_action_state (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
672
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
673
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
672
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
673
<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre>
674
674
<p>Request for the state of the named action within <em class="parameter"><code>action_group</code></em>
676
676
changed to <em class="parameter"><code>value</code></em>
718
718
<a name="g-action-group-activate-action"></a><h3>g_action_group_activate_action ()</h3>
719
719
<pre class="programlisting"><span class="returnvalue">void</span>
720
720
g_action_group_activate_action (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
721
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
722
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameter</code></em>);</pre>
721
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
722
<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameter</code></em>);</pre>
723
723
<p>Activate the named action within <em class="parameter"><code>action_group</code></em>
725
725
<p>If the action is expecting a parameter, then the correct type of
726
726
parameter must be given as <em class="parameter"><code>parameter</code></em>
727
727
. If the action is expecting no
728
728
parameters then <em class="parameter"><code>parameter</code></em>
729
must be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. See
729
must be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. See
730
730
<a class="link" href="GActionGroup.html#g-action-group-get-action-parameter-type" title="g_action_group_get_action_parameter_type ()"><code class="function">g_action_group_get_action_parameter_type()</code></a>.</p>
731
731
<div class="refsect3">
732
732
<a name="id-1.4.22.4.12.11.6"></a><h4>Parameters</h4>
762
762
<a name="g-action-group-action-added"></a><h3>g_action_group_action_added ()</h3>
763
763
<pre class="programlisting"><span class="returnvalue">void</span>
764
764
g_action_group_action_added (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
765
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
765
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
766
766
<p>Emits the <a class="link" href="GActionGroup.html#GActionGroup-action-added" title="The “action-added” signal"><span class="type">“action-added”</span></a> signal on <em class="parameter"><code>action_group</code></em>
768
768
<p>This function should only be called by <a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> implementations.</p>
795
795
<a name="g-action-group-action-removed"></a><h3>g_action_group_action_removed ()</h3>
796
796
<pre class="programlisting"><span class="returnvalue">void</span>
797
797
g_action_group_action_removed (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
798
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
798
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
799
799
<p>Emits the <a class="link" href="GActionGroup.html#GActionGroup-action-removed" title="The “action-removed” signal"><span class="type">“action-removed”</span></a> signal on <em class="parameter"><code>action_group</code></em>
801
801
<p>This function should only be called by <a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> implementations.</p>
828
828
<a name="g-action-group-action-enabled-changed"></a><h3>g_action_group_action_enabled_changed ()</h3>
829
829
<pre class="programlisting"><span class="returnvalue">void</span>
830
830
g_action_group_action_enabled_changed (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
831
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
832
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre>
831
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
832
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre>
833
833
<p>Emits the <a class="link" href="GActionGroup.html#GActionGroup-action-enabled-changed" title="The “action-enabled-changed” signal"><span class="type">“action-enabled-changed”</span></a> signal on <em class="parameter"><code>action_group</code></em>
835
835
<p>This function should only be called by <a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> implementations.</p>
867
867
<a name="g-action-group-action-state-changed"></a><h3>g_action_group_action_state_changed ()</h3>
868
868
<pre class="programlisting"><span class="returnvalue">void</span>
869
869
g_action_group_action_state_changed (<em class="parameter"><code><a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group</code></em>,
870
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
871
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *state</code></em>);</pre>
870
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>,
871
<em class="parameter"><code><a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *state</code></em>);</pre>
872
872
<p>Emits the <a class="link" href="GActionGroup.html#GActionGroup-action-state-changed" title="The “action-state-changed” signal"><span class="type">“action-state-changed”</span></a> signal on <em class="parameter"><code>action_group</code></em>
874
874
<p>This function should only be called by <a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> implementations.</p>
1062
1062
<a name="GActionGroup-action-added"></a><h3>The <code class="literal">“action-added”</code> signal</h3>
1063
1063
<pre class="programlisting"><span class="returnvalue">void</span>
1064
1064
user_function (<a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group,
1065
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name,
1066
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
1065
<a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name,
1066
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
1067
1067
<p>Signals that a new action was just added to the group.
1068
1068
This signal is emitted after the action has been added
1069
1069
and is now visible.</p>
1103
1103
<a name="GActionGroup-action-enabled-changed"></a><h3>The <code class="literal">“action-enabled-changed”</code> signal</h3>
1104
1104
<pre class="programlisting"><span class="returnvalue">void</span>
1105
1105
user_function (<a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group,
1106
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name,
1107
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled,
1108
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
1106
<a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name,
1107
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled,
1108
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
1109
1109
<p>Signals that the enabled status of the named action has changed.</p>
1110
1110
<div class="refsect3">
1111
1111
<a name="id-1.4.22.4.14.3.5"></a><h4>Parameters</h4>
1148
1148
<a name="GActionGroup-action-removed"></a><h3>The <code class="literal">“action-removed”</code> signal</h3>
1149
1149
<pre class="programlisting"><span class="returnvalue">void</span>
1150
1150
user_function (<a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group,
1151
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name,
1152
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
1151
<a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name,
1152
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
1153
1153
<p>Signals that an action is just about to be removed from the group.
1154
1154
This signal is emitted before the action is removed, so the action
1155
1155
is still visible and can be queried from the signal handler.</p>
1189
1189
<a name="GActionGroup-action-state-changed"></a><h3>The <code class="literal">“action-state-changed”</code> signal</h3>
1190
1190
<pre class="programlisting"><span class="returnvalue">void</span>
1191
1191
user_function (<a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a> *action_group,
1192
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name,
1193
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value,
1194
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
1192
<a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name,
1193
<a href="../glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value,
1194
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
1195
1195
<p>Signals that the state of the named action has changed.</p>
1196
1196
<div class="refsect3">
1197
1197
<a name="id-1.4.22.4.14.5.5"></a><h4>Parameters</h4>