X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=blobdiff_plain;f=cspi%2Fspi-private.h;h=795d08d4ec57b0a06bb0cb7d2fba5dd0d12d4d51;hp=7ed7d6e5d648cd7e88cd6a9b1c47f606d92ef273;hb=afb48dd77231e55de0afd6560038cf4af6264ec6;hpb=c08c79a9ce7ce0d7e4d24afb1d70f680a67919af diff --git a/cspi/spi-private.h b/cspi/spi-private.h index 7ed7d6e..795d08d 100644 --- a/cspi/spi-private.h +++ b/cspi/spi-private.h @@ -2,7 +2,9 @@ * AT-SPI - Assistive Technology Service Provider Interface * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) * - * Copyright 2001 Sun Microsystems Inc. + * Copyright 2002 Ximian, Inc. + * 2002 Sun Microsystems Inc. + * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -25,30 +27,72 @@ /* Private internal implementation details of at-spi. */ -#include -#include +#include "common/spi-dbus.h" +#include "cspi/spi.h" +#include "string.h" #include "cspi/cspi-lowlevel.h" #include "cspi/spi-listener.h" +#include "dbind/dbind.h" +#include +#include "common/spi-stateset.h" + +typedef struct _CSpiApplication CSpiApplication; +struct _CSpiApplication +{ + GHashTable *hash; + char *bus_name; +}; struct _Accessible { - CORBA_Object objref; - /* And some other bits */ - guint ref_count; + gint ref_count; + Accessible *parent; + GList *children; + CSpiApplication *app; + union + { + gint id; + char *path; + } v; + gint role : 8; + gint interfaces : 24; + char *name; + char *description; + AtkStateSet *states; }; -#define CSPI_OBJREF(a) (((Accessible *)(a))->objref) +#define SPI_INTERNAL_EVENT_MAGIC 0xc3 +/* + * For internal use by CSPI implementation only + */ +typedef struct { + AccessibleEvent event; + guint id; + guchar magic; + guchar type; + guint16 ref_count; +} InternalEvent; -CORBA_Environment *cspi_ev (void); -SPIBoolean cspi_exception (void); -Accessibility_Registry cspi_registry (void); -Accessible *cspi_object_add (CORBA_Object corba_object); -Accessible *cspi_object_add_ref (CORBA_Object corba_object, - gboolean do_ref); -void cspi_object_ref (Accessible *accessible); -void cspi_object_unref (Accessible *accessible); -SPIBoolean cspi_accessible_is_a (Accessible *obj, - const char *interface_name); +struct _SPIException { + SPIExceptionType type; + Accessible *source; + DBusError *error; + SPIExceptionCode code; + char * desc; +}; +DBusConnection *SPI_bus (void); +SPIBoolean cspi_exception (void); +Accessible *cspi_object_add (Accessible *accessible); +void cspi_object_ref (Accessible *accessible); +void cspi_object_unref (Accessible *accessible); +SPIBoolean cspi_accessible_is_a (Accessible *accessible, + const char *interface_name); +AccessibleRole cspi_role_from_spi_role (Accessibility_Role role); +void cspi_streams_close_all (void); +gboolean cspi_exception_throw (DBusError *error, const char *desc_prefix); + +AccessibleAttributeSet + *_cspi_attribute_set_from_sequence (const GArray *seq); #define cspi_return_if_fail(val) \ if (!(val)) \ return @@ -57,10 +101,19 @@ SPIBoolean cspi_accessible_is_a (Accessible *obj, return (ret) #define cspi_return_if_ev(err) \ - if (!cspi_check_ev (err)) \ + if (cspi_exception ()) \ return; #define cspi_return_val_if_ev(err, ret) \ - if (!cspi_check_ev (err)) \ + if (cspi_exception ()) \ return (ret); +typedef struct _Accessibility_BoundingBox Accessibility_BoundingBox; +struct _Accessibility_BoundingBox +{ + dbus_int32_t x; + dbus_int32_t y; + dbus_int32_t width; + dbus_int32_t height; +}; + #endif /* _SPI_PRIVATE_H_ */