Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AtkAction: ATK - Accessibility Toolkit</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="ATK - Accessibility Toolkit">
<link rel="up" href="interfaces.html" title="ATK Interfaces">
<link rel="prev" href="interfaces.html" title="ATK Interfaces">
<link rel="next" href="AtkComponent.html" title="AtkComponent">
<meta name="generator" content="GTK-Doc V1.27.1 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#AtkAction.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#AtkAction.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_implementations">  <span class="dim">|</span> 
                  <a href="#AtkAction.implementations" class="shortcut">Known Implementations</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="interfaces.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="interfaces.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="AtkComponent.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="AtkAction"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="AtkAction.top_of_page"></a>AtkAction</span></h2>
<p>AtkAction — The ATK interface provided by UI components
which the user can activate/interact with.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="AtkAction.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="AtkAction.html#atk-action-do-action" title="atk_action_do_action ()">atk_action_do_action</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="AtkAction.html#atk-action-get-n-actions" title="atk_action_get_n_actions ()">atk_action_get_n_actions</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="AtkAction.html#atk-action-get-description" title="atk_action_get_description ()">atk_action_get_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="AtkAction.html#atk-action-get-name" title="atk_action_get_name ()">atk_action_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="AtkAction.html#atk-action-get-localized-name" title="atk_action_get_localized_name ()">atk_action_get_localized_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="AtkAction.html#atk-action-get-keybinding" title="atk_action_get_keybinding ()">atk_action_get_keybinding</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="AtkAction.html#atk-action-set-description" title="atk_action_set_description ()">atk_action_set_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="AtkAction.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="AtkAction.html#AtkAction-struct" title="AtkAction">AtkAction</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="AtkAction.html#AtkActionIface" title="struct AtkActionIface">AtkActionIface</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="AtkAction.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GInterface
    <span class="lineart">╰──</span> AtkAction
</pre>
</div>
<div class="refsect1">
<a name="AtkAction.implementations"></a><h2>Known Implementations</h2>
<p>
AtkAction is implemented by
 <a class="link" href="AtkHyperlink.html" title="AtkHyperlink">AtkHyperlink</a> and  <a class="link" href="AtkNoOpObject.html" title="AtkNoOpObject">AtkNoOpObject</a>.</p>
</div>
<div class="refsect1">
<a name="AtkAction.description"></a><h2>Description</h2>
<p><a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> should be implemented by instances of <a class="link" href="AtkObject.html" title="AtkObject"><span class="type">AtkObject</span></a> classes
with which the user can interact directly, i.e. buttons,
checkboxes, scrollbars, e.g. components which are not "passive"
providers of UI information.</p>
<p>Exceptions: when the user interaction is already covered by another
appropriate interface such as <a class="link" href="AtkEditableText.html" title="AtkEditableText"><span class="type">AtkEditableText</span></a> (insert/delete text,
etc.) or <a class="link" href="AtkValue.html" title="AtkValue"><span class="type">AtkValue</span></a> (set value) then these actions should not be
exposed by <a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> as well.</p>
<p>Though most UI interactions on components should be invocable via
keyboard as well as mouse, there will generally be a close mapping
between "mouse actions" that are possible on a component and the
AtkActions.  Where mouse and keyboard actions are redundant in
effect, <a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> should expose only one action rather than
exposing redundant actions if possible.  By convention we have been
using "mouse centric" terminology for <a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> names.</p>
</div>
<div class="refsect1">
<a name="AtkAction.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="atk-action-do-action"></a><h3>atk_action_do_action ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
atk_action_do_action (<em class="parameter"><code><a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> *action</code></em>,
                      <em class="parameter"><code><span class="type">gint</span> i</code></em>);</pre>
<p>Perform the specified action on the object.</p>
<div class="refsect3">
<a name="atk-action-do-action.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>a <span class="type">GObject</span> instance that implements AtkActionIface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>i</p></td>
<td class="parameter_description"><p>the action index corresponding to the action to be performed </p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="atk-action-do-action.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if success, <code class="literal">FALSE</code> otherwise</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="atk-action-get-n-actions"></a><h3>atk_action_get_n_actions ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
atk_action_get_n_actions (<em class="parameter"><code><a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> *action</code></em>);</pre>
<p>Gets the number of accessible actions available on the object.
If there are more than one, the first one is considered the
"default" action of the object.</p>
<div class="refsect3">
<a name="atk-action-get-n-actions.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>a <span class="type">GObject</span> instance that implements AtkActionIface</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="atk-action-get-n-actions.returns"></a><h4>Returns</h4>
<p> a the number of actions, or 0 if <em class="parameter"><code>action</code></em>
does not
implement this interface.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="atk-action-get-description"></a><h3>atk_action_get_description ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
atk_action_get_description (<em class="parameter"><code><a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> *action</code></em>,
                            <em class="parameter"><code><span class="type">gint</span> i</code></em>);</pre>
<p>Returns a description of the specified action of the object.</p>
<div class="refsect3">
<a name="atk-action-get-description.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>a <span class="type">GObject</span> instance that implements AtkActionIface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>i</p></td>
<td class="parameter_description"><p>the action index corresponding to the action to be performed </p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="atk-action-get-description.returns"></a><h4>Returns</h4>
<p>a description string, or <code class="literal">NULL</code> if <em class="parameter"><code>action</code></em>
does
not implement this interface. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="atk-action-get-name"></a><h3>atk_action_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
atk_action_get_name (<em class="parameter"><code><a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> *action</code></em>,
                     <em class="parameter"><code><span class="type">gint</span> i</code></em>);</pre>
