diff options
Diffstat (limited to 'gtk+-mingw/share/gtk-doc/html/gio/GSimpleAction.html')
-rw-r--r-- | gtk+-mingw/share/gtk-doc/html/gio/GSimpleAction.html | 414 |
1 files changed, 0 insertions, 414 deletions
diff --git a/gtk+-mingw/share/gtk-doc/html/gio/GSimpleAction.html b/gtk+-mingw/share/gtk-doc/html/gio/GSimpleAction.html deleted file mode 100644 index 498e1f0..0000000 --- a/gtk+-mingw/share/gtk-doc/html/gio/GSimpleAction.html +++ /dev/null @@ -1,414 +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>GSimpleAction</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="GAction.html" title="GAction"> -<link rel="next" href="GRemoteActionGroup.html" title="GRemoteActionGroup"> -<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="GAction.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="GRemoteActionGroup.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> -</tr> -<tr><td colspan="5" class="shortcuts"> -<a href="#GSimpleAction.synopsis" class="shortcut">Top</a> - | - <a href="#GSimpleAction.description" class="shortcut">Description</a> - | - <a href="#GSimpleAction.object-hierarchy" class="shortcut">Object Hierarchy</a> - | - <a href="#GSimpleAction.implemented-interfaces" class="shortcut">Implemented Interfaces</a> - | - <a href="#GSimpleAction.properties" class="shortcut">Properties</a> - | - <a href="#GSimpleAction.signals" class="shortcut">Signals</a> -</td></tr> -</table> -<div class="refentry"> -<a name="GSimpleAction"></a><div class="titlepage"></div> -<div class="refnamediv"><table width="100%"><tr> -<td valign="top"> -<h2><span class="refentrytitle"><a name="GSimpleAction.top_of_page"></a>GSimpleAction</span></h2> -<p>GSimpleAction — A simple GAction implementation</p> -</td> -<td valign="top" align="right"></td> -</tr></table></div> -<div class="refsynopsisdiv"> -<a name="GSimpleAction.synopsis"></a><h2>Synopsis</h2> -<pre class="synopsis"> <a class="link" href="GSimpleAction.html#GSimpleAction-struct" title="GSimpleAction">GSimpleAction</a>; - -<a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="returnvalue">GSimpleAction</span></a> * <a class="link" href="GSimpleAction.html#g-simple-action-new" title="g_simple_action_new ()">g_simple_action_new</a> (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>, - <em class="parameter"><code>const <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *parameter_type</code></em>); -<a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="returnvalue">GSimpleAction</span></a> * <a class="link" href="GSimpleAction.html#g-simple-action-new-stateful" title="g_simple_action_new_stateful ()">g_simple_action_new_stateful</a> (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>, - <em class="parameter"><code>const <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *parameter_type</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *state</code></em>); - -<span class="returnvalue">void</span> <a class="link" href="GSimpleAction.html#g-simple-action-set-enabled" title="g_simple_action_set_enabled ()">g_simple_action_set_enabled</a> (<em class="parameter"><code><a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> *simple</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>); -<span class="returnvalue">void</span> <a class="link" href="GSimpleAction.html#g-simple-action-set-state" title="g_simple_action_set_state ()">g_simple_action_set_state</a> (<em class="parameter"><code><a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> *simple</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value</code></em>); -</pre> -</div> -<div class="refsect1"> -<a name="GSimpleAction.object-hierarchy"></a><h2>Object Hierarchy</h2> -<pre class="synopsis"> - <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> - +----GSimpleAction -</pre> -</div> -<div class="refsect1"> -<a name="GSimpleAction.implemented-interfaces"></a><h2>Implemented Interfaces</h2> -<p> -GSimpleAction implements - <a class="link" href="GAction.html" title="GAction">GAction</a>.</p> -</div> -<div class="refsect1"> -<a name="GSimpleAction.properties"></a><h2>Properties</h2> -<pre class="synopsis"> - "<a class="link" href="GSimpleAction.html#GSimpleAction--enabled" title='The "enabled" property'>enabled</a>" <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write - "<a class="link" href="GSimpleAction.html#GSimpleAction--name" title='The "name" property'>name</a>" <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write / Construct Only - "<a class="link" href="GSimpleAction.html#GSimpleAction--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 / Write / Construct Only - "<a class="link" href="GSimpleAction.html#GSimpleAction--state" title='The "state" property'>state</a>" <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>* : Read / Write - "<a class="link" href="GSimpleAction.html#GSimpleAction--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="GSimpleAction.signals"></a><h2>Signals</h2> -<pre class="synopsis"> - "<a class="link" href="GSimpleAction.html#GSimpleAction-activate" title='The "activate" signal'>activate</a>" : <a href="./../gobject/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a> - "<a class="link" href="GSimpleAction.html#GSimpleAction-change-state" title='The "change-state" signal'>change-state</a>" : <a href="./../gobject/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a> -</pre> -</div> -<div class="refsect1"> -<a name="GSimpleAction.description"></a><h2>Description</h2> -<p> -A <a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> is the obvious simple implementation of the <a class="link" href="GAction.html" title="GAction"><span class="type">GAction</span></a> -interface. This is the easiest way to create an action for purposes of -adding it to a <a class="link" href="GSimpleActionGroup.html" title="GSimpleActionGroup"><span class="type">GSimpleActionGroup</span></a>. -</p> -<p> -See also <a href="http://developer.gnome.org/devel/gtk/GtkAction.html"><span class="type">GtkAction</span></a>. -</p> -</div> -<div class="refsect1"> -<a name="GSimpleAction.details"></a><h2>Details</h2> -<div class="refsect2"> -<a name="GSimpleAction-struct"></a><h3>GSimpleAction</h3> -<pre class="programlisting">typedef struct _GSimpleAction GSimpleAction;</pre> -</div> -<hr> -<div class="refsect2"> -<a name="g-simple-action-new"></a><h3>g_simple_action_new ()</h3> -<pre class="programlisting"><a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="returnvalue">GSimpleAction</span></a> * g_simple_action_new (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>, - <em class="parameter"><code>const <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *parameter_type</code></em>);</pre> -<p> -Creates a new action. -</p> -<p> -The created action is stateless. See <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>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> -<td>the name of the action</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>parameter_type</code></em> :</span></p></td> -<td>the type of parameter to the activate function. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new <a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-simple-action-new-stateful"></a><h3>g_simple_action_new_stateful ()</h3> -<pre class="programlisting"><a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="returnvalue">GSimpleAction</span></a> * g_simple_action_new_stateful (<em class="parameter"><code>const <a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>, - <em class="parameter"><code>const <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> *parameter_type</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *state</code></em>);</pre> -<p> -Creates a new stateful action. -</p> -<p> -<em class="parameter"><code>state</code></em> is the initial state of the action. All future state values -must have the same <a href="./../glib/glib/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> as the initial state. -</p> -<p> -If the <em class="parameter"><code>state</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>name</code></em> :</span></p></td> -<td>the name of the action</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>parameter_type</code></em> :</span></p></td> -<td>the type of the parameter to the activate function. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td> -<td>the initial state of the action</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a new <a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="g-simple-action-set-enabled"></a><h3>g_simple_action_set_enabled ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> g_simple_action_set_enabled (<em class="parameter"><code><a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> *simple</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre> -<p> -Sets the action as enabled or not. -</p> -<p> -An action must be enabled in order to be activated or in order to -have its state changed from outside callers. -</p> -<p> -This should only be called by the implementor of the action. Users -of the action should not attempt to modify its enabled flag. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>enabled</code></em> :</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-simple-action-set-state"></a><h3>g_simple_action_set_state ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> g_simple_action_set_state (<em class="parameter"><code><a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> *simple</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> -Sets the state of the action. -</p> -<p> -This directly updates the 'state' property to the given value. -</p> -<p> -This should only be called by the implementor of the action. Users -of the action should not attempt to directly modify the 'state' -property. Instead, they should 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> to -request the change. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>the new <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> for the state</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.30</p> -</div> -</div> -<div class="refsect1"> -<a name="GSimpleAction.property-details"></a><h2>Property Details</h2> -<div class="refsect2"> -<a name="GSimpleAction--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 / Write</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="GSimpleAction--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 / Write / Construct Only</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="GSimpleActionGroup.html" title="GSimpleActionGroup"><span class="type">GSimpleActionGroup</span></a>. -</p> -<p>Default value: NULL</p> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="GSimpleAction--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 / Write / Construct Only</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="GSimpleAction--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 / Write</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="GSimpleAction--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 class="refsect1"> -<a name="GSimpleAction.signal-details"></a><h2>Signal Details</h2> -<div class="refsect2"> -<a name="GSimpleAction-activate"></a><h3>The <code class="literal">"activate"</code> signal</h3> -<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> *simple, - <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *parameter, - <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="./../gobject/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre> -<p> -Indicates that the action was just activated. -</p> -<p> -<em class="parameter"><code>parameter</code></em> will always be of the expected type. In the event that -an incorrect type was given, no signal will be emitted. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>the <a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</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> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data set when the signal handler was connected.</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -<hr> -<div class="refsect2"> -<a name="GSimpleAction-change-state"></a><h3>The <code class="literal">"change-state"</code> signal</h3> -<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> *simple, - <a href="./../glib/glib/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *value, - <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="./../gobject/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre> -<p> -Indicates that the action just received a request to change its -state. -</p> -<p> -<em class="parameter"><code>value</code></em> will always be of the correct state type. In the event that -an incorrect type was given, no signal will be emitted. -</p> -<p> -If no handler is connected to this signal then the default -behaviour is to call <a class="link" href="GSimpleAction.html#g-simple-action-set-state" title="g_simple_action_set_state ()"><code class="function">g_simple_action_set_state()</code></a> to set the state -to the requested value. If you connect a signal handler then no -default action is taken. If the state should change then you must -call <a class="link" href="GSimpleAction.html#g-simple-action-set-state" title="g_simple_action_set_state ()"><code class="function">g_simple_action_set_state()</code></a> from the handler. -</p> -<p> -</p> -<div class="example"> -<a name="idp67227232"></a><p class="title"><b>Example 22. Example 'change-state' handler</b></p> -<div class="example-contents"><pre class="programlisting"> -static void -change_volume_state (GSimpleAction *action, - GVariant *value, - gpointer user_data) -{ - gint requested; - requested = g_variant_get_int32 (value); - - // Volume only goes from 0 to 10 - if (0 <= requested && requested <= 10) - g_simple_action_set_state (action, value); -} -</pre></div> -</div> -<p><br class="example-break"> -</p> -<p> -The handler need not set the state to the requested value. It -could set it to any value at all, or take some other action. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>the <a class="link" href="GSimpleAction.html" title="GSimpleAction"><span class="type">GSimpleAction</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> -<td>the requested value for the state. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data set when the signal handler was connected.</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.30</p> -</div> -</div> -</div> -<div class="footer"> -<hr> - Generated by GTK-Doc V1.18</div> -</body> -</html>
\ No newline at end of file |