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 0x0010
43 typedef struct _AtspiReference AtspiReference;
44 struct _AtspiReference
51 #define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry"
52 #define ATSPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry"
53 #define ATSPI_DBUS_INTERFACE_REGISTRY "org.a11y.atspi.Registry"
55 #define ATSPI_DBUS_PATH_NULL "/org/a11y/atspi/null"
56 #define ATSPI_DBUS_PATH_ROOT "/org/a11y/atspi/accessible/root"
58 #define ATSPI_DBUS_PATH_DEC "/org/a11y/atspi/registry/deviceeventcontroller"
59 #define ATSPI_DBUS_INTERFACE_DEC "org.a11y.atspi.DeviceEventController"
60 #define ATSPI_DBUS_INTERFACE_DEVICE_EVENT_LISTENER "org.a11y.atspi.DeviceEventListener"
62 #define ATSPI_DBUS_INTERFACE_CACHE "org.a11y.atspi.Cache"
63 #define ATSPI_DBUS_INTERFACE_ACCESSIBLE "org.a11y.atspi.Accessible"
64 #define ATSPI_DBUS_INTERFACE_ACTION "org.a11y.atspi.Action"
65 #define ATSPI_DBUS_INTERFACE_APPLICATION "org.a11y.atspi.Application"
66 #define ATSPI_DBUS_INTERFACE_COLLECTION "org.a11y.atspi.Collection"
67 #define ATSPI_DBUS_INTERFACE_COMPONENT "org.a11y.atspi.Component"
68 #define ATSPI_DBUS_INTERFACE_DOCUMENT "org.a11y.atspi.Document"
69 #define ATSPI_DBUS_INTERFACE_EDITABLE_TEXT "org.a11y.atspi.EditableText"
70 #define ATSPI_DBUS_INTERFACE_EVENT_KEYBOARD "org.a11y.atspi.Event.Keyboard"
71 #define ATSPI_DBUS_INTERFACE_EVENT_MOUSE "org.a11y.atspi.Event.Mouse"
72 #define ATSPI_DBUS_INTERFACE_EVENT_OBJECT "org.a11y.atspi.Event.Object"
73 #define ATSPI_DBUS_INTERFACE_HYPERLINK "org.a11y.atspi.Hyperlink"
74 #define ATSPI_DBUS_INTERFACE_HYPERTEXT "org.a11y.atspi.Hypertext"
75 #define ATSPI_DBUS_INTERFACE_IMAGE "org.a11y.atspi.Image"
76 #define ATSPI_DBUS_INTERFACE_SELECTION "org.a11y.atspi.Selection"
77 #define ATSPI_DBUS_INTERFACE_TABLE "org.a11y.atspi.Table"
78 #define ATSPI_DBUS_INTERFACE_TEXT "org.a11y.atspi.Text"
79 #define ATSPI_DBUS_INTERFACE_VALUE "org.a11y.atspi.Value"
80 #define ATSPI_DBUS_INTERFACE_SOCKET "org.a11y.atspi.Socket"
83 extern const char *atspi_path_dec;
84 extern const char *atspi_path_registry;
85 extern const char *atspi_path_root;
86 extern const char *atspi_bus_registry;
87 extern const char *atspi_interface_accessible;
88 extern const char *atspi_interface_action;
89 extern const char *atspi_interface_application;
90 extern const char *atspi_interface_component;
91 extern const char *atspi_interface_dec;
92 extern const char *atspi_interface_device_event_listener;
93 extern const char *atspi_interface_document;
94 extern const char *atspi_interface_editable_text;
95 extern const char *atspi_interface_hyperlink;
96 extern const char *atspi_interface_hypertext;
97 extern const char *atspi_interface_image;
98 extern const char *atspi_interface_registry;
99 extern const char *atspi_interface_selection;
100 extern const char *atspi_interface_table;
101 extern const char *atspi_interface_text;
102 extern const char *atspi_interface_cache;
103 extern const char *atspi_interface_value;
105 /* function prototypes */
106 gint _atspi_get_iface_num (const char *iface);
108 DBusConnection * _atspi_bus ();
110 AtspiAccessible * _atspi_ref_accessible (const char *app, const char *path);
113 _atspi_dbus_return_accessible_from_message (DBusMessage *message);
116 _atspi_dbus_return_accessible_from_iter (DBusMessageIter *iter);
119 _atspi_dbus_return_hyperlink_from_message (DBusMessage *message);
122 _atspi_dbus_return_hyperlink_from_iter (DBusMessageIter *iter);
124 dbus_bool_t _atspi_dbus_call (gpointer obj, const char *interface, const char *method, GError **error, const char *type, ...);
126 DBusMessage *_atspi_dbus_call_partial (gpointer obj, const char *interface, const char *method, GError **error, const char *type, ...);
128 DBusMessage *_atspi_dbus_call_partial_va (gpointer obj, const char *interface, const char *method, GError **error, const char *type, va_list args);
130 dbus_bool_t _atspi_dbus_get_property (gpointer obj, const char *interface, const char *name, GError **error, const char *type, void *data);
132 DBusMessage * _atspi_dbus_send_with_reply_and_block (DBusMessage *message);
134 GHashTable *_atspi_dbus_hash_from_message (DBusMessage *message);
136 GHashTable *_atspi_dbus_hash_from_iter (DBusMessageIter *iter);
138 GArray *_atspi_dbus_attribute_array_from_message (DBusMessage *message);
140 GArray *_atspi_dbus_attribute_array_from_iter (DBusMessageIter *iter);
142 #define _ATSPI_DBUS_CHECK_SIG(message, type, ret) \
144 g_warning ("at-spi: Got no message at %s line %d\n", __FILE__, __LINE__); \
147 if (strcmp (dbus_message_get_signature (message), type) != 0) \
149 g_warning ("at-spi: Expected message signature %s but got %s at %s line %d", type, dbus_message_get_signature (message), __FILE__, __LINE__); \
150 dbus_message_unref (message); \
153 #endif /* _ATSPI_MISC_PRIVATE_H_ */