1/* ATK - Accessibility Toolkit
2 * Copyright 2001 Sun Microsystems Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20#ifndef __ATK_ACTION_H__
21#define __ATK_ACTION_H__
22
23#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION)
24#error "Only <atk/atk.h> can be included directly."
25#endif
26
27#include <atk/atkobject.h>
28
29G_BEGIN_DECLS
30
31/*
32 */
33
34#define ATK_TYPE_ACTION (atk_action_get_type ())
35#define ATK_IS_ACTION(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_ACTION)
36#define ATK_ACTION(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_ACTION, AtkAction)
37#define ATK_ACTION_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_ACTION, AtkActionIface))
38
39#ifndef _TYPEDEF_ATK_ACTION_
40#define _TYPEDEF_ATK_ACTION_
41typedef struct _AtkAction AtkAction;
42#endif
43typedef struct _AtkActionIface AtkActionIface;
44
45/**
46 * AtkActionIface:
47 * @do_action:
48 * @get_n_actions:
49 * @get_description:
50 * @get_name:
51 * @get_keybinding:
52 * @set_description:
53 * @get_localized_name:
54 *
55 * The #AtkAction interface should be supported by any object that can
56 * perform one or more actions. The interface provides the standard
57 * mechanism for an assistive technology to determine what those actions
58 * are as well as tell the object to perform them. Any object that can
59 * be manipulated should support this interface.
60 */
61struct _AtkActionIface
62{
63 /*< private >*/
64 GTypeInterface parent;
65
66 /*< public >*/
67 gboolean (*do_action) (AtkAction *action,
68 gint i);
69 gint (*get_n_actions) (AtkAction *action);
70 const gchar *(*get_description) (AtkAction *action,
71 gint i);
72 const gchar *(*get_name) (AtkAction *action,
73 gint i);
74 const gchar *(*get_keybinding) (AtkAction *action,
75 gint i);
76 gboolean (*set_description) (AtkAction *action,
77 gint i,
78 const gchar *desc);
79 const gchar *(*get_localized_name) (AtkAction *action,
80 gint i);
81};
82
83ATK_AVAILABLE_IN_ALL
84GType atk_action_get_type (void);
85
86/*
87 * These are the function which would be called by an application with
88 * the argument being a AtkObject object cast to (AtkAction).
89 *
90 * The function will just check that * the corresponding
91 * function pointer is not NULL and will call it.
92 *
93 * The "real" implementation of the function for accessible will be
94 * provided in a support library
95 */
96
97ATK_AVAILABLE_IN_ALL
98gboolean atk_action_do_action (AtkAction *action,
99 gint i);
100ATK_AVAILABLE_IN_ALL
101gint atk_action_get_n_actions (AtkAction *action);
102ATK_AVAILABLE_IN_ALL
103const gchar *atk_action_get_description (AtkAction *action,
104 gint i);
105ATK_AVAILABLE_IN_ALL
106const gchar *atk_action_get_name (AtkAction *action,
107 gint i);
108ATK_AVAILABLE_IN_ALL
109const gchar *atk_action_get_keybinding (AtkAction *action,
110 gint i);
111ATK_AVAILABLE_IN_ALL
112gboolean atk_action_set_description (AtkAction *action,
113 gint i,
114 const gchar *desc);
115
116/* NEW in ATK 1.1: */
117ATK_AVAILABLE_IN_ALL
118const gchar *atk_action_get_localized_name (AtkAction *action,
119 gint i);
120
121/*
122 * Additional GObject properties exported by AtkAction:
123 * "accessible_action"
124 * (an accessible action, or the list of actions, has changed)
125 */
126
127G_END_DECLS
128
129#endif /* __ATK_ACTION_H__ */
130

source code of include/atk-1.0/atk/atkaction.h