1/*
2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
4 *
5 * Copyright 2002 Ximian, Inc.
6 * 2002 Sun Microsystems Inc.
7 *
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 */
24
25#ifndef _ATSPI_TYPES_H_
26#define _ATSPI_TYPES_H_
27
28#include "glib-object.h"
29
30#include "atspi-constants.h"
31
32typedef struct _AtspiAccessible AtspiAccessible;
33typedef struct _AtspiAction AtspiAction;
34typedef struct _AtspiCollection AtspiCollection;
35typedef struct _AtspiComponent AtspiComponent;
36typedef struct _AtspiDocument AtspiDocument;
37typedef struct _AtspiEditableText AtspiEditableText;
38typedef struct _AtspiHyperlink AtspiHyperlink;
39typedef struct _AtspiHypertext AtspiHypertext;
40typedef struct _AtspiImage AtspiImage;
41typedef struct _AtspiSelection AtspiSelection;
42typedef struct _AtspiTable AtspiTable;
43typedef struct _AtspiTableCell AtspiTableCell;
44typedef struct _AtspiText AtspiText;
45typedef struct _AtspiValue AtspiValue;
46
47typedef guint AtspiControllerEventMask;
48
49typedef guint AtspiKeyMaskType;
50
51typedef guint AtspiKeyEventMask;
52typedef guint AtspiDeviceEventMask;
53
54// TODO: auto-generate the below structs
55typedef struct _AtspiDeviceEvent AtspiDeviceEvent;
56struct _AtspiDeviceEvent
57{
58 AtspiEventType type;
59 guint id;
60 gushort hw_code;
61 gushort modifiers;
62 guint timestamp;
63 gchar * event_string;
64 gboolean is_text;
65};
66
67typedef struct _AtspiEventListenerMode AtspiEventListenerMode;
68struct _AtspiEventListenerMode
69{
70 gboolean synchronous;
71 gboolean preemptive;
72 gboolean global;
73};
74
75typedef struct _AtspiKeyDefinition AtspiKeyDefinition;
76struct _AtspiKeyDefinition
77{
78 gint keycode;
79 gint keysym;
80 gchar *keystring;
81 guint modifiers;
82};
83
84/**
85 * ATSPI_TYPE_KEY_DEFINITION:
86 *
87 * The #GType for a boxed type holding a #AtspiKeyDefinition.
88 */
89#define ATSPI_TYPE_KEY_DEFINITION (atspi_key_definition_get_type ())
90
91typedef struct _AtspiEvent AtspiEvent;
92struct _AtspiEvent
93{
94 gchar *type;
95 AtspiAccessible *source;
96 gint detail1;
97 gint detail2;
98 GValue any_data;
99 AtspiAccessible *sender;
100};
101
102/**
103 * ATSPI_TYPE_DEVICE_EVENT:
104 *
105 * The #GType for a boxed type holding a #AtspiDeviceEvent.
106 */
107#define ATSPI_TYPE_DEVICE_EVENT (atspi_device_event_get_type ())
108
109/**
110 * ATSPI_TYPE_EVENT:
111 *
112 * The #GType for a boxed type holding a #AtspiEvent.
113 */
114#define ATSPI_TYPE_EVENT (atspi_event_get_type ())
115
116typedef void AtspiKeystrokeListener;
117
118/**
119 * AtspiKeySet:
120 * @keysyms:
121 * @keycodes:
122 * @len:
123 *
124 * Structure containing identifying information about a set of keycode or
125 * keysyms.
126 **/
127typedef struct _AtspiKeySet
128{
129 guint *keysyms;
130 gushort *keycodes;
131 gchar **keystrings;
132 gshort len;
133} AtspiKeySet;
134
135/**
136 *AtspiKeyListenerSyncType:
137 * @ATSPI_KEYLISTENER_NOSYNC: Events may be delivered asynchronously,
138 * which means in some cases they may already have been delivered to the
139 * application before the AT client receives the notification.
140 * @ATSPI_KEYLISTENER_SYNCHRONOUS: Events are delivered synchronously, before the
141 * currently focussed application sees them.
142 * @ATSPI_KEYLISTENER_CANCONSUME: Events may be consumed by the AT client. Presumes and
143 * requires #ATSPI_KEYLISTENER_SYNCHRONOUS, incompatible with #ATSPI_KEYLISTENER_NOSYNC.
144 * @ATSPI_KEYLISTENER_ALL_WINDOWS: Events are received not from the application toolkit layer, but
145 * from the device driver or windowing system subsystem; such notifications are 'global' in the
146 * sense that they are not broken or defeated by applications that participate poorly
147 * in the accessibility APIs, or not at all; however because of the intrusive nature of
148 * such snooping, it can have side-effects on certain older platforms. If unconditional
149 * event notifications, even when inaccessible or "broken" applications have focus, are not
150 * required, it may be best to avoid this enum value/flag.
151 *
152 * Specifies the type of a key listener event.
153 * The values above can and should be bitwise-'OR'-ed
154 * together, observing the compatibility limitations specified in the description of
155 * each value. For instance, #ATSPI_KEYLISTENER_ALL_WINDOWS | #ATSPI_KEYLISTENER_CANCONSUME is
156 * a commonly used combination which gives the AT complete control over the delivery of matching
157 * events. However, such filters should be used sparingly as they may have a negative impact on
158 * system performance.
159 **/
160typedef enum {
161 ATSPI_KEYLISTENER_NOSYNC = 0,
162 ATSPI_KEYLISTENER_SYNCHRONOUS = 1 << 0,
163 ATSPI_KEYLISTENER_CANCONSUME = 1 << 1,
164 ATSPI_KEYLISTENER_ALL_WINDOWS = 1 << 2
165} AtspiKeyListenerSyncType;
166#endif /* _ATSPI_TYPES_H_ */
167

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

source code of include/at-spi-2.0/atspi/atspi-types.h