Debian Codegraph @

clutter/cally/cally-actor.h

raw
1 /* CALLY - The Clutter Accessibility Implementation Library
2 *
3 * Copyright (C) 2008 Igalia, S.L.
4 *
5 * Author: Alejandro PiƱeiro Iglesias <[email protected]>
6 *
7 * Some parts are based on GailWidget from GAIL
8 * GAIL - The GNOME Accessibility Implementation Library
9 * Copyright 2001, 2002, 2003 Sun Microsystems Inc.
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
23 */
24
25 #ifndef __CALLY_ACTOR_H__
26 #define __CALLY_ACTOR_H__
27
28 #if !defined(__CALLY_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
29 #error "Only <cally/cally.h> can be included directly."
30 #endif
31
32 #include <atk/atk.h>
33 #include <clutter/clutter.h>
34
35 G_BEGIN_DECLS
36
37 #define CALLY_TYPE_ACTOR (cally_actor_get_type ())
38 #define CALLY_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALLY_TYPE_ACTOR, CallyActor))
39 #define CALLY_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALLY_TYPE_ACTOR, CallyActorClass))
40 #define CALLY_IS_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALLY_TYPE_ACTOR))
41 #define CALLY_IS_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALLY_TYPE_ACTOR))
42 #define CALLY_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALLY_TYPE_ACTOR, CallyActorClass))
43
44 typedef struct _CallyActor CallyActor;
45 typedef struct _CallyActorClass CallyActorClass;
46 typedef struct _CallyActorPrivate CallyActorPrivate;
47
48 /**
49 * CallyActionFunc:
50 * @cally_actor: a #CallyActor
51 *
52 * Action function, to be used on #AtkAction implementations as a individual
53 * action
54 *
55 * Since: 1.4
56 */
57 typedef void (* CallyActionFunc) (CallyActor *cally_actor);
58
59 /**
60 * CallyActionCallback:
61 * @cally_actor: a #CallyActor
62 * @user_data: user data passed to the function
63 *
64 * Action function, to be used on #AtkAction implementations as
65 * an individual action. Unlike #CallyActionFunc, this function
66 * uses the @user_data argument passed to cally_actor_add_action_full().
67 *
68 * Since: 1.6
69 */
70 typedef void (* CallyActionCallback) (CallyActor *cally_actor,
71 gpointer user_data);
72
73 /**
74 * CallyActor:
75 *
76 * The <structname>CallyActor</structname> structure contains only private
77 * data and should be accessed using the provided API
78 *
79 * Since: 1.4
80 */
81 struct _CallyActor
82 {
83 /*< private >*/
84 AtkGObjectAccessible parent;
85
86 CallyActorPrivate *priv;
87 };
88
89 /**
90 * CallyActorClass:
91 * @notify_clutter: Signal handler for notify signal on Clutter actor
92 * @focus_clutter: Signal handler for key-focus-in and key-focus-out
93 * signal on Clutter actor. This virtual functions is deprecated.
94 * @add_actor: Signal handler for actor-added signal on
95 * ClutterContainer interface
96 * @remove_actor: Signal handler for actor-added signal on
97 * ClutterContainer interface
98 *
99 * The <structname>CallyActorClass</structname> structure contains
100 * only private data
101 *
102 * Since: 1.4
103 */
104 struct _CallyActorClass
105 {
106 /*< private >*/
107 AtkGObjectAccessibleClass parent_class;
108
109 /*< public >*/
110 void (*notify_clutter) (GObject *object,
111 GParamSpec *pspec);
112
113 gboolean (*focus_clutter) (ClutterActor *actor,
114 gpointer data);
115
116 gint (*add_actor) (ClutterActor *container,
117 ClutterActor *actor,
118 gpointer data);
119
120 gint (*remove_actor) (ClutterActor *container,
121 ClutterActor *actor,
122 gpointer data);
123
124 /*< private >*/
125 /* padding for future expansion */
126 gpointer _padding_dummy[32];
127 };
128
129 CLUTTER_AVAILABLE_IN_1_4
130 GType cally_actor_get_type (void) G_GNUC_CONST;
131
132 CLUTTER_AVAILABLE_IN_1_4
133 AtkObject* cally_actor_new (ClutterActor *actor);
134
135 CLUTTER_AVAILABLE_IN_1_4
136 guint cally_actor_add_action (CallyActor *cally_actor,
137 const gchar *action_name,
138 const gchar *action_description,
139 const gchar *action_keybinding,
140 CallyActionFunc action_func);
141 CLUTTER_AVAILABLE_IN_1_6
142 guint cally_actor_add_action_full (CallyActor *cally_actor,
143 const gchar *action_name,
144 const gchar *action_description,
145 const gchar *action_keybinding,
146 CallyActionCallback callback,
147 gpointer user_data,
148 GDestroyNotify notify);
149
150 CLUTTER_AVAILABLE_IN_1_4
151 gboolean cally_actor_remove_action (CallyActor *cally_actor,
152 gint action_id);
153
154 CLUTTER_AVAILABLE_IN_1_4
155 gboolean cally_actor_remove_action_by_name (CallyActor *cally_actor,
156 const gchar *action_name);
157
158 G_END_DECLS
159
160 #endif /* __CALLY_ACTOR_H__ */