2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #ifndef SPI_ACCESSIBLE_H_
25 #define SPI_ACCESSIBLE_H_
27 #include <libspi/droute.h>
28 #include "Accessibility.h"
33 Accessibility_Role spi_accessible_role_from_atk_role (AtkRole role);
35 void spi_initialize_accessible(DRouteData *data);
36 void spi_initialize_action(DRouteData *data);
37 void spi_initialize_application(DRouteData *data);
38 void spi_initialize_component(DRouteData *data);
39 void spi_initialize_document(DRouteData *data);
40 void spi_initialize_editabletext(DRouteData *data);
41 void spi_initialize_hyperlink(DRouteData *data);
42 void spi_initialize_hypertext(DRouteData *data);
43 void spi_initialize_image(DRouteData *data);
44 void spi_initialize_selection(DRouteData *data);
45 void spi_initialize_table(DRouteData *data);
46 void spi_initialize_text(DRouteData *data);
47 void spi_initialize_value(DRouteData *data);
48 void spi_initialize_introspectable(DRouteData *data);
50 void spi_register_tree_object(DBusConnection *bus, const char *path);
52 dbus_bool_t spi_dbus_append_tree (DBusMessage * message, AtkObject * obj, DRouteData * data);
54 typedef unsigned long Accessibility_ControllerEventMask;
56 // TODO: auto-generate the below structs
57 typedef struct _Accessibility_DeviceEvent Accessibility_DeviceEvent;
58 struct _Accessibility_DeviceEvent
60 Accessibility_EventType type;
62 dbus_uint16_t hw_code;
63 dbus_uint16_t modifiers;
64 dbus_uint32_t timestamp;
69 typedef struct _Accessibility_EventListenerMode Accessibility_EventListenerMode;
70 struct _Accessibility_EventListenerMode
72 dbus_bool_t synchronous;
73 dbus_bool_t preemptive;
77 typedef struct _Accessibility_KeyDefinition Accessibility_KeyDefinition;
78 struct _Accessibility_KeyDefinition
86 #define SPI_DBUS_NAME_REGISTRY "org.freedesktop.atspi.registry"
87 #define SPI_DBUS_PATH_REGISTRY "/org/freedesktop/atspi/registry"
89 AtkObject *spi_dbus_get_object(const char *path);
91 gchar *spi_dbus_get_path(AtkObject *obj);
92 DBusMessage *spi_dbus_general_error(DBusMessage *message);
93 DBusMessage *spi_dbus_return_rect(DBusMessage *message, gint ix, gint iy, gint iwidth, gint iheight);
94 DBusMessage *spi_dbus_return_object(DBusMessage *message, AtkObject *obj, int unref);
95 dbus_bool_t spi_dbus_return_v_object(DBusMessageIter *iter, AtkObject *obj, int unref);
97 #define SPI_DBUS_RETURN_ERROR(m, e) dbus_message_new_error(m, (e)->name, (e)->message)
99 void spi_dbus_initialize(DRouteData *data);
100 dbus_bool_t spi_dbus_message_iter_get_struct(DBusMessageIter *iter, ...);
101 dbus_bool_t spi_dbus_message_iter_append_struct(DBusMessageIter *iter, ...);
102 dbus_bool_t spi_dbus_marshall_deviceEvent(DBusMessage *message, const Accessibility_DeviceEvent *e);
103 dbus_bool_t spi_dbus_demarshall_deviceEvent(DBusMessage *message, Accessibility_DeviceEvent *e);
106 void spi_dbus_notify_change(AtkObject *obj, gboolean new, DRouteData *data);
107 void spi_dbus_notify_remove(AtkObject *obj, DRouteData *data);
108 gboolean spi_dbus_update_cache(DRouteData *data);
109 gboolean spi_dbus_object_is_known(AtkObject *obj);
112 #endif /* SPI_ACCESSIBLE_H_ */