Merge branch 'master' into gi
[platform/upstream/at-spi2-core.git] / atspi / atspi-misc-private.h
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 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.
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  * Library General Public License for more details.
18  *
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.
23  */
24
25 #ifndef _ATSPI_MISC_PRIVATE_H_
26 #define _ATSPI_MISC_PRIVATE_H_
27
28 /* Private internal implementation details of at-spi. */
29
30 #include "atspi.h"
31
32 #include "dbus/dbus.h"
33
34 #include "dbind/dbind.h"
35
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
42
43 typedef struct _AtspiReference AtspiReference;
44 struct _AtspiReference
45 {
46   char *name;
47   char *path;
48 };
49
50 /* constants */
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"
54
55 #define ATSPI_DBUS_PATH_NULL "/org/a11y/atspi/null"
56 #define ATSPI_DBUS_PATH_ROOT "/org/a11y/atspi/accessible/root"
57
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"
61
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"
81
82 /* externs */
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;
104
105 /* function prototypes */
106 gint _atspi_get_iface_num (const char *iface);
107
108 DBusConnection * _atspi_bus ();
109
110 AtspiAccessible * _atspi_ref_accessible (const char *app, const char *path);
111
112 AtspiAccessible *
113 _atspi_dbus_return_accessible_from_message (DBusMessage *message);
114
115 AtspiAccessible *
116 _atspi_dbus_return_accessible_from_iter (DBusMessageIter *iter);
117
118 AtspiAccessible * _atspi_ref_related_accessible (AtspiAccessible *obj, const AtspiReference *ref);
119
120 dbus_bool_t _atspi_dbus_call (gpointer obj, const char *interface, const char *method, GError **error, const char *type, ...);
121
122 DBusMessage *_atspi_dbus_call_partial (gpointer obj, const char *interface, const char *method, GError **error, const char *type, ...);
123
124 dbus_bool_t _atspi_dbus_get_property (AtspiAccessible *obj, const char *interface, const char *name, GError **error, const char *type, void *data);
125
126 DBusMessage * _atspi_dbus_send_with_reply_and_block (DBusMessage *message);
127
128 GHashTable *_atspi_dbus_hash_from_message (DBusMessage *message);
129
130 GArray *_atspi_dbus_attribute_array_from_message (DBusMessage *message);
131 #endif  /* _ATSPI_MISC_PRIVATE_H_ */