2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2002 Ximian, Inc.
6 * 2002 Sun Microsystems Inc.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
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 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
25 #ifndef _ATSPI_MISC_PRIVATE_H_
26 #define _ATSPI_MISC_PRIVATE_H_
28 /* Private internal implementation details of at-spi. */
32 #include "dbus/dbus.h"
34 #include "dbind/dbind.h"
36 #define ATSPI_CACHE_PARENT 0x0001
37 #define ATSPI_CACHE_CHILDREN 0x0002
38 #define ATSPI_CACHE_NAME 0x0004
39 #define ATSPI_CACHE_DESCRIPTION 0x0008
40 #define ATSPI_CACHE_STATES 0x0010
41 #define ATSPI_CACHE_ROLE 0x0020
42 #define ATSPI_CACHE_INTERFACES 0x0040
44 typedef struct _AtspiReference AtspiReference;
45 struct _AtspiReference
52 #define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry"
53 #define ATSPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry"
54 #define ATSPI_DBUS_INTERFACE_REGISTRY "org.a11y.atspi.Registry"
56 #define ATSPI_DBUS_PATH_NULL "/org/a11y/atspi/null"
57 #define ATSPI_DBUS_PATH_ROOT "/org/a11y/atspi/accessible/root"
59 #define ATSPI_DBUS_PATH_DEC "/org/a11y/atspi/registry/deviceeventcontroller"
60 #define ATSPI_DBUS_INTERFACE_DEC "org.a11y.atspi.DeviceEventController"
61 #define ATSPI_DBUS_INTERFACE_DEVICE_EVENT_LISTENER "org.a11y.atspi.DeviceEventListener"
63 #define ATSPI_DBUS_INTERFACE_CACHE "org.a11y.atspi.Cache"
64 #define ATSPI_DBUS_INTERFACE_ACCESSIBLE "org.a11y.atspi.Accessible"
65 #define ATSPI_DBUS_INTERFACE_ACTION "org.a11y.atspi.Action"
66 #define ATSPI_DBUS_INTERFACE_APPLICATION "org.a11y.atspi.Application"
67 #define ATSPI_DBUS_INTERFACE_COLLECTION "org.a11y.atspi.Collection"
68 #define ATSPI_DBUS_INTERFACE_COMPONENT "org.a11y.atspi.Component"
69 #define ATSPI_DBUS_INTERFACE_DOCUMENT "org.a11y.atspi.Document"
70 #define ATSPI_DBUS_INTERFACE_EDITABLE_TEXT "org.a11y.atspi.EditableText"
71 #define ATSPI_DBUS_INTERFACE_EVENT_KEYBOARD "org.a11y.atspi.Event.Keyboard"
72 #define ATSPI_DBUS_INTERFACE_EVENT_MOUSE "org.a11y.atspi.Event.Mouse"
73 #define ATSPI_DBUS_INTERFACE_EVENT_OBJECT "org.a11y.atspi.Event.Object"
74 #define ATSPI_DBUS_INTERFACE_HYPERLINK "org.a11y.atspi.Hyperlink"
75 #define ATSPI_DBUS_INTERFACE_HYPERTEXT "org.a11y.atspi.Hypertext"
76 #define ATSPI_DBUS_INTERFACE_IMAGE "org.a11y.atspi.Image"
77 #define ATSPI_DBUS_INTERFACE_SELECTION "org.a11y.atspi.Selection"
78 #define ATSPI_DBUS_INTERFACE_TABLE "org.a11y.atspi.Table"
79 #define ATSPI_DBUS_INTERFACE_TEXT "org.a11y.atspi.Text"
80 #define ATSPI_DBUS_INTERFACE_VALUE "org.a11y.atspi.Value"
81 #define ATSPI_DBUS_INTERFACE_SOCKET "org.a11y.atspi.Socket"
84 extern const char *atspi_path_dec;
85 extern const char *atspi_path_registry;
86 extern const char *atspi_path_root;
87 extern const char *atspi_bus_registry;
88 extern const char *atspi_interface_accessible;
89 extern const char *atspi_interface_action;
90 extern const char *atspi_interface_application;
91 extern const char *atspi_interface_collection;
92 extern const char *atspi_interface_component;
93 extern const char *atspi_interface_dec;
94 extern const char *atspi_interface_device_event_listener;
95 extern const char *atspi_interface_document;
96 extern const char *atspi_interface_editable_text;
97 extern const char *atspi_interface_hyperlink;
98 extern const char *atspi_interface_hypertext;
99 extern const char *atspi_interface_image;
100 extern const char *atspi_interface_registry;
101 extern const char *atspi_interface_selection;
102 extern const char *atspi_interface_table;
103 extern const char *atspi_interface_text;
104 extern const char *atspi_interface_cache;
105 extern const char *atspi_interface_value;
107 /* function prototypes */
108 gint _atspi_get_iface_num (const char *iface);
110 DBusConnection * _atspi_bus ();
112 AtspiAccessible * _atspi_ref_accessible (const char *app, const char *path);
115 _atspi_dbus_return_accessible_from_message (DBusMessage *message);
118 _atspi_dbus_return_accessible_from_iter (DBusMessageIter *iter);
121 _atspi_dbus_return_hyperlink_from_message (DBusMessage *message);
124 _atspi_dbus_return_hyperlink_from_iter (DBusMessageIter *iter);
126 dbus_bool_t _atspi_dbus_call (gpointer obj, const char *interface, const char *method, GError **error, const char *type, ...);
128 DBusMessage *_atspi_dbus_call_partial (gpointer obj, const char *interface, const char *method, GError **error, const char *type, ...);
130 DBusMessage *_atspi_dbus_call_partial_va (gpointer obj, const char *interface, const char *method, GError **error, const char *type, va_list args);
132 dbus_bool_t _atspi_dbus_get_property (gpointer obj, const char *interface, const char *name, GError **error, const char *type, void *data);
134 DBusMessage * _atspi_dbus_send_with_reply_and_block (DBusMessage *message);
136 GHashTable *_atspi_dbus_return_hash_from_message (DBusMessage *message);
138 GHashTable *_atspi_dbus_hash_from_iter (DBusMessageIter *iter);
140 GArray *_atspi_dbus_return_attribute_array_from_message (DBusMessage *message);
142 GArray *_atspi_dbus_attribute_array_from_iter (DBusMessageIter *iter);
144 gboolean _atspi_process_deferred_messages (gpointer data);
146 void _atspi_dbus_set_interfaces (AtspiAccessible *accessible, DBusMessageIter *iter);
148 void _atspi_dbus_set_state (AtspiAccessible *accessible, DBusMessageIter *iter);
150 #define _ATSPI_DBUS_CHECK_SIG(message, type, ret) \
152 g_warning ("at-spi: Got no message at %s line %d\n", __FILE__, __LINE__); \
155 if (strcmp (dbus_message_get_signature (message), type) != 0) \
157 g_warning ("at-spi: Expected message signature %s but got %s at %s line %d", type, dbus_message_get_signature (message), __FILE__, __LINE__); \
158 dbus_message_unref (message); \
166 * Error domain for AT-SPI IPC failures. Errors in this domain will
167 * be from the #ATSPIAtspiError enumeration. See #GError for information on
170 #define ATSPI_ERROR atspi_error_quark()
171 GQuark atspi_error_quark (void);
175 * @ATSPI_APPLICATION_NO_LONGER_EXISTS: The application has quit.
179 ATSPI_ERROR_APPLICATION_GONE
181 #endif /* _ATSPI_MISC_PRIVATE_H_ */