diff options
Diffstat (limited to 'gtk+-mingw/share/gtk-doc/html/gio/GAction.html')
-rw-r--r-- | gtk+-mingw/share/gtk-doc/html/gio/GAction.html | 543 |
1 files changed, 0 insertions, 543 deletions
diff --git a/gtk+-mingw/share/gtk-doc/html/gio/GAction.html b/gtk+-mingw/share/gtk-doc/html/gio/GAction.html deleted file mode 100644 index 4ab33f6..0000000 --- a/gtk+-mingw/share/gtk-doc/html/gio/GAction.html +++ /dev/null @@ -1,543 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>GAction</title> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> -<link rel="home" href="index.html" title="GIO Reference Manual"> -<link rel="up" href="application.html" title="Application support"> -<link rel="prev" href="GSimpleActionGroup.html" title="GSimpleActionGroup"> -<link rel="next" href="GSimpleAction.html" title="GSimpleAction"> -<meta name="generator" content="GTK-Doc V1.18 (XML mode)"> -<link rel="stylesheet" href="style.css" type="text/css"> -</head> -<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> -<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> -<tr valign="middle"> -<td><a accesskey="p" href="GSimpleActionGroup.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> -<td><a accesskey="u" href="application.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> -<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> -<th width="100%" align="center">GIO Reference Manual</th> -<td><a accesskey="n" href="GSimpleAction.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> -</tr> -<tr><td colspan="5" class="shortcuts"> -<a href="#GAction.synopsis" class="shortcut">Top</a> - | - <a href="#GAction.description" class="shortcut">Description</a> - | - <a href="#GAction.object-hierarchy" class="shortcut">Object Hierarchy</a> - | - <a href="#GAction.prerequisites" class="shortcut">Prerequisites</a> - | - <a href="#GAction.implementations" class="shortcut">Known Implementations</a> - | - <a href="#GAction.properties" class="shortcut">Properties</a> -</td></tr> -</table> -<div class="refentry"> -<a name="GAction"></a><div class="titlepage"></div> -<div class="refnamediv"><table width="100%"><tr> -<td valign="top"> -<h2><span class="refentrytitle"><a name="GAction.top_of_page"></a>GAction</span></h2> -<p>GAction — An action interface</p> -</td> -<td valign="top" align="right"></td> -</tr></table></div> -<div class="refsynopsisdiv"> -<a name="GAction.synopsis"></a><h2>Synopsis</h2> -<pre class="synopsis"> <a class="link" href="GAction.html#GAction-struct" title="GAction">GAction</a>; -struct <a class="link" href="GAction.html#GActionInterface" title="struct GActionInterface">GActionInterface</a>; - -const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GAction.html#g-action-get-name" title="g_action_get_name ()">g_action_get_name</a> (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>); -const <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> * <a class="link" href="GAction.html#g-action-get-parameter-type" title="g_action_get_parameter_type ()">g_action_get_parameter_type</a> (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>); -const <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> * <a class="link" href="GAction.html#g-action-get-state-type" title="g_action_get_state_type ()">g_action_get_state_type</a> (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>); -<a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="GAction.html#g-action-get-state-hint" title="g_action_get_state_hint ()">g_action_get_state_hint</a> (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>); - -<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GAction.html#g-action-get-enabled" title="g_action_get_enabled ()">g_action_get_enabled</a> (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>); -<a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="GAction.html#g-action-get-state" title="g_action_get_state ()">g_action_get_state</a> (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>); - -<span class="returnvalue">void</span> <a class="link" href="GAction.html#g-action-change-state" title="g_action_change_state ()">g_action_change_state</a> (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>); -<span class="returnvalue">void</span> <a class="link" href="GAction.html#g-action-activate" title="g_action_activate ()">g_action_activate</a> (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameter</code></em>); -</pre> -</div> -<div class="refsect1"> -<a name="GAction.object-hierarchy"></a><h2>Object Hierarchy</h2> -<pre class="synopsis"> - GInterface - +----GAction -</pre> -</div> -<div class="refsect1"> -<a name="GAction.prerequisites"></a><h2>Prerequisites</h2> -<p> -GAction requires - <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p> -</div> -<div class="refsect1"> -<a name="GAction.implementations"></a><h2>Known Implementations</h2> -<p> -GAction is implemented by - <a class="link" href="GSimpleAction.html" title="GSimpleAction">GSimpleAction</a>.</p> -</div> -<div class="refsect1"> -<a name="GAction.properties"></a><h2>Properties</h2> -<pre class="synopsis"> - "<a class="link" href="GAction.html#GAction--enabled" title='The "enabled" property'>enabled</a>" <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read - "<a class="link" href="GAction.html#GAction--name" title='The "name" property'>name</a>" <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read - "<a class="link" href="GAction.html#GAction--parameter-type" title='The "parameter-type" property'>parameter-type</a>" <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a>* : Read - "<a class="link" href="GAction.html#GAction--state" title='The "state" property'>state</a>" <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>* : Read - "<a class="link" href="GAction.html#GAction--state-type" title='The "state-type" property'>state-type</a>" <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a>* : Read -</pre> -</div> -<div class="refsect1"> -<a name="GAction.description"></a><h2>Description</h2> -<p> -<a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> represents a single named action. -</p> -<p> -The main interface to an action is that it can be activated with -<a class="link" href="GAction.html#g-action-activate" title="g_action_activate ()"><code class="function">g_action_activate()</code></a>. This results in the 'activate' signal being -emitted. An activation has a <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> parameter (which may be -<a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>). The correct type for the parameter is determined by a static -parameter type (which is given at construction time). -</p> -<p> -An action may optionally have a state, in which case the state may be -set with <a class="link" href="GAction.html#g-action-change-state" title="g_action_change_state ()"><code class="function">g_action_change_state()</code></a>. This call takes a <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>. The -correct type for the state is determined by a static state type -(which is given at construction time). -</p> -<p> -The state may have a hint associated with it, specifying its valid -range. -</p> -<p> -<a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> is merely the interface to the concept of an action, as -described above. Various implementations of actions exist, including -<a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> and <a href="http://developer.gnome.org/devel/gtk/GtkAction.html"><span class="type">GtkAction</span></a>. -</p> -<p> -In all cases, the implementing class is responsible for storing the -name of the action, the parameter type, the enabled state, the -optional state type and the state and emitting the appropriate -signals when these change. The implementor responsible for filtering -calls to <a class="link" href="GAction.html#g-action-activate" title="g_action_activate ()"><code class="function">g_action_activate()</code></a> and <a class="link" href="GAction.html#g-action-change-state" title="g_action_change_state ()"><code class="function">g_action_change_state()</code></a> for type -safety and for the state being enabled. -</p> -<p> -Probably the only useful thing to do with a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> is to put it -inside of a <a class="link" href="GSimpleActionGroup.html" title="GSimpleActionGroup"><span class="type">GSimpleActionGroup</span></a>. -</p> -</div> -<div class="refsect1"> -<a name="GAction.details"></a><h2>Details</h2> -<div class="refsect2"> -<a name="GAction-struct"></a><h3>GAction</h3> -<pre class="programlisting">typedef struct _GAction GAction;</pre> -</div> -<hr> -<div class="refsect2"> -<a name="GActionInterface"></a><h3>struct GActionInterface</h3> -<pre class="programlisting">struct GActionInterface { - GTypeInterface g_iface; - - /* virtual functions */ - const gchar * (* get_name) (GAction *action); - const GVariantType * (* get_parameter_type) (GAction *action); - const GVariantType * (* get_state_type) (GAction *action); - GVariant * (* get_state_hint) (GAction *action); - - gboolean (* get_enabled) (GAction *action); - GVariant * (* get_state) (GAction *action); - - void (* change_state) (GAction *action, - GVariant *value); - void (* activate) (GAction *action, - GVariant *parameter); -}; -</pre> -<p> -The virtual function table for <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><a href="./../gobject/gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GActionInterface.g-iface"></a>g_iface</code></em>;</span></p></td> -<td></td> -</tr> -<tr> -<td><p><span class="term"><em class="structfield"><code><a name="GActionInterface.get-name"></a>get_name</code></em> ()</span></p></td> -<td>the virtual function pointer for <a class="link" href="GAction.html#g-action-get-name" title="g_action_get_name ()"><code class="function">g_action_get_name()</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="structfield"><code><a name="GActionInterface.get-parameter-type"></a>get_parameter_type</code></em> ()</span></p></td> -<td>the virtual function pointer for <a class="link" href="GAction.html#g-action-get-parameter-type" title="g_action_get_parameter_type ()"><code class="function">g_action_get_parameter_type()</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="structfield"><code><a name="GActionInterface.get-state-type"></a>get_state_type</code></em> ()</span></p></td> -<td>the virtual function pointer for <a class="link" href="GAction.html#g-action-get-state-type" title="g_action_get_state_type ()"><code class="function">g_action_get_state_type()</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="structfield"><code><a name="GActionInterface.get-state-hint"></a>get_state_hint</code></em> ()</span></p></td> -<td>the virtual function pointer for <a class="link" href="GAction.html#g-action-get-state-hint" title="g_action_get_state_hint ()"><code class="function">g_action_get_state_hint()</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="structfield"><code><a name="GActionInterface.get-enabled"></a>get_enabled</code></em> ()</span></p></td> -<td>the virtual function pointer for <a class="link" href="GAction.html#g-action-get-enabled" title="g_action_get_enabled ()"><code class="function">g_action_get_enabled()</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="structfield"><code><a name="GActionInterface.get-state"></a>get_state</code></em> ()</span></p></td> -<td>the virtual function pointer for <a class="link" href="GAction.html#g-action-get-state" title="g_action_get_state ()"><code class="function">g_action_get_state()</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="structfield"><code><a name="GActionInterface.change-state"></a>change_state</code></em> ()</span></p></td> -<td>the virtual function pointer for <a class="link" href="GAction.html#g-action-change-state" title="g_action_change_state ()"><code class="function">g_action_change_state()</code></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="structfield"><code><a name="GActionInterface.activate"></a>activate</code></em> ()</span></p></td> -<td>the virtual function pointer for <a class="link" href="GAction.html#g-action-activate" title="g_action_activate ()"><code class="function">g_action_activate()</code></a>. Note that <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> does not have an -'activate' signal but that implementations of it may have one.</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-action-get-name"></a><h3>g_action_get_name ()</h3> -<pre class="programlisting">const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * g_action_get_name (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>);</pre> -<p> -Queries the name of <em class="parameter"><code>action</code></em>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td> -<td>a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the name of the action</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-action-get-parameter-type"></a><h3>g_action_get_parameter_type ()</h3> -<pre class="programlisting">const <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> * g_action_get_parameter_type (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>);</pre> -<p> -Queries the type of the parameter that must be given when activating -<em class="parameter"><code>action</code></em>. -</p> -<p> -When activating the action using <a class="link" href="GAction.html#g-action-activate" title="g_action_activate ()"><code class="function">g_action_activate()</code></a>, the <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> -given to that function must be of the type returned by this function. -</p> -<p> -In the case that this function returns <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, you must not give any -<a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>, but <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> instead. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td> -<td>a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the parameter type. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-action-get-state-type"></a><h3>g_action_get_state_type ()</h3> -<pre class="programlisting">const <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="returnvalue">GVariantType</span></a> * g_action_get_state_type (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>);</pre> -<p> -Queries the type of the state of <em class="parameter"><code>action</code></em>. -</p> -<p> -If the action is stateful (e.g. created with -<a class="link" href="GSimpleAction.html#g-simple-action-new-stateful" title="g_simple_action_new_stateful ()"><code class="function">g_simple_action_new_stateful()</code></a>) then this function returns the -<a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> of the state. This is the type of the initial value -given as the state. All calls to <a class="link" href="GAction.html#g-action-change-state" title="g_action_change_state ()"><code class="function">g_action_change_state()</code></a> must give a -<a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of this type and <a class="link" href="GAction.html#g-action-get-state" title="g_action_get_state ()"><code class="function">g_action_get_state()</code></a> will return a -<a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> of the same type. -</p> -<p> -If the action is not stateful (e.g. created with <a class="link" href="GSimpleAction.html#g-simple-action-new" title="g_simple_action_new ()"><code class="function">g_simple_action_new()</code></a>) -then this function will return <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. In that case, <a class="link" href="GAction.html#g-action-get-state" title="g_action_get_state ()"><code class="function">g_action_get_state()</code></a> -will return <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and you must not call <a class="link" href="GAction.html#g-action-change-state" title="g_action_change_state ()"><code class="function">g_action_change_state()</code></a>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td> -<td>a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the state type, if the action is stateful. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-action-get-state-hint"></a><h3>g_action_get_state_hint ()</h3> -<pre class="programlisting"><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * g_action_get_state_hint (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>);</pre> -<p> -Requests a hint about the valid range of values for the state of -<em class="parameter"><code>action</code></em>. -</p> -<p> -If <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned it either means that the action is not stateful -or that there is no hint about the valid range of values for the -state of the action. -</p> -<p> -If a <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> array is returned then each item in the array is a -possible value for the state. If a <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> pair (ie: two-tuple) is -returned then the tuple specifies the inclusive lower and upper bound -of valid values for the state. -</p> -<p> -In any case, the information is merely a hint. It may be possible to -have a state value outside of the hinted range and setting a value -within the range may fail. -</p> -<p> -The return value (if non-<a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) should be freed with -<a href="./../glib/glib/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a> when it is no longer required. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td> -<td>a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the state range hint. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-action-get-enabled"></a><h3>g_action_get_enabled ()</h3> -<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_action_get_enabled (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>);</pre> -<p> -Checks if <em class="parameter"><code>action</code></em> is currently enabled. -</p> -<p> -An action must be enabled in order to be activated or in order to -have its state changed from outside callers. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td> -<td>a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>whether the action is enabled</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-action-get-state"></a><h3>g_action_get_state ()</h3> -<pre class="programlisting"><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * g_action_get_state (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>);</pre> -<p> -Queries the current state of <em class="parameter"><code>action</code></em>. -</p> -<p> -If the action is not stateful then <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will be returned. If the -action is stateful then the type of the return value is the type -given by <a class="link" href="GAction.html#g-action-get-state-type" title="g_action_get_state_type ()"><code class="function">g_action_get_state_type()</code></a>. -</p> -<p> -The return value (if non-<a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) should be freed with -<a href="./../glib/glib/glib-GVariant.html#g-variant-unref"><code class="function">g_variant_unref()</code></a> when it is no longer required. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td> -<td>a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>the current state of the action. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-action-change-state"></a><h3>g_action_change_state ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> g_action_change_state (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>);</pre> -<p> -Request for the state of <em class="parameter"><code>action</code></em> to be changed to <em class="parameter"><code>value</code></em>. -</p> -<p> -The action must be stateful and <em class="parameter"><code>value</code></em> must be of the correct type. -See <a class="link" href="GAction.html#g-action-get-state-type" title="g_action_get_state_type ()"><code class="function">g_action_get_state_type()</code></a>. -</p> -<p> -This call merely requests a change. The action may refuse to change -its state or may change its state to something other than <em class="parameter"><code>value</code></em>. -See <a class="link" href="GAction.html#g-action-get-state-hint" title="g_action_get_state_hint ()"><code class="function">g_action_get_state_hint()</code></a>. -</p> -<p> -If the <em class="parameter"><code>value</code></em> GVariant is floating, it is consumed. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td> -<td>a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>the new state</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.30</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-action-activate"></a><h3>g_action_activate ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> g_action_activate (<em class="parameter"><code><a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> *action</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameter</code></em>);</pre> -<p> -Activates the action. -</p> -<p> -<em class="parameter"><code>parameter</code></em> must be the correct type of parameter for the action (ie: -the parameter type given at construction time). If the parameter -type was <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then <em class="parameter"><code>parameter</code></em> must also be <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td> -<td>a <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>parameter</code></em> :</span></p></td> -<td>the parameter to the activation. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -</div> -<div class="refsect1"> -<a name="GAction.property-details"></a><h2>Property Details</h2> -<div class="refsect2"> -<a name="GAction--enabled"></a><h3>The <code class="literal">"enabled"</code> property</h3> -<pre class="programlisting"> "enabled" <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read</pre> -<p> -If <em class="parameter"><code>action</code></em> is currently enabled. -</p> -<p> -If the action is disabled then calls to <a class="link" href="GAction.html#g-action-activate" title="g_action_activate ()"><code class="function">g_action_activate()</code></a> and -<a class="link" href="GAction.html#g-action-change-state" title="g_action_change_state ()"><code class="function">g_action_change_state()</code></a> have no effect. -</p> -<p>Default value: TRUE</p> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="GAction--name"></a><h3>The <code class="literal">"name"</code> property</h3> -<pre class="programlisting"> "name" <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read</pre> -<p> -The name of the action. This is mostly meaningful for identifying -the action once it has been added to a <a class="link" href="GActionGroup.html" title="GActionGroup"><span class="type">GActionGroup</span></a>. -</p> -<p>Default value: NULL</p> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="GAction--parameter-type"></a><h3>The <code class="literal">"parameter-type"</code> property</h3> -<pre class="programlisting"> "parameter-type" <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a>* : Read</pre> -<p> -The type of the parameter that must be given when activating the -action. -</p> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="GAction--state"></a><h3>The <code class="literal">"state"</code> property</h3> -<pre class="programlisting"> "state" <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>* : Read</pre> -<p> -The state of the action, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the action is stateless. -</p> -<p>Allowed values: GVariant<*></p> -<p>Default value: NULL</p> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="GAction--state-type"></a><h3>The <code class="literal">"state-type"</code> property</h3> -<pre class="programlisting"> "state-type" <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a>* : Read</pre> -<p> -The <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> of the state that the action has, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the -action is stateless. -</p> -<p class="since">Since 2.28</p> -</div> -</div> -</div> -<div class="footer"> -<hr> - Generated by GTK-Doc V1.18</div> -</body> -</html>
\ No newline at end of file |