<p>Returns a non-localized string naming the specified action of the 
object. This name is generally not descriptive of the end result 
of the action, but instead names the 'interaction type' which the 
object supports. By convention, the above strings should be used to 
represent the actions which correspond to the common point-and-click 
interaction techniques of the same name: i.e. 
"click", "press", "release", "drag", "drop", "popup", etc.
The "popup" action should be used to pop up a context menu for the 
object, if one exists.</p>
<p>For technical reasons, some toolkits cannot guarantee that the 
reported action is actually 'bound' to a nontrivial user event;
i.e. the result of some actions via <a class="link" href="AtkAction.html#atk-action-do-action" title="atk_action_do_action ()"><code class="function">atk_action_do_action()</code></a> may be
NIL.</p>
<div class="refsect3">
<a name="atk-action-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>a <span class="type">GObject</span> instance that implements AtkActionIface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>i</p></td>
<td class="parameter_description"><p>the action index corresponding to the action to be performed </p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="atk-action-get-name.returns"></a><h4>Returns</h4>
<p>a name string, or <code class="literal">NULL</code> if <em class="parameter"><code>action</code></em>
does not
implement this interface. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="atk-action-get-localized-name"></a><h3>atk_action_get_localized_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
atk_action_get_localized_name (<em class="parameter"><code><a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> *action</code></em>,
                               <em class="parameter"><code><span class="type">gint</span> i</code></em>);</pre>
<p>Returns the localized name of the specified action of the object.</p>
<div class="refsect3">
<a name="atk-action-get-localized-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>a <span class="type">GObject</span> instance that implements AtkActionIface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>i</p></td>
<td class="parameter_description"><p>the action index corresponding to the action to be performed </p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="atk-action-get-localized-name.returns"></a><h4>Returns</h4>
<p>a name string, or <code class="literal">NULL</code> if <em class="parameter"><code>action</code></em>
does not
implement this interface. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="atk-action-get-keybinding"></a><h3>atk_action_get_keybinding ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
atk_action_get_keybinding (<em class="parameter"><code><a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> *action</code></em>,
                           <em class="parameter"><code><span class="type">gint</span> i</code></em>);</pre>
<p>Gets the keybinding which can be used to activate this action, if one
exists. The string returned should contain localized, human-readable,
key sequences as they would appear when displayed on screen. It must
be in the format "mnemonic;sequence;shortcut".</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>The mnemonic key activates the object if it is presently enabled onscreen.
This typically corresponds to the underlined letter within the widget.
Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for
a button.</p></li>
<li class="listitem"><p>The sequence is the full list of keys which invoke the action even if the
relevant element is not currently shown on screen. For instance, for a menu
item the sequence is the keybindings used to open the parent menus before
invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a
traditional "New..." menu item.</p></li>
<li class="listitem"><p>The shortcut, if it exists, will invoke the same action without showing
the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a
traditional "New..." menu item.</p></li>
</ul></div>
<p>Example: For a traditional "New..." menu item, the expected return value
would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N"
for the German locale. If, hypothetically, this menu item lacked a mnemonic,
it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively.</p>
<div class="refsect3">
<a name="atk-action-get-keybinding.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>a <span class="type">GObject</span> instance that implements AtkActionIface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>i</p></td>
<td class="parameter_description"><p>the action index corresponding to the action to be performed</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="atk-action-get-keybinding.returns"></a><h4>Returns</h4>
<p>the keybinding which can be used to activate
this action, or <code class="literal">NULL</code> if there is no keybinding for this action. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="atk-action-set-description"></a><h3>atk_action_set_description ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
atk_action_set_description (<em class="parameter"><code><a class="link" href="AtkAction.html" title="AtkAction"><span class="type">AtkAction</span></a> *action</code></em>,
                            <em class="parameter"><code><span class="type">gint</span> i</code></em>,
                            <em class="parameter"><code>const <span class="type">gchar</span> *desc</code></em>);</pre>
<p>Sets a description of the specified action of the object.</p>
<div class="refsect3">
<a name="atk-action-set-description.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>action</p></td>
<td class="parameter_description"><p>a <span class="type">GObject</span> instance that implements AtkActionIface</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>i</p></td>
<td class="parameter_description"><p>the action index corresponding to the action to be performed </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>desc</p></td>
<td class="parameter_description"><p>the description to be assigned to this action</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="atk-action-set-description.returns"></a><h4>Returns</h4>
<p> a gboolean representing if the description was successfully set;</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="AtkAction.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="AtkAction-struct"></a><h3>AtkAction</h3>
<pre class="programlisting">typedef struct _AtkAction AtkAction;</pre>
</div>
<hr>
<div class="refsect2">
<a name="AtkActionIface"></a><h3>struct AtkActionIface</h3>
<pre class="programlisting">struct AtkActionIface {
  GTypeInterface parent;

  gboolean                (*do_action)         (AtkAction         *action,
                                                gint              i);
  gint                    (*get_n_actions)     (AtkAction         *action);
  const gchar*            (*get_description)   (AtkAction         *action,
                                                gint              i);
  const gchar*            (*get_name)          (AtkAction         *action,
                                                gint              i);
  const gchar*            (*get_keybinding)    (AtkAction         *action,
                                                gint              i);
  gboolean                (*set_description)   (AtkAction         *action,
                                                gint              i,
                                                const gchar       *desc);
  const gchar*            (*get_localized_name)(AtkAction         *action,
						gint              i);
};
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27.1</div>
</body>
</html>