From 408978dd34f3338e49b6ace5f60b7606579ce7a9 Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 13 Nov 2001 00:54:21 +0000 Subject: [PATCH] 2001-11-13 Michael Meeks * *.[ch] Namespace libspi into spi_ and Spi. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@87 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- ChangeLog | 4 + acconfig.h | 3 +- at-bridge/bridge.c | 30 +- atk-bridge/bridge.c | 30 +- cspi/spi-impl.h | 30 +- cspi/spi-listener.h | 12 +- cspi/spi-roletypes.h | 12 +- cspi/spi-statetypes.h | 6 +- cspi/spi.c | 10 +- cspi/spi.h | 706 +++++++++++++++++++------------------- cspi/spi_accessible.c | 392 ++++++++++----------- cspi/spi_action.c | 36 +- cspi/spi_application.c | 66 ++-- cspi/spi_component.c | 90 ++--- cspi/spi_editabletext.c | 36 +- cspi/spi_event.c | 46 +-- cspi/spi_hyperlink.c | 34 +- cspi/spi_hypertext.c | 24 +- cspi/spi_image.c | 22 +- cspi/spi_main.c | 10 +- cspi/spi_registry.c | 66 ++-- cspi/spi_selection.c | 42 +-- cspi/spi_table.c | 112 +++--- cspi/spi_text.c | 84 ++--- cspi/spi_value.c | 28 +- libspi/accessible.c | 142 ++++---- libspi/accessible.h | 26 +- libspi/accessibleeventlistener.c | 56 +-- libspi/accessibleeventlistener.h | 32 +- libspi/action.c | 68 ++-- libspi/action.h | 32 +- libspi/application.c | 118 +++---- libspi/application.h | 32 +- libspi/component.c | 112 +++--- libspi/component.h | 26 +- libspi/desktop.c | 62 ++-- libspi/desktop.h | 34 +- libspi/deviceeventcontroller.c | 70 ++-- libspi/deviceeventcontroller.h | 26 +- libspi/editabletext.c | 122 +++---- libspi/editabletext.h | 36 +- libspi/eventlistener.c | 56 +-- libspi/eventlistener.h | 32 +- libspi/hyperlink.c | 64 ++-- libspi/hyperlink.h | 32 +- libspi/hypertext.c | 62 ++-- libspi/hypertext.h | 32 +- libspi/image.c | 50 +-- libspi/image.h | 32 +- libspi/keystrokelistener.c | 36 +- libspi/keystrokelistener.h | 24 +- libspi/listener.c | 50 +-- libspi/listener.h | 24 +- libspi/registry.c | 234 ++++++------- libspi/registry.h | 34 +- libspi/selection.c | 80 ++--- libspi/selection.h | 32 +- libspi/table.c | 124 +++---- libspi/table.h | 32 +- libspi/text.c | 120 +++---- libspi/text.h | 30 +- libspi/value.c | 66 ++-- libspi/value.h | 32 +- registryd/desktop.c | 62 ++-- registryd/desktop.h | 34 +- registryd/deviceeventcontroller.c | 70 ++-- registryd/deviceeventcontroller.h | 26 +- registryd/registry-main.c | 10 +- registryd/registry.c | 234 ++++++------- registryd/registry.h | 34 +- registryd/registryd.c | 10 +- test/app.c | 22 +- test/at.c | 30 +- test/keysynth-demo.c | 4 +- test/simple-at.c | 68 ++-- util/mag_image.c | 8 +- util/mag_image.h | 6 +- util/magnifier.c | 2 +- 78 files changed, 2414 insertions(+), 2409 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28c3cf4..dc742e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-11-13 Michael Meeks + * *.[ch] Namespace libspi into spi_ and Spi. + +2001-11-13 Michael Meeks + * Makefile.am: dist & install at-spi-1.0.pc * libspi/Makefile.am: install into at-spi-1.0 diff --git a/acconfig.h b/acconfig.h index c3a1a37..94f82b5 100644 --- a/acconfig.h +++ b/acconfig.h @@ -1,6 +1,7 @@ #undef ENABLE_NLS +#undef HAVE_GETTEXT #undef HAVE_CATGETS #undef HAVE_DLADDR -#undef HAVE_GETTEXT +#undef HAVE_GET_TEXT #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY diff --git a/at-bridge/bridge.c b/at-bridge/bridge.c index f47d084..6e08153 100644 --- a/at-bridge/bridge.c +++ b/at-bridge/bridge.c @@ -40,8 +40,8 @@ struct _ArgStruct { }; static CORBA_Environment ev; -static Accessibility_Registry registry; -static Application *this_app; +static Accessibility_SpiRegistry registry; +static SpiApplication *this_app; static gboolean bridge_register_app (gpointer p); static void bridge_focus_tracker (AtkObject *object); @@ -83,9 +83,9 @@ bridge_register_app (gpointer gp) } /* Create the accesssible application server object */ - this_app = application_new(atk_get_root ()); + this_app = spi_application_new(atk_get_root ()); - obj_id = "OAFIID:Accessibility_Registry:proto0.1"; + obj_id = "OAFIID:Accessibility_SpiRegistry:proto0.1"; oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { @@ -101,13 +101,13 @@ bridge_register_app (gpointer gp) g_error ("Could not locate registry"); } - registry = (Accessibility_Registry) oclient; + registry = (Accessibility_SpiRegistry) oclient; fprintf(stderr, "About to register application\n"); bonobo_activate (); - Accessibility_Registry_registerApplication (registry, + Accessibility_SpiRegistry_registerSpiApplication (registry, CORBA_Object_duplicate (BONOBO_OBJREF (this_app), &ev), &ev); @@ -136,7 +136,7 @@ register_atk_event_listeners () static void bridge_exit_func() { fprintf (stderr, "exiting bridge\n"); - Accessibility_Registry_deregisterApplication (registry, + Accessibility_SpiRegistry_deregisterSpiApplication (registry, CORBA_Object_duplicate (BONOBO_OBJREF (this_app), &ev), &ev); fprintf (stderr, "bridge exit func complete.\n"); @@ -146,10 +146,10 @@ static void bridge_focus_tracker (AtkObject *object) { Accessibility_Event *e = Accessibility_Event__alloc(); e->type = CORBA_string_dup ("focus:"); - e->source = CORBA_Object_duplicate (BONOBO_OBJREF (accessible_new (object)), &ev); + e->source = CORBA_Object_duplicate (BONOBO_OBJREF (spi_accessible_new (object)), &ev); e->detail1 = 0; e->detail2 = 0; - Accessibility_Registry_notifyEvent (registry, e, &ev); + Accessibility_SpiRegistry_notifyEvent (registry, e, &ev); } static gboolean @@ -180,13 +180,13 @@ bridge_property_event_listener (GSignalInvocationHint *signal_hint, if (ATK_IS_IMPLEMENTOR (gobject)) { aobject = atk_implementor_ref_accessible (ATK_IMPLEMENTOR (gobject)); - source = CORBA_Object_duplicate (BONOBO_OBJREF (accessible_new (aobject)), &ev); + source = CORBA_Object_duplicate (BONOBO_OBJREF (spi_accessible_new (aobject)), &ev); g_object_unref (G_OBJECT(aobject)); } else if (ATK_IS_OBJECT (gobject)) { aobject = ATK_OBJECT (gobject); - source = CORBA_Object_duplicate (BONOBO_OBJREF (accessible_new (aobject)), &ev); + source = CORBA_Object_duplicate (BONOBO_OBJREF (spi_accessible_new (aobject)), &ev); } else { @@ -199,7 +199,7 @@ bridge_property_event_listener (GSignalInvocationHint *signal_hint, e->detail1 = 0; e->detail2 = 0; if (source) - Accessibility_Registry_notifyEvent (registry, e, &ev); + Accessibility_SpiRegistry_notifyEvent (registry, e, &ev); return TRUE; } @@ -242,17 +242,17 @@ bridge_signal_listener (GSignalInvocationHint *signal_hint, } snprintf(sbuf, APP_STATIC_BUFF_SZ, "%s:%s", name, g_type_name (signal_query.itype)); - source = CORBA_Object_duplicate (BONOBO_OBJREF (accessible_new (aobject)), &ev); + source = CORBA_Object_duplicate (BONOBO_OBJREF (spi_accessible_new (aobject)), &ev); e->type = CORBA_string_dup (sbuf); e->source = source; e->detail1 = 0; e->detail2 = 0; - Accessibility_Registry_notifyEvent (registry, e, &ev); + Accessibility_SpiRegistry_notifyEvent (registry, e, &ev); g_object_unref (aobject); return TRUE; } -static Accessibility_Registry bridge_get_registry () +static Accessibility_SpiRegistry bridge_get_registry () { return registry; } diff --git a/atk-bridge/bridge.c b/atk-bridge/bridge.c index f47d084..6e08153 100644 --- a/atk-bridge/bridge.c +++ b/atk-bridge/bridge.c @@ -40,8 +40,8 @@ struct _ArgStruct { }; static CORBA_Environment ev; -static Accessibility_Registry registry; -static Application *this_app; +static Accessibility_SpiRegistry registry; +static SpiApplication *this_app; static gboolean bridge_register_app (gpointer p); static void bridge_focus_tracker (AtkObject *object); @@ -83,9 +83,9 @@ bridge_register_app (gpointer gp) } /* Create the accesssible application server object */ - this_app = application_new(atk_get_root ()); + this_app = spi_application_new(atk_get_root ()); - obj_id = "OAFIID:Accessibility_Registry:proto0.1"; + obj_id = "OAFIID:Accessibility_SpiRegistry:proto0.1"; oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { @@ -101,13 +101,13 @@ bridge_register_app (gpointer gp) g_error ("Could not locate registry"); } - registry = (Accessibility_Registry) oclient; + registry = (Accessibility_SpiRegistry) oclient; fprintf(stderr, "About to register application\n"); bonobo_activate (); - Accessibility_Registry_registerApplication (registry, + Accessibility_SpiRegistry_registerSpiApplication (registry, CORBA_Object_duplicate (BONOBO_OBJREF (this_app), &ev), &ev); @@ -136,7 +136,7 @@ register_atk_event_listeners () static void bridge_exit_func() { fprintf (stderr, "exiting bridge\n"); - Accessibility_Registry_deregisterApplication (registry, + Accessibility_SpiRegistry_deregisterSpiApplication (registry, CORBA_Object_duplicate (BONOBO_OBJREF (this_app), &ev), &ev); fprintf (stderr, "bridge exit func complete.\n"); @@ -146,10 +146,10 @@ static void bridge_focus_tracker (AtkObject *object) { Accessibility_Event *e = Accessibility_Event__alloc(); e->type = CORBA_string_dup ("focus:"); - e->source = CORBA_Object_duplicate (BONOBO_OBJREF (accessible_new (object)), &ev); + e->source = CORBA_Object_duplicate (BONOBO_OBJREF (spi_accessible_new (object)), &ev); e->detail1 = 0; e->detail2 = 0; - Accessibility_Registry_notifyEvent (registry, e, &ev); + Accessibility_SpiRegistry_notifyEvent (registry, e, &ev); } static gboolean @@ -180,13 +180,13 @@ bridge_property_event_listener (GSignalInvocationHint *signal_hint, if (ATK_IS_IMPLEMENTOR (gobject)) { aobject = atk_implementor_ref_accessible (ATK_IMPLEMENTOR (gobject)); - source = CORBA_Object_duplicate (BONOBO_OBJREF (accessible_new (aobject)), &ev); + source = CORBA_Object_duplicate (BONOBO_OBJREF (spi_accessible_new (aobject)), &ev); g_object_unref (G_OBJECT(aobject)); } else if (ATK_IS_OBJECT (gobject)) { aobject = ATK_OBJECT (gobject); - source = CORBA_Object_duplicate (BONOBO_OBJREF (accessible_new (aobject)), &ev); + source = CORBA_Object_duplicate (BONOBO_OBJREF (spi_accessible_new (aobject)), &ev); } else { @@ -199,7 +199,7 @@ bridge_property_event_listener (GSignalInvocationHint *signal_hint, e->detail1 = 0; e->detail2 = 0; if (source) - Accessibility_Registry_notifyEvent (registry, e, &ev); + Accessibility_SpiRegistry_notifyEvent (registry, e, &ev); return TRUE; } @@ -242,17 +242,17 @@ bridge_signal_listener (GSignalInvocationHint *signal_hint, } snprintf(sbuf, APP_STATIC_BUFF_SZ, "%s:%s", name, g_type_name (signal_query.itype)); - source = CORBA_Object_duplicate (BONOBO_OBJREF (accessible_new (aobject)), &ev); + source = CORBA_Object_duplicate (BONOBO_OBJREF (spi_accessible_new (aobject)), &ev); e->type = CORBA_string_dup (sbuf); e->source = source; e->detail1 = 0; e->detail2 = 0; - Accessibility_Registry_notifyEvent (registry, e, &ev); + Accessibility_SpiRegistry_notifyEvent (registry, e, &ev); g_object_unref (aobject); return TRUE; } -static Accessibility_Registry bridge_get_registry () +static Accessibility_SpiRegistry bridge_get_registry () { return registry; } diff --git a/cspi/spi-impl.h b/cspi/spi-impl.h index 9d34617..2c09606 100644 --- a/cspi/spi-impl.h +++ b/cspi/spi-impl.h @@ -16,21 +16,21 @@ typedef unsigned int boolean; -typedef CORBA_Object Accessible; -typedef CORBA_Object AccessibleAction; -typedef CORBA_Object AccessibleApplication; -typedef CORBA_Object AccessibleComponent; -typedef CORBA_Object AccessibleEditableText; -typedef CORBA_Object AccessibleHyperlink; -typedef CORBA_Object AccessibleHypertext; -typedef CORBA_Object AccessibleImage; -typedef CORBA_Object AccessibleRelation; -typedef CORBA_Object AccessibleSelection; -typedef CORBA_Object AccessibleStateSet; -typedef CORBA_Object AccessibleTable; -typedef CORBA_Object AccessibleText; -typedef CORBA_Object AccessibleValue; -typedef CORBA_Object AccessibilityRegistry; +typedef CORBA_Object SpiAccessible; +typedef CORBA_Object SpiAccessibleAction; +typedef CORBA_Object SpiAccessibleApplication; +typedef CORBA_Object SpiAccessibleComponent; +typedef CORBA_Object SpiAccessibleEditableText; +typedef CORBA_Object SpiAccessibleHyperlink; +typedef CORBA_Object SpiAccessibleHypertext; +typedef CORBA_Object SpiAccessibleImage; +typedef CORBA_Object SpiAccessibleRelation; +typedef CORBA_Object SpiAccessibleSelection; +typedef CORBA_Object SpiAccessibleStateSet; +typedef CORBA_Object SpiAccessibleTable; +typedef CORBA_Object SpiAccessibleText; +typedef CORBA_Object SpiAccessibleValue; +typedef CORBA_Object AccessibilitySpiRegistry; typedef CORBA_Object GenericInterface; #endif diff --git a/cspi/spi-listener.h b/cspi/spi-listener.h index 6aada88..5c39a3d 100644 --- a/cspi/spi-listener.h +++ b/cspi/spi-listener.h @@ -1,5 +1,5 @@ -#ifndef _SPI_LISTENER_H_ -#define _SPI_LISTENER_H_ +#ifndef _SPI_SPI_LISTENER_H_ +#define _SPI_SPI_LISTENER_H_ #ifdef __cplusplus @@ -16,20 +16,20 @@ extern "C" { * */ -typedef Accessibility_Event AccessibleEvent; +typedef Accessibility_Event SpiAccessibleEvent; /* * - * Function prototype typedefs for Event Listener Callbacks. + * Function prototype typedefs for Event SpiListener Callbacks. * (see libspi/accessibleeventlistener.h for definition of VoidEventListenerCB). * * usage: signatures should be - * void (*AccessibleEventListenerCB) (AccessibleEvent *event); + * void (*SpiAccessibleEventListenerCB) (SpiAccessibleEvent *event); * * boolean (*KeystrokeListenerCB) (KeystrokeEvent *Event); */ -typedef VoidEventListenerCB AccessibleEventListenerCB; +typedef VoidEventListenerCB SpiAccessibleEventListenerCB; typedef BooleanKeystrokeListenerCB KeystrokeListenerCB; #ifdef __cplusplus diff --git a/cspi/spi-roletypes.h b/cspi/spi-roletypes.h index d4c25c5..1160129 100644 --- a/cspi/spi-roletypes.h +++ b/cspi/spi-roletypes.h @@ -3,7 +3,7 @@ /* * - * Enumerated type for AccessibleRole + * Enumerated type for SpiAccessibleRole * */ @@ -25,13 +25,13 @@ typedef enum ROLE_COLUMN_HEADER, /* A list of choices the user can select from */ ROLE_COMBO_BOX, - /* An inconifed internal frame within a DESKTOP_PANE */ - ROLE_DESKTOP_ICON, + /* An inconifed internal frame within a SPI_DESKTOP_PANE */ + ROLE_SPI_DESKTOP_ICON, /* * A pane that supports internal frames and iconified versions of those * internal frames. */ - ROLE_DESKTOP_FRAME, + ROLE_SPI_DESKTOP_FRAME, /* A top level window with title bar and a border */ ROLE_DIALOG, /* @@ -175,7 +175,7 @@ typedef enum /* An object used to repsent hierarchical information to the user. */ ROLE_TREE, /* - * The object contains some Accessible information, but its role is + * The object contains some SpiAccessible information, but its role is * not known. */ ROLE_UNKNOWN, @@ -185,6 +185,6 @@ typedef enum ROLE_WINDOW, /* not a valid role, used for finding end of enumeration. */ ROLE_LAST_DEFINED -} ACCESSIBLE_ROLE; +} SPI_ACCESSIBLE_ROLE; #endif diff --git a/cspi/spi-statetypes.h b/cspi/spi-statetypes.h index 82d7048..0cbea6d 100644 --- a/cspi/spi-statetypes.h +++ b/cspi/spi-statetypes.h @@ -49,7 +49,7 @@ typedef enum * Indicates this object allows more than one of its children to be * selected at the same time */ - STATE_MULTISELECTABLE, + STATE_MULTISELECSPI_TABLE, /* Indicates this object paints every pixel within its rectangular region. */ STATE_OPAQUE, /* Indicates this object is currently pressed */ @@ -61,7 +61,7 @@ typedef enum * children to be selected and that this child is one of those children * that can be selected. */ - STATE_SELECTABLE, + STATE_SELECSPI_TABLE, /* * Indicates this object is the child of an object that allows its * children to be selected and that this child is one of those children @@ -84,6 +84,6 @@ typedef enum /* Indicates this object is visible */ STATE_VISIBLE, STATE_LAST_DEFINED -} ACCESSIBLE_STATE; +} SPI_ACCESSIBLE_STATE; #endif diff --git a/cspi/spi.c b/cspi/spi.c index 2fe8f87..71631a6 100644 --- a/cspi/spi.c +++ b/cspi/spi.c @@ -3,16 +3,16 @@ #include "spi.h" static CORBA_Environment ev; -static AccessibilityRegistry registry; +static AccessibilitySpiRegistry registry; -static Accessible * -Obj_Add (Accessible object) +static SpiAccessible * +Obj_Add (SpiAccessible object) { /* TODO: keep list of live object refs */ - Accessible *oref = NULL; + SpiAccessible *oref = NULL; if (!CORBA_Object_is_nil (object, &ev)) { - oref = g_malloc (sizeof (Accessible)); + oref = g_malloc (sizeof (SpiAccessible)); *oref = object; } return oref; diff --git a/cspi/spi.h b/cspi/spi.h index b9c559f..cec91f8 100644 --- a/cspi/spi.h +++ b/cspi/spi.h @@ -6,7 +6,7 @@ #include "spi-impl.h" /* - * Definitions for ACCESSIBLE_STATE , ACCESSIBLE_ROLE, AccessibleEvent, + * Definitions for SPI_ACCESSIBLE_STATE , SPI_ACCESSIBLE_ROLE, SpiAccessibleEvent, * and event listeners. */ @@ -22,16 +22,16 @@ typedef enum { - TEXT_BOUNDARY_CHAR, - TEXT_BOUNDARY_CURSOR_POS, - TEXT_BOUNDARY_WORD_START, - TEXT_BOUNDARY_WORD_END, - TEXT_BOUNDARY_SENTENCE_START, - TEXT_BOUNDARY_SENTENCE_END, - TEXT_BOUNDARY_LINE_START, - TEXT_BOUNDARY_LINE_END, - TEXT_BOUNDARY_ATTRIBUTE_RANGE -} TEXT_BOUNDARY_TYPE; + SPI_TEXT_BOUNDARY_CHAR, + SPI_TEXT_BOUNDARY_CURSOR_POS, + SPI_TEXT_BOUNDARY_WORD_START, + SPI_TEXT_BOUNDARY_WORD_END, + SPI_TEXT_BOUNDARY_SENTENCE_START, + SPI_TEXT_BOUNDARY_SENTENCE_END, + SPI_TEXT_BOUNDARY_LINE_START, + SPI_TEXT_BOUNDARY_LINE_END, + SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE +} SPI_TEXT_BOUNDARY_TYPE; @@ -52,10 +52,10 @@ typedef enum /* don't change the order of these ! */ -typedef enum _AccessibleCoordType { +typedef enum _SpiAccessibleCoordType { COORD_TYPE_SCREEN, COORD_TYPE_WINDOW -} AccessibleCoordType; +} SpiAccessibleCoordType; typedef enum _KeyEventType { KEY_PRESSED, @@ -69,11 +69,11 @@ typedef enum _KeySynthType { KEY_SYM } KeySynthType; -typedef enum _KeyListenerSyncType { - KEYLISTENER_SYNCHRONOUS = 1, - KEYLISTENER_CANCONSUME = 2, - KEYLISTENER_ALLWINDOWS = 4 -} KeyListenerSyncType; +typedef enum _KeySpiListenerSyncType { + KEYSPI_LISTENER_SYNCHRONOUS = 1, + KEYSPI_LISTENER_CANCONSUME = 2, + KEYSPI_LISTENER_ALLWINDOWS = 4 +} KeySpiListenerSyncType; typedef unsigned long KeyEventMask; @@ -145,16 +145,16 @@ SPI_eventIsReady (); * Used by clients that don't wish to use SPI_event_main(). * Not Yet Implemented. * - * Returns: the next #AccessibleEvent in the SPI event queue. + * Returns: the next #SpiAccessibleEvent in the SPI event queue. * **/ -AccessibleEvent * +SpiAccessibleEvent * SPI_nextEvent (boolean waitForEvent); /** * SPI_exit: * - * Disconnects from the Accessibility Registry and releases resources. + * Disconnects from the Accessibility SpiRegistry and releases resources. * Not Yet Implemented. * **/ @@ -162,51 +162,51 @@ void SPI_exit (void); /* - * Event Listener creation and support. + * Event SpiListener creation and support. */ /** * createEventListener: - * @callback : an #AccessibleEventListenerCB callback function, or NULL. + * @callback : an #SpiAccessibleEventListenerCB callback function, or NULL. * - * Create a new #AccessibleEventListener with a specified callback function. + * Create a new #SpiAccessibleEventListener with a specified callback function. * - * Returns: a pointer to a newly-created #AccessibleEventListener. + * Returns: a pointer to a newly-created #SpiAccessibleEventListener. * **/ -AccessibleEventListener * -createEventListener (AccessibleEventListenerCB callback); +SpiAccessibleEventListener * +createEventListener (SpiAccessibleEventListenerCB callback); /** * EventListener_addCallback: - * @listener: the #AccessibleEventListener instance to modify. - * @callback: an #AccessibleEventListenerCB function pointer. + * @listener: the #SpiAccessibleEventListener instance to modify. + * @callback: an #SpiAccessibleEventListenerCB function pointer. * - * Add an in-process callback function to an existing AccessibleEventListener. + * Add an in-process callback function to an existing SpiAccessibleEventListener. * * Returns: #TRUE if successful, otherwise #FALSE. * **/ boolean -EventListener_addCallback (AccessibleEventListener *listener, - AccessibleEventListenerCB callback); +EventListener_addCallback (SpiAccessibleEventListener *listener, + SpiAccessibleEventListenerCB callback); /** * EventListener_removeCallback: - * @listener: the #AccessibleEventListener instance to modify. - * @callback: an #AccessibleEventListenerCB function pointer. + * @listener: the #SpiAccessibleEventListener instance to modify. + * @callback: an #SpiAccessibleEventListenerCB function pointer. * - * Remove an in-process callback function from an existing AccessibleEventListener. + * Remove an in-process callback function from an existing SpiAccessibleEventListener. * * Returns: #TRUE if successful, otherwise #FALSE. * **/ boolean -EventListener_removeCallback (AccessibleEventListener *listener, - AccessibleEventListenerCB callback); +EventListener_removeCallback (SpiAccessibleEventListener *listener, + SpiAccessibleEventListenerCB callback); /** - * createKeyListener: + * createKeySpiListener: * @callback : an #KeystrokeListenerCB callback function, or NULL. * * Create a new #KeystrokeListener with a specified callback function. @@ -253,7 +253,7 @@ KeystrokeListener_removeCallback (KeystrokeListener *listener, /** * registerGlobalEventListener: - * @listener: the #AccessibleEventListener to be registered against an event type. + * @listener: the #SpiAccessibleEventListener to be registered against an event type. * @callback: a character string indicating the type of events for which * notification is requested. Format is * EventClass:major_type:minor_type:detail @@ -267,13 +267,13 @@ KeystrokeListener_removeCallback (KeystrokeListener *listener, * functions are used internally. In general, listening to * toolkit-specific events is not recommended. * - * Add an in-process callback function to an existing AccessibleEventListener. + * Add an in-process callback function to an existing SpiAccessibleEventListener. * * Returns: #TRUE if successful, otherwise #FALSE. * **/ boolean -registerGlobalEventListener (AccessibleEventListener *listener, +registerGlobalEventListener (SpiAccessibleEventListener *listener, char *eventType); /** @@ -297,15 +297,15 @@ getDesktopCount (); * NOTE: currently multiple virtual desktops are not implemented, this * function always returns '1'. * - * Returns: a pointer to the 'i-th' virtual desktop's #Accessible representation. + * Returns: a pointer to the 'i-th' virtual desktop's #SpiAccessible representation. * **/ -Accessible* +SpiAccessible* getDesktop (int n); /** * getDesktopList: - * @list: a pointer to an array of #Accessible objects. + * @list: a pointer to an array of #SpiAccessible objects. * * Get the list of virtual desktops. On return, @list will point * to a newly-created array of virtual desktop pointers. @@ -318,7 +318,7 @@ getDesktop (int n); * placed in the list pointed to by parameter @list. **/ int -getDesktopList (Accessible **list); +getDesktopList (SpiAccessible **list); /** * registerKeystrokeListener: @@ -333,7 +333,7 @@ registerKeystrokeListener (KeystrokeListener *listener, KeySet *keys, KeyMaskType modmask, KeyEventMask eventmask, - KeyListenerSyncType sync_type); + KeySpiListenerSyncType sync_type); /** * generateKeyEvent: @@ -366,362 +366,362 @@ generateMouseEvent (long x, long y, char *name); /* * - * Accessible function prototypes + * SpiAccessible function prototypes * */ /** - * Accessible_ref: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_ref: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Increment the reference count for an #Accessible object. + * Increment the reference count for an #SpiAccessible object. * * Returns: (no return code implemented yet). * **/ int -Accessible_ref (Accessible *obj); +SpiAccessible_ref (SpiAccessible *obj); /** - * Accessible_unref: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_unref: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Decrement the reference count for an #Accessible object. + * Decrement the reference count for an #SpiAccessible object. * * Returns: (no return code implemented yet). * **/ int -Accessible_unref (Accessible *obj); +SpiAccessible_unref (SpiAccessible *obj); /** - * Accessible_getName: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_getName: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the name of an #Accessible object. + * Get the name of an #SpiAccessible object. * - * Returns: a UTF-8 string indicating the name of the #Accessible object. + * Returns: a UTF-8 string indicating the name of the #SpiAccessible object. * **/ char * -Accessible_getName (Accessible *obj); +SpiAccessible_getName (SpiAccessible *obj); /** - * Accessible_getDescription: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_getDescription: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the description of an #Accessible object. + * Get the description of an #SpiAccessible object. * - * Returns: a UTF-8 string describing the #Accessible object. + * Returns: a UTF-8 string describing the #SpiAccessible object. * **/ char * -Accessible_getDescription (Accessible *obj); +SpiAccessible_getDescription (SpiAccessible *obj); /** - * Accessible_getParent: - * @obj: a pointer to the #Accessible object to query. + * SpiAccessible_getParent: + * @obj: a pointer to the #SpiAccessible object to query. * - * Get an #Accessible object's parent container. + * Get an #SpiAccessible object's parent container. * - * Returns: a pointer to the #Accessible object which contains the given - * #Accessible instance, or NULL if the @obj has no parent container. + * Returns: a pointer to the #SpiAccessible object which contains the given + * #SpiAccessible instance, or NULL if the @obj has no parent container. * **/ -Accessible * -Accessible_getParent (Accessible *obj); +SpiAccessible * +SpiAccessible_getParent (SpiAccessible *obj); /** - * Accessible_getChildCount: + * SpiAccessible_getChildCount: * - * @obj: a pointer to the #Accessible object on which to operate. + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the number of children contained by an #Accessible object. + * Get the number of children contained by an #SpiAccessible object. * - * Returns: a #long indicating the number of #Accessible children - * contained by an #Accessible object. + * Returns: a #long indicating the number of #SpiAccessible children + * contained by an #SpiAccessible object. * **/ long -Accessible_getChildCount (Accessible *obj); +SpiAccessible_getChildCount (SpiAccessible *obj); /** - * Accessible_getChildAtIndex: + * SpiAccessible_getChildAtIndex: * - * @obj: a pointer to the #Accessible object on which to operate. + * @obj: a pointer to the #SpiAccessible object on which to operate. * @childIndex: a #long indicating which child is specified. * - * Get the #Accessible child of an #Accessible object at a given index. + * Get the #SpiAccessible child of an #SpiAccessible object at a given index. * - * Returns: a pointer to the #Accessible child object at index + * Returns: a pointer to the #SpiAccessible child object at index * @childIndex. * **/ -Accessible * -Accessible_getChildAtIndex (Accessible *obj, +SpiAccessible * +SpiAccessible_getChildAtIndex (SpiAccessible *obj, long childIndex); /** - * Accessible_getIndexInParent: + * SpiAccessible_getIndexInParent: * - * @obj: a pointer to the #Accessible object on which to operate. + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the index of an #Accessible object in its containing #Accessible. + * Get the index of an #SpiAccessible object in its containing #SpiAccessible. * - * Returns: a #long indicating the index of the #Accessible object - * in its parent (i.e. containing) #Accessible instance, + * Returns: a #long indicating the index of the #SpiAccessible object + * in its parent (i.e. containing) #SpiAccessible instance, * or -1 if @obj has no containing parent. * **/ long -Accessible_getIndexInParent (Accessible *obj); +SpiAccessible_getIndexInParent (SpiAccessible *obj); /** - * Accessible_getRelationSet: + * SpiAccessible_getRelationSet: * * Not Yet Implemented. * **/ -AccessibleRelation ** -Accessible_getRelationSet (Accessible *obj); +SpiAccessibleRelation ** +SpiAccessible_getRelationSet (SpiAccessible *obj); /** - * Accessible_getRole: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_getRole: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the UI role of an #Accessible object. + * Get the UI role of an #SpiAccessible object. * - * Returns: a UTF-8 string indicating the UI role of the #Accessible object. + * Returns: a UTF-8 string indicating the UI role of the #SpiAccessible object. * **/ char * -Accessible_getRole (Accessible *obj); +SpiAccessible_getRole (SpiAccessible *obj); /** - * Accessible_getStateSet: + * SpiAccessible_getStateSet: * * Not Yet Implemented. * **/ -AccessibleStateSet * -Accessible_getStateSet (Accessible *obj); +SpiAccessibleStateSet * +SpiAccessible_getStateSet (SpiAccessible *obj); /* Interface query methods */ /** - * Accessible_isAction: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiAction: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleAction. + * Query whether the specified #SpiAccessible implements #SpiAccessibleAction. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleAction interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleAction interface, * #FALSE otherwise. **/ boolean -Accessible_isAction (Accessible *obj); +SpiAccessible_isSpiAction (SpiAccessible *obj); /** - * Accessible_isComponent: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiComponent: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleComponent. + * Query whether the specified #SpiAccessible implements #SpiAccessibleComponent. * - * Returns: #TRUE if @obj implements the #AccessibleComponent interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleComponent interface, * #FALSE otherwise. **/ boolean -Accessible_isComponent (Accessible *obj); +SpiAccessible_isSpiComponent (SpiAccessible *obj); /** - * Accessible_isEditableText: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiEditableText: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleEditableText. + * Query whether the specified #SpiAccessible implements #SpiAccessibleEditableText. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleEditableText interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleEditableText interface, * #FALSE otherwise. **/ boolean -Accessible_isEditableText (Accessible *obj); +SpiAccessible_isSpiEditableText (SpiAccessible *obj); /** - * Accessible_isHypertext: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiHypertext: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleHypertext. + * Query whether the specified #SpiAccessible implements #SpiAccessibleHypertext. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleHypertext interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleHypertext interface, * #FALSE otherwise. **/ boolean -Accessible_isHypertext (Accessible *obj); +SpiAccessible_isSpiHypertext (SpiAccessible *obj); /** - * Accessible_isImage: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiImage: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleImage. + * Query whether the specified #SpiAccessible implements #SpiAccessibleImage. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleImage interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleImage interface, * #FALSE otherwise. **/ boolean -Accessible_isImage (Accessible *obj); +SpiAccessible_isSpiImage (SpiAccessible *obj); /** - * Accessible_isSelection: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiSelection: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleSelection. + * Query whether the specified #SpiAccessible implements #SpiAccessibleSelection. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleSelection interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleSelection interface, * #FALSE otherwise. **/ boolean -Accessible_isSelection (Accessible *obj); +SpiAccessible_isSpiSelection (SpiAccessible *obj); /** - * Accessible_isTable: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiTable: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleTable. + * Query whether the specified #SpiAccessible implements #SpiAccessibleTable. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleTable interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleTable interface, * #FALSE otherwise. **/ boolean -Accessible_isTable (Accessible *obj); +SpiAccessible_isSpiTable (SpiAccessible *obj); /** - * Accessible_isText: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiText: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleText. + * Query whether the specified #SpiAccessible implements #SpiAccessibleText. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleText interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleText interface, * #FALSE otherwise. **/ boolean -Accessible_isText (Accessible *obj); +SpiAccessible_isSpiText (SpiAccessible *obj); /** - * Accessible_getAction: + * SpiAccessible_getAction: * * Not Yet Implemented. * **/ -AccessibleAction * -Accessible_getAction (Accessible *obj); +SpiAccessibleAction * +SpiAccessible_getAction (SpiAccessible *obj); /** - * Accessible_getComponent: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_getComponent: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Get the #AccessibleComponent interface for an #Accessible. + * Get the #SpiAccessibleComponent interface for an #SpiAccessible. * - * Returns: a pointer to an #AccessibleComponent interface instance, or - * NULL if @obj does not implement #AccessibleComponent. + * Returns: a pointer to an #SpiAccessibleComponent interface instance, or + * NULL if @obj does not implement #SpiAccessibleComponent. **/ -AccessibleComponent * -Accessible_getComponent (Accessible *obj); +SpiAccessibleComponent * +SpiAccessible_getComponent (SpiAccessible *obj); /** - * Accessible_getEditableText: + * SpiAccessible_getEditableText: * * Not Yet Implemented. * **/ -AccessibleEditableText * -Accessible_getEditableText (Accessible *obj); +SpiAccessibleEditableText * +SpiAccessible_getEditableText (SpiAccessible *obj); /** - * Accessible_getHypertext: + * SpiAccessible_getHypertext: * * Not Yet Implemented. * **/ -AccessibleHypertext * -Accessible_getHypertext (Accessible *obj); +SpiAccessibleHypertext * +SpiAccessible_getHypertext (SpiAccessible *obj); /** - * Accessible_getImage: + * SpiAccessible_getImage: * * Not Yet Implemented. * **/ -AccessibleImage * -Accessible_getImage (Accessible *obj); +SpiAccessibleImage * +SpiAccessible_getImage (SpiAccessible *obj); /** - * Accessible_getSelection: + * SpiAccessible_getSelection: * * Not Yet Implemented. * **/ -AccessibleSelection * -Accessible_getSelection (Accessible *obj); +SpiAccessibleSelection * +SpiAccessible_getSelection (SpiAccessible *obj); /** - * Accessible_getTable: + * SpiAccessible_getTable: * * Not Yet Implemented. * **/ -AccessibleTable * -Accessible_getTable (Accessible *obj); +SpiAccessibleTable * +SpiAccessible_getTable (SpiAccessible *obj); /** - * Accessible_getText: + * SpiAccessible_getText: * * Not Yet Implemented. * **/ -AccessibleText * -Accessible_getText (Accessible *obj); +SpiAccessibleText * +SpiAccessible_getText (SpiAccessible *obj); /** - * Accessible_queryInterface: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_queryInterface: + * @obj: a pointer to the #SpiAccessible instance to query. * @interface_name: a UTF-8 character string specifiying the requested interface. * - * Query an #Accessible object to for a named interface. + * Query an #SpiAccessible object to for a named interface. * * Returns: an instance of the named interface object, if it is implemented * by @obj, or NULL otherwise. * **/ GenericInterface * -Accessible_queryInterface (Accessible *obj, char *interface_name); +SpiAccessible_queryInterface (SpiAccessible *obj, char *interface_name); /* * - * AccessibleAction function prototypes + * SpiAccessibleAction function prototypes * */ int -AccessibleAction_ref ( - AccessibleAction *obj); +SpiAccessibleAction_ref ( + SpiAccessibleAction *obj); int -AccessibleAction_unref (AccessibleAction *obj); +SpiAccessibleAction_unref (SpiAccessibleAction *obj); long -AccessibleAction_getNActions (AccessibleAction *obj); +SpiAccessibleAction_getNSpiActions (SpiAccessibleAction *obj); /** - * AccessibleAction_getDescription: - * @obj: a pointer to the #AccessibleAction to query. + * SpiAccessibleAction_getDescription: + * @obj: a pointer to the #SpiAccessibleAction to query. * * Get the description of 'i-th' action invokable on an - * object implementing #AccessibleAction. + * object implementing #SpiAccessibleAction. * * Not Yet Implemented. * @@ -729,90 +729,90 @@ AccessibleAction_getNActions (AccessibleAction *obj); * **/ char * -AccessibleAction_getDescription (AccessibleAction *obj, +SpiAccessibleAction_getDescription (SpiAccessibleAction *obj, long index); boolean -AccessibleAction_doAction (AccessibleAction *obj, +SpiAccessibleAction_doSpiAction (SpiAccessibleAction *obj, long index); char * -AccessibleAction_getKeyBinding (AccessibleAction *obj, +SpiAccessibleAction_getKeyBinding (SpiAccessibleAction *obj, long index); /* * - * AccessibleApplication function prototypes + * SpiAccessibleApplication function prototypes * */ /** - * AccessibleApplication_unref: - * @obj: a pointer to the #AccessibleApplication on which to operate. + * SpiAccessibleApplication_unref: + * @obj: a pointer to the #SpiAccessibleApplication on which to operate. * - * Decrement the reference count for an #AccessibleApplication. + * Decrement the reference count for an #SpiAccessibleApplication. * * Returns: (no return code implemented yet). * **/ int -AccessibleApplication_ref (AccessibleApplication *obj); +SpiAccessibleApplication_ref (SpiAccessibleApplication *obj); /** - * AccessibleApplication_unref: - * @obj: a pointer to the #AccessibleApplication object on which to operate. + * SpiAccessibleApplication_unref: + * @obj: a pointer to the #SpiAccessibleApplication object on which to operate. * - * Decrement the reference count for an #AccessibleApplication. + * Decrement the reference count for an #SpiAccessibleApplication. * * Returns: (no return code implemented yet). * **/ int -AccessibleApplication_unref (AccessibleApplication *obj); +SpiAccessibleApplication_unref (SpiAccessibleApplication *obj); /** - * AccessibleApplication_getToolkitName: - * @obj: a pointer to the #AccessibleApplication to query. + * SpiAccessibleApplication_getToolkitName: + * @obj: a pointer to the #SpiAccessibleApplication to query. * - * Get the name of the UI toolkit used by an #AccessibleApplication. + * Get the name of the UI toolkit used by an #SpiAccessibleApplication. * * Returns: a UTF-8 string indicating which UI toolkit is * used by an application. * **/ char * -AccessibleApplication_getToolkitName (AccessibleApplication *obj); +SpiAccessibleApplication_getToolkitName (SpiAccessibleApplication *obj); /** - * AccessibleApplication_getVersion: - * @obj: a pointer to the #AccessibleApplication being queried. + * SpiAccessibleApplication_getVersion: + * @obj: a pointer to the #SpiAccessibleApplication being queried. * * Get the version of the at-spi bridge exported by an - * #AccessibleApplication instance. + * #SpiAccessibleApplication instance. * * Returns: a UTF-8 string indicating the application's * at-spi version. * **/ char * -AccessibleApplication_getVersion (AccessibleApplication *obj); +SpiAccessibleApplication_getVersion (SpiAccessibleApplication *obj); /** - * AccessibleApplication_getID: - * @obj: a pointer to the #AccessibleApplication being queried. + * SpiAccessibleApplication_getID: + * @obj: a pointer to the #SpiAccessibleApplication being queried. * - * Get the unique ID assigned by the Registry to an - * #AccessibleApplication instance. + * Get the unique ID assigned by the SpiRegistry to an + * #SpiAccessibleApplication instance. * (Not Yet Implemented by the registry). * * Returns: a unique #long integer associated with the application - * by the Registry, or 0 if the application is not registered. + * by the SpiRegistry, or 0 if the application is not registered. **/ long -AccessibleApplication_getID (AccessibleApplication *obj); +SpiAccessibleApplication_getID (SpiAccessibleApplication *obj); /** - * AccessibleApplication_pause: + * SpiAccessibleApplication_pause: * * Attempt to pause the application (used when client event queue is * over-full). @@ -822,47 +822,47 @@ AccessibleApplication_getID (AccessibleApplication *obj); * **/ boolean -AccessibleApplication_pause (AccessibleApplication *obj); +SpiAccessibleApplication_pause (SpiAccessibleApplication *obj); /** - * AccessibleApplication_pause: + * SpiAccessibleApplication_pause: * - * Attempt to resume the application (used after #AccessibleApplication_pause). + * Attempt to resume the application (used after #SpiAccessibleApplication_pause). * Not Yet Implemented. * * Returns: #TRUE if application processing resumed successfully, #FALSE otherwise. * **/ boolean -AccessibleApplication_resume (AccessibleApplication *obj); +SpiAccessibleApplication_resume (SpiAccessibleApplication *obj); /* * - * AccessibleComponent function prototypes + * SpiAccessibleComponent function prototypes * */ int -AccessibleComponent_ref (AccessibleComponent *obj); +SpiAccessibleComponent_ref (SpiAccessibleComponent *obj); int -AccessibleComponent_unref (AccessibleComponent *obj); +SpiAccessibleComponent_unref (SpiAccessibleComponent *obj); boolean -AccessibleComponent_contains (AccessibleComponent *obj, +SpiAccessibleComponent_contains (SpiAccessibleComponent *obj, long x, long y, - AccessibleCoordType ctype); + SpiAccessibleCoordType ctype); -Accessible * -AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj, +SpiAccessible * +SpiAccessibleComponent_getAccessibleAtPoint (SpiAccessibleComponent *obj, long x, long y, - AccessibleCoordType ctype); + SpiAccessibleCoordType ctype); /** - * AccessibleComponent_getExtents: - * @obj: a pointer to the #AccessibleComponent to query. + * SpiAccessibleComponent_getExtents: + * @obj: a pointer to the #SpiAccessibleComponent to query. * @x: a pointer to a #long into which the minimum x coordinate will be returned. * @y: a pointer to a #long into which the minimum y coordinate will be returned. * @width: a pointer to a #long into which the x extents (width) will be returned. @@ -870,456 +870,456 @@ AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj, * @ctype: the desired coordinate system into which to return the results, * (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN). * - * Get the bounding box of the specified #AccessibleComponent. + * Get the bounding box of the specified #SpiAccessibleComponent. * **/ void -AccessibleComponent_getExtents (AccessibleComponent *obj, +SpiAccessibleComponent_getExtents (SpiAccessibleComponent *obj, long *x, long *y, long *width, long *height, - AccessibleCoordType ctype); + SpiAccessibleCoordType ctype); void -AccessibleComponent_getPosition (AccessibleComponent *obj, +SpiAccessibleComponent_getPosition (SpiAccessibleComponent *obj, long *x, long *y, - AccessibleCoordType ctype); + SpiAccessibleCoordType ctype); void -AccessibleComponent_getSize (AccessibleComponent *obj, +SpiAccessibleComponent_getSize (SpiAccessibleComponent *obj, long *width, long *height); void -AccessibleComponent_grabFocus (AccessibleComponent *obj); +SpiAccessibleComponent_grabFocus (SpiAccessibleComponent *obj); /* * - * AccessibleEditableText function prototypes + * SpiAccessibleEditableText function prototypes * */ int -AccessibleEditableText_ref (AccessibleEditableText *obj); +SpiAccessibleEditableText_ref (SpiAccessibleEditableText *obj); int -AccessibleEditableText_unref (AccessibleEditableText *obj); +SpiAccessibleEditableText_unref (SpiAccessibleEditableText *obj); boolean -AccessibleEditableText_setRunAttributes (AccessibleEditableText *obj, +SpiAccessibleEditableText_setRunAttributes (SpiAccessibleEditableText *obj, const char *attributes, long startPos, long endPos); void -AccessibleEditableText_setTextContents (AccessibleEditableText *obj, +SpiAccessibleEditableText_setTextContents (SpiAccessibleEditableText *obj, const char *newContents); void -AccessibleEditableText_insertText (AccessibleEditableText *obj, +SpiAccessibleEditableText_insertText (SpiAccessibleEditableText *obj, long position, char *text, long length); void -AccessibleEditableText_copyText (AccessibleText *obj, +SpiAccessibleEditableText_copySpiText (SpiAccessibleText *obj, long startPos, long endPos); void -AccessibleEditableText_cutText (AccessibleEditableText *obj, +SpiAccessibleEditableText_cutText (SpiAccessibleEditableText *obj, long startPos, long endPos); void -AccessibleEditableText_deleteText (AccessibleEditableText *obj, +SpiAccessibleEditableText_deleteText (SpiAccessibleEditableText *obj, long startPos, long endPos); void -AccessibleEditableText_pasteText (AccessibleEditableText *obj, +SpiAccessibleEditableText_pasteText (SpiAccessibleEditableText *obj, long position); /* * - * AccessibleHyperlink function prototypes + * SpiAccessibleHyperlink function prototypes * */ int -AccessibleHyperlink_ref (AccessibleHyperlink *obj); +SpiAccessibleHyperlink_ref (SpiAccessibleHyperlink *obj); int -AccessibleHyperlink_unref (AccessibleHyperlink *obj); +SpiAccessibleHyperlink_unref (SpiAccessibleHyperlink *obj); long -AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj); +SpiAccessibleHyperlink_getNAnchors (SpiAccessibleHyperlink *obj); char * -AccessibleHyperlink_getURI (AccessibleHyperlink *obj, +SpiAccessibleHyperlink_getURI (SpiAccessibleHyperlink *obj, long i); -Accessible -AccessibleHyperlink_getObject (AccessibleHyperlink *obj, +SpiAccessible +SpiAccessibleHyperlink_getObject (SpiAccessibleHyperlink *obj, long i); void -AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj, +SpiAccessibleHyperlink_getIndexRange (SpiAccessibleHyperlink *obj, long *startIndex, long *endIndex); boolean -AccessibleHyperlink_isValid (AccessibleHyperlink *obj); +SpiAccessibleHyperlink_isValid (SpiAccessibleHyperlink *obj); /* * - * AccessibleHypertext function prototypes + * SpiAccessibleHypertext function prototypes * */ int -AccessibleHypertext_ref (AccessibleHypertext *obj); +SpiAccessibleHyperspi_text_ref (SpiAccessibleHypertext *obj); int -AccessibleHypertext_unref (AccessibleHypertext *obj); +SpiAccessibleHyperspi_text_unref (SpiAccessibleHypertext *obj); long -AccessibleHypertext_getNLinks (AccessibleHypertext *obj); +SpiAccessibleHyperspi_text_getNLinks (SpiAccessibleHypertext *obj); -AccessibleHyperlink * -AccessibleHyperText_getLink (AccessibleHypertext *obj, +SpiAccessibleHyperlink * +SpiAccessibleHyperSpiText_getLink (SpiAccessibleHypertext *obj, long linkIndex); long -AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj, +SpiAccessibleHyperspi_text_getLinkIndex (SpiAccessibleHypertext *obj, long characterIndex); /* * - * AccessibleImage function prototypes + * SpiAccessibleImage function prototypes * */ int -AccessibleImage_ref (AccessibleImage *obj); +SpiAccessibleImage_ref (SpiAccessibleImage *obj); int -AccessibleImage_unref (AccessibleImage *obj); +SpiAccessibleImage_unref (SpiAccessibleImage *obj); char * -AccessibleImage_getImageDescription (AccessibleImage *obj); +SpiAccessibleImage_getImageDescription (SpiAccessibleImage *obj); void -AccessibleImage_getImageSize (AccessibleImage *obj, +SpiAccessibleImage_getImageSize (SpiAccessibleImage *obj, long *width, long *height); void -AccessibleImage_getImagePosition (AccessibleImage *obj, +SpiAccessibleImage_getImagePosition (SpiAccessibleImage *obj, long *x, long *y, - AccessibleCoordType ctype); + SpiAccessibleCoordType ctype); /* * - * AccessibleRelation function prototypes + * SpiAccessibleRelation function prototypes * */ int -AccessibleRelation_ref (AccessibleRelation *obj); +SpiAccessibleRelation_ref (SpiAccessibleRelation *obj); int -AccessibleRelation_unref (AccessibleRelation *obj); +SpiAccessibleRelation_unref (SpiAccessibleRelation *obj); RELATION_TYPE -AccessibleRelation_getRelationType (AccessibleRelation *obj); +SpiAccessibleRelation_getRelationType (SpiAccessibleRelation *obj); -Accessible * -AccessibleRelation_getTarget (AccessibleRelation *obj); +SpiAccessible * +SpiAccessibleRelation_getTarget (SpiAccessibleRelation *obj); /* * - * AccessibleSelection function prototypes + * SpiAccessibleSelection function prototypes * */ int -AccessibleSelection_ref (AccessibleSelection *obj); +SpiAccessibleSelection_ref (SpiAccessibleSelection *obj); int -AccessibleSelection_unref (AccessibleSelection *obj); +SpiAccessibleSelection_unref (SpiAccessibleSelection *obj); long -AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj); +SpiAccessibleSelection_getNSelectedChildren (SpiAccessibleSelection *obj); -Accessible * -AccessibleSelection_getSelectedChild (AccessibleSelection *obj, +SpiAccessible * +SpiAccessibleSelection_getSelectedChild (SpiAccessibleSelection *obj, long selectedChildIndex); boolean -AccessibleSelection_selectChild (AccessibleSelection *obj, +SpiAccessibleSelection_selectChild (SpiAccessibleSelection *obj, long childIndex); boolean -AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj, +SpiAccessibleSelection_deselectSelectedChild (SpiAccessibleSelection *obj, long selectedChildIndex); boolean -AccessibleSelection_isChildSelected (AccessibleSelection *obj, +SpiAccessibleSelection_isChildSelected (SpiAccessibleSelection *obj, long childIndex); void -AccessibleSelection_selectAll (AccessibleSelection *obj); +SpiAccessibleSelection_selectAll (SpiAccessibleSelection *obj); void -AccessibleSelection_clearSelection (AccessibleSelection *obj); +SpiAccessibleSelection_clearSpiSelection (SpiAccessibleSelection *obj); /* * - * AccessibleStateSet function prototypes + * SpiAccessibleStateSet function prototypes * */ int -AccessibleStateSet_ref (AccessibleStateSet *obj); +SpiAccessibleStateSet_ref (SpiAccessibleStateSet *obj); int -AccessibleStateSet_unref (AccessibleStateSet *obj); +SpiAccessibleStateSet_unref (SpiAccessibleStateSet *obj); boolean -AccessibleStateSet_contains (AccessibleStateSet *obj, - ACCESSIBLE_STATE state); +SpiAccessibleStateSet_contains (SpiAccessibleStateSet *obj, + SPI_ACCESSIBLE_STATE state); void -AccessibleStateSet_add (AccessibleStateSet *obj, - ACCESSIBLE_STATE state); +SpiAccessibleStateSet_add (SpiAccessibleStateSet *obj, + SPI_ACCESSIBLE_STATE state); void -AccessibleStateSet_remove (AccessibleStateSet *obj, - ACCESSIBLE_STATE state); +SpiAccessibleStateSet_remove (SpiAccessibleStateSet *obj, + SPI_ACCESSIBLE_STATE state); boolean -AccessibleStateSet_equals (AccessibleStateSet *obj, - AccessibleStateSet *obj2); +SpiAccessibleStateSet_equals (SpiAccessibleStateSet *obj, + SpiAccessibleStateSet *obj2); void -AccessibleStateSet_compare (AccessibleStateSet *obj, - AccessibleStateSet *obj2, - AccessibleStateSet **differenceSet); +SpiAccessibleStateSet_compare (SpiAccessibleStateSet *obj, + SpiAccessibleStateSet *obj2, + SpiAccessibleStateSet **differenceSet); boolean -AccessibleStateSet_isEmpty (AccessibleStateSet *obj); +SpiAccessibleStateSet_isEmpty (SpiAccessibleStateSet *obj); /* * - * AccessibleTable function prototypes + * SpiAccessibleTable function prototypes * */ int -AccessibleTable_ref (AccessibleTable *obj); +SpiAccessibleTable_ref (SpiAccessibleTable *obj); int -AccessibleTable_unref (AccessibleTable *obj); +SpiAccessibleTable_unref (SpiAccessibleTable *obj); -Accessible * -AccessibleTable_getCaption (AccessibleTable *obj); +SpiAccessible * +SpiAccessibleTable_getCaption (SpiAccessibleTable *obj); -Accessible * -AccessibleTable_getSummary (AccessibleTable *obj); +SpiAccessible * +SpiAccessibleTable_getSummary (SpiAccessibleTable *obj); long -AccessibleTable_getNRows (AccessibleTable *obj); +SpiAccessibleTable_getNRows (SpiAccessibleTable *obj); long -AccessibleTable_getNColumns (AccessibleTable *obj); +SpiAccessibleTable_getNColumns (SpiAccessibleTable *obj); -Accessible * -AccessibleTable_refAt (AccessibleTable *obj, +SpiAccessible * +SpiAccessibleTable_refAt (SpiAccessibleTable *obj, long row, long column); long -AccessibleTable_getIndexAt (AccessibleTable *obj, +SpiAccessibleTable_getIndexAt (SpiAccessibleTable *obj, long row, long column); long -AccessibleTable_getRowAtIndex (AccessibleTable *obj, +SpiAccessibleTable_getRowAtIndex (SpiAccessibleTable *obj, long index); long -AccessibleTable_getColumnAtIndex (AccessibleTable *obj, +SpiAccessibleTable_getColumnAtIndex (SpiAccessibleTable *obj, long index); char * -AccessibleTable_getRowDescription (AccessibleTable *obj, +SpiAccessibleTable_getRowDescription (SpiAccessibleTable *obj, long row); char * -AccessibleTable_getColumnDescription (AccessibleTable *obj, +SpiAccessibleTable_getColumnDescription (SpiAccessibleTable *obj, long column); long -AccessibleTable_getRowExtentAt (AccessibleTable *obj, +SpiAccessibleTable_getRowExtentAt (SpiAccessibleTable *obj, long row, long column); long -AccessibleTable_getColumnExtentAt (AccessibleTable *obj, +SpiAccessibleTable_getColumnExtentAt (SpiAccessibleTable *obj, long row, long column); -Accessible * -AccessibleTable_getRowHeader (AccessibleTable *obj, +SpiAccessible * +SpiAccessibleTable_getRowHeader (SpiAccessibleTable *obj, long row); -Accessible * -AccessibleTable_getColumnHeader (AccessibleTable *obj, +SpiAccessible * +SpiAccessibleTable_getColumnHeader (SpiAccessibleTable *obj, long column); long -AccessibleTable_getNSelectedRows (AccessibleTable *obj); +SpiAccessibleTable_getNSelectedRows (SpiAccessibleTable *obj); long -AccessibleTable_getSelectedRows (AccessibleTable *obj, +SpiAccessibleTable_getSelectedRows (SpiAccessibleTable *obj, long **selectedRows); long -AccessibleTable_getNSelectedColumns (AccessibleTable *obj); +SpiAccessibleTable_getNSelectedColumns (SpiAccessibleTable *obj); long -AccessibleTable_getSelectedColumns (AccessibleTable *obj, +SpiAccessibleTable_getSelectedColumns (SpiAccessibleTable *obj, long **selectedColumns); boolean -AccessibleTable_isRowSelected (AccessibleTable *obj, +SpiAccessibleTable_isRowSelected (SpiAccessibleTable *obj, long row); boolean -AccessibleTable_isColumnSelected (AccessibleTable *obj, +SpiAccessibleTable_isColumnSelected (SpiAccessibleTable *obj, long column); boolean -AccessibleTable_isSelected (AccessibleTable *obj, +SpiAccessibleTable_isSelected (SpiAccessibleTable *obj, long row, long column); /* * - * AccessibleText function prototypes + * SpiAccessibleText function prototypes * */ int -AccessibleText_ref (AccessibleText *obj); +SpiAccessibleText_ref (SpiAccessibleText *obj); int -AccessibleText_unref (AccessibleText *obj); +SpiAccessibleText_unref (SpiAccessibleText *obj); long -AccessibleText_getCharacterCount (AccessibleText *obj); +SpiAccessibleText_getCharacterCount (SpiAccessibleText *obj); char * -AccessibleText_getText (AccessibleText *obj, +SpiAccessibleText_getText (SpiAccessibleText *obj, long startOffset, long endOffset); long -AccessibleText_getCaretOffset (AccessibleText *obj); +SpiAccessibleText_getCaretOffset (SpiAccessibleText *obj); char * -AccessibleText_getAttributes (AccessibleText *obj, +SpiAccessibleText_getAttributes (SpiAccessibleText *obj, long offset, long *startOffset, long *endOfset); boolean -AccessibleText_setCaretOffset (AccessibleText *obj, +SpiAccessibleText_setCaretOffset (SpiAccessibleText *obj, long newOffset); char * -AccessibleText_getTextBeforeOffset (AccessibleText *obj, +SpiAccessibleText_getTextBeforeOffset (SpiAccessibleText *obj, long offset, - TEXT_BOUNDARY_TYPE type, + SPI_TEXT_BOUNDARY_TYPE type, long *startOffset, long *endOffset); char * -AccessibleText_getTextAtOffset (AccessibleText *obj, +SpiAccessibleText_getTextAtOffset (SpiAccessibleText *obj, long offset, - TEXT_BOUNDARY_TYPE type, + SPI_TEXT_BOUNDARY_TYPE type, long *startOffset, long *endOffset); char * -AccessibleText_getTextAfterOffset (AccessibleText *obj, +SpiAccessibleText_getTextAfterOffset (SpiAccessibleText *obj, long offset, - TEXT_BOUNDARY_TYPE type, + SPI_TEXT_BOUNDARY_TYPE type, long *startOffset, long *endOffset); unsigned long -AccessibleText_getCharacterAtOffset (AccessibleText *obj, +SpiAccessibleText_getCharacterAtOffset (SpiAccessibleText *obj, long offset); void -AccessibleText_getCharacterExtents (AccessibleText *obj, +SpiAccessibleText_getCharacterExtents (SpiAccessibleText *obj, long offset, long *x, long *y, long *width, - long *height, AccessibleCoordType type); + long *height, SpiAccessibleCoordType type); long -AccessibleText_getOffsetAtPoint (AccessibleText *obj, +SpiAccessibleText_getOffsetAtPoint (SpiAccessibleText *obj, long x, - long y, AccessibleCoordType type); + long y, SpiAccessibleCoordType type); long -AccessibleText_getNSelections (AccessibleText *obj); +SpiAccessibleText_getNSpiSelections (SpiAccessibleText *obj); void -AccessibleText_getSelection (AccessibleText *obj, +SpiAccessibleText_getSelection (SpiAccessibleText *obj, long selectionNum, long *startOffset, long *endOffset); boolean -AccessibleText_addSelection (AccessibleText *obj, +SpiAccessibleText_addSpiSelection (SpiAccessibleText *obj, long startOffset, long endOffset); boolean -AccessibleText_removeSelection (AccessibleText *obj, +SpiAccessibleText_removeSelection (SpiAccessibleText *obj, long selectionNum); boolean -AccessibleText_setSelection (AccessibleText *obj, +SpiAccessibleText_setSelection (SpiAccessibleText *obj, long selectionNum, long startOffset, long endOffset); /* * - * AccessibleValue Function Prototypes: + * SpiAccessibleValue Function Prototypes: * */ float -AccessibleValue_getMinimumValue (AccessibleValue *value); +SpiAccessibleValue_getMinimumSpiValue (SpiAccessibleValue *value); float -AccessibleValue_getCurrentValue (AccessibleValue *value); +SpiAccessibleValue_getCurrentValue (SpiAccessibleValue *value); float -AccessibleValue_getMaximumValue (AccessibleValue *value); +SpiAccessibleValue_getMaximumSpiValue (SpiAccessibleValue *value); boolean -AccessibleValue_setCurrentValue (AccessibleValue *value, - float newValue); +SpiAccessibleValue_setCurrentValue (SpiAccessibleValue *value, + float newSpiValue); void spi_freeString (char *s); diff --git a/cspi/spi_accessible.c b/cspi/spi_accessible.c index f418ba1..ca47d9d 100644 --- a/cspi/spi_accessible.c +++ b/cspi/spi_accessible.c @@ -75,7 +75,7 @@ static char *role_names [MAX_ROLES] = * Returns a localizable string name for an AtkRole enumerated type. */ char* -Accessible_Role_getName (Accessibility_Role role) +SpiAccessible_Role_getName (Accessibility_Role role) { if (role < MAX_ROLES) return role_names [(int) role]; else return ""; @@ -84,197 +84,197 @@ Accessible_Role_getName (Accessibility_Role role) /** - * Accessible_ref: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_ref: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Increment the reference count for an #Accessible object. + * Increment the reference count for an #SpiAccessible object. * * Returns: (no return code implemented yet). * **/ int -Accessible_ref (Accessible *obj) +SpiAccessible_ref (SpiAccessible *obj) { - Accessibility_Accessible_ref (*obj, &ev); + Accessibility_SpiAccessible_ref (*obj, &ev); spi_check_ev (&ev, "ref"); return 0; } /** - * Accessible_unref: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_unref: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Decrement the reference count for an #Accessible object. + * Decrement the reference count for an #SpiAccessible object. * * Returns: (no return code implemented yet). * **/ int -Accessible_unref (Accessible *obj) +SpiAccessible_unref (SpiAccessible *obj) { - Accessibility_Accessible_unref (*obj, &ev); + Accessibility_SpiAccessible_unref (*obj, &ev); spi_check_ev (&ev, "unref"); return 0; } /** - * Accessible_getName: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_getName: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the name of an #Accessible object. + * Get the name of an #SpiAccessible object. * - * Returns: a UTF-8 string indicating the name of the #Accessible object. + * Returns: a UTF-8 string indicating the name of the #SpiAccessible object. * **/ char * -Accessible_getName (Accessible *obj) +SpiAccessible_getName (SpiAccessible *obj) { char *retval = (char *) - Accessibility_Accessible__get_name (*obj, &ev); + Accessibility_SpiAccessible__get_name (*obj, &ev); spi_check_ev (&ev, "getName"); return retval; } /** - * Accessible_getDescription: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_getDescription: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the description of an #Accessible object. + * Get the description of an #SpiAccessible object. * - * Returns: a UTF-8 string describing the #Accessible object. + * Returns: a UTF-8 string describing the #SpiAccessible object. * **/ char * -Accessible_getDescription (Accessible *obj) +SpiAccessible_getDescription (SpiAccessible *obj) { char *retval = (char *) - Accessibility_Accessible__get_description (*obj, &ev); + Accessibility_SpiAccessible__get_description (*obj, &ev); spi_check_ev (&ev, "getDescription"); return retval; } /** - * Accessible_getParent: - * @obj: a pointer to the #Accessible object to query. + * SpiAccessible_getParent: + * @obj: a pointer to the #SpiAccessible object to query. * - * Get an #Accessible object's parent container. + * Get an #SpiAccessible object's parent container. * - * Returns: a pointer tothe #Accessible object which contains the given - * #Accessible instance, or NULL if the @obj has no parent container. + * Returns: a pointer tothe #SpiAccessible object which contains the given + * #SpiAccessible instance, or NULL if the @obj has no parent container. * **/ -Accessible * -Accessible_getParent (Accessible *obj) +SpiAccessible * +SpiAccessible_getParent (SpiAccessible *obj) { - Accessible *retval = - Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev)); + SpiAccessible *retval = + Obj_Add (Accessibility_SpiAccessible__get_parent (*obj, &ev)); spi_check_ev (&ev, "getParent"); return retval; } /** - * Accessible_getChildCount: + * SpiAccessible_getChildCount: * - * @obj: a pointer to the #Accessible object on which to operate. + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the number of children contained by an #Accessible object. + * Get the number of children contained by an #SpiAccessible object. * - * Returns: a #long indicating the number of #Accessible children - * contained by an #Accessible object. + * Returns: a #long indicating the number of #SpiAccessible children + * contained by an #SpiAccessible object. * **/ long -Accessible_getChildCount (Accessible *obj) +SpiAccessible_getChildCount (SpiAccessible *obj) { - long retval = (long) Accessibility_Accessible__get_childCount (*obj, &ev); + long retval = (long) Accessibility_SpiAccessible__get_childCount (*obj, &ev); spi_check_ev (&ev, "getChildCount"); return retval; } /** - * Accessible_getChildAtIndex: + * SpiAccessible_getChildAtIndex: * - * @obj: a pointer to the #Accessible object on which to operate. + * @obj: a pointer to the #SpiAccessible object on which to operate. * @childIndex: a #long indicating which child is specified. * - * Get the #Accessible child of an #Accessible object at a given index. + * Get the #SpiAccessible child of an #SpiAccessible object at a given index. * - * Returns: a pointer to the #Accessible child object at index + * Returns: a pointer to the #SpiAccessible child object at index * @childIndex. * **/ -Accessible * -Accessible_getChildAtIndex (Accessible *obj, +SpiAccessible * +SpiAccessible_getChildAtIndex (SpiAccessible *obj, long childIndex) { - Accessible *retval = Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev)); + SpiAccessible *retval = Obj_Add (Accessibility_SpiAccessible_getChildAtIndex (*obj, childIndex, &ev)); spi_check_ev (&ev, "getChildAtIndex"); return retval; } /** - * Accessible_getIndexInParent: + * SpiAccessible_getIndexInParent: * - * @obj: a pointer to the #Accessible object on which to operate. + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the index of an #Accessible object in its containing #Accessible. + * Get the index of an #SpiAccessible object in its containing #SpiAccessible. * - * Returns: a #long indicating the index of the #Accessible object - * in its parent (i.e. containing) #Accessible instance, + * Returns: a #long indicating the index of the #SpiAccessible object + * in its parent (i.e. containing) #SpiAccessible instance, * or -1 if @obj has no containing parent. * **/ long -Accessible_getIndexInParent (Accessible *obj) +SpiAccessible_getIndexInParent (SpiAccessible *obj) { - long retval = (long) Accessibility_Accessible_getIndexInParent (*obj, &ev); + long retval = (long) Accessibility_SpiAccessible_getIndexInParent (*obj, &ev); spi_check_ev (&ev, "getIndexInParent"); return retval; } /** - * Accessible_getRelationSet: + * SpiAccessible_getRelationSet: * * Not Yet Implemented. * - * Returns: a pointer to an array of #AccessibleRelations. + * Returns: a pointer to an array of #SpiAccessibleRelations. * **/ -AccessibleRelation ** -Accessible_getRelationSet (Accessible *obj) +SpiAccessibleRelation ** +SpiAccessible_getRelationSet (SpiAccessible *obj) { return NULL; } /** - * Accessible_getRole: - * @obj: a pointer to the #Accessible object on which to operate. + * SpiAccessible_getRole: + * @obj: a pointer to the #SpiAccessible object on which to operate. * - * Get the UI role of an #Accessible object. + * Get the UI role of an #SpiAccessible object. * - * Returns: a UTF-8 string indicating the UI role of the #Accessible object. + * Returns: a UTF-8 string indicating the UI role of the #SpiAccessible object. * **/ char * -Accessible_getRole (Accessible *obj) +SpiAccessible_getRole (SpiAccessible *obj) { - char *retval = Accessible_Role_getName ( - Accessibility_Accessible_getRole (*obj, &ev)); + char *retval = SpiAccessible_Role_getName ( + Accessibility_SpiAccessible_getRole (*obj, &ev)); spi_check_ev (&ev, "getRole"); return retval; } /** - * Accessible_getStateSet: + * SpiAccessible_getStateSet: * * Not Yet Implemented. * - * Returns: a pointer to an #AccessibleStateSet representing the object's current state. + * Returns: a pointer to an #SpiAccessibleStateSet representing the object's current state. **/ -AccessibleStateSet * -Accessible_getStateSet (Accessible *obj) +SpiAccessibleStateSet * +SpiAccessible_getStateSet (SpiAccessible *obj) { return NULL; } @@ -282,363 +282,363 @@ Accessible_getStateSet (Accessible *obj) /* Interface query methods */ /** - * Accessible_isAction: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiAction: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleAction. + * Query whether the specified #SpiAccessible implements #SpiAccessibleAction. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleAction interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleAction interface, * #FALSE otherwise. **/ boolean -Accessible_isAction (Accessible *obj) +SpiAccessible_isSpiAction (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Action:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiAction:1.0", &ev); - spi_warn_ev (&ev, "isAction"); + spi_warn_ev (&ev, "isSpiAction"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_isComponent: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiComponent: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleComponent. + * Query whether the specified #SpiAccessible implements #SpiAccessibleComponent. * - * Returns: #TRUE if @obj implements the #AccessibleComponent interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleComponent interface, * #FALSE otherwise. **/ boolean -Accessible_isComponent (Accessible *obj) +SpiAccessible_isSpiComponent (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Component:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiComponent:1.0", &ev); - spi_warn_ev (&ev, "isComponent"); + spi_warn_ev (&ev, "isSpiComponent"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_isEditableText: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiEditableText: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleEditableText. + * Query whether the specified #SpiAccessible implements #SpiAccessibleEditableText. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleEditableText interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleEditableText interface, * #FALSE otherwise. **/ boolean -Accessible_isEditableText (Accessible *obj) +SpiAccessible_isSpiEditableText (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/EditableText:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiEditableText:1.0", &ev); - spi_check_ev (&ev, "isEditableText"); + spi_check_ev (&ev, "isSpiEditableText"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_isHypertext: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiHypertext: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleHypertext. + * Query whether the specified #SpiAccessible implements #SpiAccessibleHypertext. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleHypertext interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleHypertext interface, * #FALSE otherwise. **/ boolean -Accessible_isHypertext (Accessible *obj) +SpiAccessible_isSpiHypertext (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Hypertext:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiHypertext:1.0", &ev); - spi_check_ev (&ev, "isHypertext"); + spi_check_ev (&ev, "isSpiHypertext"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_isImage: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiImage: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleImage. + * Query whether the specified #SpiAccessible implements #SpiAccessibleImage. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleImage interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleImage interface, * #FALSE otherwise. **/ boolean -Accessible_isImage (Accessible *obj) +SpiAccessible_isSpiImage (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Image:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiImage:1.0", &ev); - spi_check_ev (&ev, "isImage"); + spi_check_ev (&ev, "isSpiImage"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_isSelection: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiSelection: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleSelection. + * Query whether the specified #SpiAccessible implements #SpiAccessibleSelection. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleSelection interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleSelection interface, * #FALSE otherwise. **/ boolean -Accessible_isSelection (Accessible *obj) +SpiAccessible_isSpiSelection (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Selection:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiSelection:1.0", &ev); - spi_warn_ev (&ev, "isSelection"); + spi_warn_ev (&ev, "isSpiSelection"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_isTable: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiTable: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleTable. + * Query whether the specified #SpiAccessible implements #SpiAccessibleTable. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleTable interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleTable interface, * #FALSE otherwise. **/ boolean -Accessible_isTable (Accessible *obj) +SpiAccessible_isSpiTable (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Table:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiTable:1.0", &ev); - spi_check_ev (&ev, "isTable"); + spi_check_ev (&ev, "isSpiTable"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_isText: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiText: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleText. + * Query whether the specified #SpiAccessible implements #SpiAccessibleText. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleText interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleText interface, * #FALSE otherwise. **/ boolean -Accessible_isText (Accessible *obj) +SpiAccessible_isSpiText (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Text:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiText:1.0", &ev); - spi_warn_ev (&ev, "isText"); + spi_warn_ev (&ev, "isSpiText"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_isValue: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_isSpiValue: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Query whether the specified #Accessible implements #AccessibleValue. + * Query whether the specified #SpiAccessible implements #SpiAccessibleValue. * Not Yet Implemented. * - * Returns: #TRUE if @obj implements the #AccessibleValue interface, + * Returns: #TRUE if @obj implements the #SpiAccessibleValue interface, * #FALSE otherwise. **/ boolean -Accessible_isValue (Accessible *obj) +SpiAccessible_isSpiValue (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Value:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiValue:1.0", &ev); - spi_check_ev (&ev, "isValue"); + spi_check_ev (&ev, "isSpiValue"); return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE; } /** - * Accessible_getAction: + * SpiAccessible_getAction: * * Not Yet Implemented. * **/ -AccessibleAction * -Accessible_getAction (Accessible *obj) +SpiAccessibleAction * +SpiAccessible_getAction (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Action:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiAction:1.0", &ev); spi_check_ev (&ev, "getAction"); - return (AccessibleAction *) + return (SpiAccessibleAction *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } /** - * Accessible_getComponent: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_getComponent: + * @obj: a pointer to the #SpiAccessible instance to query. * - * Get the #AccessibleComponent interface for an #Accessible. + * Get the #SpiAccessibleComponent interface for an #SpiAccessible. * - * Returns: a pointer to an #AccessibleComponent interface instance, or - * NULL if @obj does not implement #AccessibleComponent. + * Returns: a pointer to an #SpiAccessibleComponent interface instance, or + * NULL if @obj does not implement #SpiAccessibleComponent. **/ -AccessibleComponent * -Accessible_getComponent (Accessible *obj) +SpiAccessibleComponent * +SpiAccessible_getComponent (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Component:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiComponent:1.0", &ev); spi_check_ev (&ev, "getComponent"); - return (AccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); + return (SpiAccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -AccessibleEditableText * -Accessible_getEditableText (Accessible *obj) +SpiAccessibleEditableText * +SpiAccessible_getEditableText (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/EditableText:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiEditableText:1.0", &ev); spi_check_ev (&ev, "getEditableText"); - return (AccessibleEditableText *) + return (SpiAccessibleEditableText *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -AccessibleHypertext * -Accessible_getHypertext (Accessible *obj) +SpiAccessibleHypertext * +SpiAccessible_getHypertext (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Hypertext:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiHypertext:1.0", &ev); spi_check_ev (&ev, "getHypertext"); - return (AccessibleHypertext *) + return (SpiAccessibleHypertext *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -AccessibleImage * -Accessible_getImage (Accessible *obj) +SpiAccessibleImage * +SpiAccessible_getImage (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Image:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiImage:1.0", &ev); spi_check_ev (&ev, "getImage"); - return (AccessibleImage *) + return (SpiAccessibleImage *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -AccessibleSelection * -Accessible_getSelection (Accessible *obj) +SpiAccessibleSelection * +SpiAccessible_getSelection (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Selection:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiSelection:1.0", &ev); spi_warn_ev (&ev, "getSelection"); - return (AccessibleSelection *) + return (SpiAccessibleSelection *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -AccessibleTable * -Accessible_getTable (Accessible *obj) +SpiAccessibleTable * +SpiAccessible_getTable (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Table:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiTable:1.0", &ev); spi_check_ev (&ev, "getTable"); - return (AccessibleTable *) + return (SpiAccessibleTable *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -AccessibleText * -Accessible_getText (Accessible *obj) +SpiAccessibleText * +SpiAccessible_getText (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Text:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiText:1.0", &ev); spi_check_ev (&ev, "getText"); - return (AccessibleText *) + return (SpiAccessibleText *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -AccessibleValue * -Accessible_getValue (Accessible *obj) +SpiAccessibleValue * +SpiAccessible_getValue (SpiAccessible *obj) { Bonobo_Unknown iface = - Accessibility_Accessible_queryInterface (*obj, - "IDL:Accessibility/Value:1.0", + Accessibility_SpiAccessible_queryInterface (*obj, + "IDL:Accessibility/SpiValue:1.0", &ev); - return (AccessibleValue *) + return (SpiAccessibleValue *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } /** - * Accessible_queryInterface: - * @obj: a pointer to the #Accessible instance to query. + * SpiAccessible_queryInterface: + * @obj: a pointer to the #SpiAccessible instance to query. * @interface_name: a UTF-8 character string specifiying the requested interface. * - * Query an #Accessible object to for a named interface. + * Query an #SpiAccessible object to for a named interface. * * Returns: an instance of the named interface object, if it is implemented * by @obj, or NULL otherwise. * **/ GenericInterface * -Accessible_queryInterface (Accessible *obj, char *interface_name) +SpiAccessible_queryInterface (SpiAccessible *obj, char *interface_name) { GenericInterface iface; - iface = Accessibility_Accessible_queryInterface (*obj, + iface = Accessibility_SpiAccessible_queryInterface (*obj, interface_name, &ev); return (iface != NULL) ? Obj_Add (iface) : NULL; diff --git a/cspi/spi_action.c b/cspi/spi_action.c index 0326028..37c50a1 100644 --- a/cspi/spi_action.c +++ b/cspi/spi_action.c @@ -1,34 +1,34 @@ int -AccessibleAction_ref ( - AccessibleAction *obj) +SpiAccessibleAction_ref ( + SpiAccessibleAction *obj) { - Accessibility_Action_ref (*obj, &ev); + Accessibility_SpiAction_ref (*obj, &ev); return 0; } int -AccessibleAction_unref (AccessibleAction *obj) +SpiAccessibleAction_unref (SpiAccessibleAction *obj) { - Accessibility_Action_unref (*obj, &ev); + Accessibility_SpiAction_unref (*obj, &ev); return 0; } long -AccessibleAction_getNActions (AccessibleAction *obj) +SpiAccessibleAction_getNSpiActions (SpiAccessibleAction *obj) { return (long) - Accessibility_Action__get_nActions (*obj, &ev); + Accessibility_SpiAction__get_nSpiActions (*obj, &ev); } /** - * AccessibleAction_getDescription: - * @obj: a pointer to the #AccessibleAction to query. + * SpiAccessibleAction_getDescription: + * @obj: a pointer to the #SpiAccessibleAction to query. * * Get the description of 'i-th' action invokable on an - * object implementing #AccessibleAction. + * object implementing #SpiAccessibleAction. * * Not Yet Implemented. * @@ -36,11 +36,11 @@ AccessibleAction_getNActions (AccessibleAction *obj) * **/ char * -AccessibleAction_getDescription (AccessibleAction *obj, +SpiAccessibleAction_getDescription (SpiAccessibleAction *obj, long index) { return (char *) - Accessibility_Action_getDescription (*obj, + Accessibility_SpiAction_getDescription (*obj, (CORBA_long) index, &ev); } @@ -48,11 +48,11 @@ AccessibleAction_getDescription (AccessibleAction *obj, char * -AccessibleAction_getKeyBinding (AccessibleAction *obj, +SpiAccessibleAction_getKeyBinding (SpiAccessibleAction *obj, long index) { return (char *) - Accessibility_Action_getKeyBinding (*obj, + Accessibility_SpiAction_getKeyBinding (*obj, (CORBA_long) index, &ev); } @@ -60,22 +60,22 @@ AccessibleAction_getKeyBinding (AccessibleAction *obj, char * -AccessibleAction_getName (AccessibleAction *obj, +SpiAccessibleAction_getName (SpiAccessibleAction *obj, long index) { return (char *) - Accessibility_Action_getName (*obj, + Accessibility_SpiAction_getName (*obj, (CORBA_long) index, &ev); } boolean -AccessibleAction_doAction (AccessibleAction *obj, +SpiAccessibleAction_doSpiAction (SpiAccessibleAction *obj, long index) { return (boolean) - Accessibility_Action_doAction (*obj, + Accessibility_SpiAction_doSpiAction (*obj, (CORBA_long) index, &ev); } diff --git a/cspi/spi_application.c b/cspi/spi_application.c index 9b27062..f008ea3 100644 --- a/cspi/spi_application.c +++ b/cspi/spi_application.c @@ -1,93 +1,93 @@ /* * - * AccessibleApplication function prototypes + * SpiAccessibleApplication function prototypes * */ /** - * AccessibleApplication_ref: - * @obj: a pointer to the #AccessibleApplication on which to operate. + * SpiAccessibleApplication_ref: + * @obj: a pointer to the #SpiAccessibleApplication on which to operate. * - * Increment the reference count for an #AccessibleApplication. + * Increment the reference count for an #SpiAccessibleApplication. * * Returns: (no return code implemented yet). * **/ int -AccessibleApplication_ref (AccessibleApplication *obj) +SpiAccessibleApplication_ref (SpiAccessibleApplication *obj) { - Accessibility_Application_ref (*obj, &ev); + Accessibility_SpiApplication_ref (*obj, &ev); return 0; } /** - * AccessibleApplication_unref: - * @obj: a pointer to the #AccessibleApplication object on which to operate. + * SpiAccessibleApplication_unref: + * @obj: a pointer to the #SpiAccessibleApplication object on which to operate. * - * Decrement the reference count for an #AccessibleApplication. + * Decrement the reference count for an #SpiAccessibleApplication. * * Returns: (no return code implemented yet). * **/ int -AccessibleApplication_unref (AccessibleApplication *obj) +SpiAccessibleApplication_unref (SpiAccessibleApplication *obj) { - Accessibility_Application_unref (*obj, &ev); + Accessibility_SpiApplication_unref (*obj, &ev); return 0; } /** - * AccessibleApplication_getToolkitName: - * @obj: a pointer to the #AccessibleApplication to query. + * SpiAccessibleApplication_getToolkitName: + * @obj: a pointer to the #SpiAccessibleApplication to query. * - * Get the name of the UI toolkit used by an #AccessibleApplication. + * Get the name of the UI toolkit used by an #SpiAccessibleApplication. * * Returns: a UTF-8 string indicating which UI toolkit is * used by an application. * **/ char * -AccessibleApplication_getToolkitName (AccessibleApplication *obj) +SpiAccessibleApplication_getToolkitName (SpiAccessibleApplication *obj) { - return Accessibility_Application__get_toolkitName (*obj, &ev); + return Accessibility_SpiApplication__get_toolkitName (*obj, &ev); } /** - * AccessibleApplication_getVersion: - * @obj: a pointer to the #AccessibleApplication being queried. + * SpiAccessibleApplication_getVersion: + * @obj: a pointer to the #SpiAccessibleApplication being queried. * * Get the version of the at-spi bridge exported by an - * #AccessibleApplication instance. + * #SpiAccessibleApplication instance. * * Returns: a UTF-8 string indicating the application's * at-spi version. * **/ char * -AccessibleApplication_getVersion (AccessibleApplication *obj) +SpiAccessibleApplication_getVersion (SpiAccessibleApplication *obj) { - return Accessibility_Application__get_version (*obj, &ev); + return Accessibility_SpiApplication__get_version (*obj, &ev); } /** - * AccessibleApplication_getID: - * @obj: a pointer to the #AccessibleApplication being queried. + * SpiAccessibleApplication_getID: + * @obj: a pointer to the #SpiAccessibleApplication being queried. * - * Get the unique ID assigned by the Registry to an - * #AccessibleApplication instance. + * Get the unique ID assigned by the SpiRegistry to an + * #SpiAccessibleApplication instance. * (Not Yet Implemented by the registry). * * Returns: a unique #long integer associated with the application - * by the Registry, or 0 if the application is not registered. + * by the SpiRegistry, or 0 if the application is not registered. long -AccessibleApplication_getID (AccessibleApplication *obj) +SpiAccessibleApplication_getID (SpiAccessibleApplication *obj) { - return Accessibility_Application__get_id (*obj, &ev); + return Accessibility_SpiApplication__get_id (*obj, &ev); } /** - * AccessibleApplication_pause: + * SpiAccessibleApplication_pause: * * Attempt to pause the application (used when client event queue is * over-full). @@ -97,22 +97,22 @@ AccessibleApplication_getID (AccessibleApplication *obj) * **/ boolean -AccessibleApplication_pause (AccessibleApplication *obj) +SpiAccessibleApplication_pause (SpiAccessibleApplication *obj) { return FALSE; } /** - * AccessibleApplication_resume: + * SpiAccessibleApplication_resume: * - * Attempt to resume the application (used after #AccessibleApplication_pause). + * Attempt to resume the application (used after #SpiAccessibleApplication_pause). * Not Yet Implemented. * * Returns: #TRUE if application processing resumed successfully, #FALSE otherwise. * **/ boolean -AccessibleApplication_resume (AccessibleApplication *obj) +SpiAccessibleApplication_resume (SpiAccessibleApplication *obj) { return FALSE; } diff --git a/cspi/spi_component.c b/cspi/spi_component.c index 247a810..c5f0aab 100644 --- a/cspi/spi_component.c +++ b/cspi/spi_component.c @@ -1,59 +1,59 @@ /* * - * AccessibleComponent function implementations + * SpiAccessibleComponent function implementations * */ /** - * AccessibleComponent_ref: - * @obj: a pointer to an object implementing #AccessibleComponent on which to operate. + * SpiAccessibleComponent_ref: + * @obj: a pointer to an object implementing #SpiAccessibleComponent on which to operate. * - * Increment the reference count for an #AccessibleComponent. + * Increment the reference count for an #SpiAccessibleComponent. * * Returns: (no return code implemented yet). * **/ int -AccessibleComponent_ref (AccessibleComponent *obj) +SpiAccessibleComponent_ref (SpiAccessibleComponent *obj) { - Accessibility_Component_ref (*obj, &ev); + Accessibility_SpiComponent_ref (*obj, &ev); return 0; } /** - * AccessibleComponent_unref: - * @obj: a pointer to the object implementing #AccessibleComponent on which to operate. + * SpiAccessibleComponent_unref: + * @obj: a pointer to the object implementing #SpiAccessibleComponent on which to operate. * - * Decrement the reference count for an #AccessibleComponent. + * Decrement the reference count for an #SpiAccessibleComponent. * * Returns: (no return code implemented yet). * **/ int -AccessibleComponent_unref (AccessibleComponent *obj) +SpiAccessibleComponent_unref (SpiAccessibleComponent *obj) { - Accessibility_Component_unref (*obj, &ev); + Accessibility_SpiComponent_unref (*obj, &ev); return 0; } /** - * AccessibleComponent_contains: - * @obj: a pointer to the #AccessibleComponent to query. + * SpiAccessibleComponent_contains: + * @obj: a pointer to the #SpiAccessibleComponent to query. * @x: a #long specifying the x coordinate in question. * @y: a #long specifying the y coordinate in question. * @ctype: the desired coordinate system of the point (@x, @y) * (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN). * - * Query whether a given #AccessibleComponent contains a particular point. + * Query whether a given #SpiAccessibleComponent contains a particular point. * **/ boolean -AccessibleComponent_contains (AccessibleComponent *obj, +SpiAccessibleComponent_contains (SpiAccessibleComponent *obj, long x, long y, - AccessibleCoordType ctype) + SpiAccessibleCoordType ctype) { - return Accessibility_Component_contains (*obj, + return Accessibility_SpiComponent_contains (*obj, (CORBA_long) x, (CORBA_long) y, ctype, @@ -61,26 +61,26 @@ AccessibleComponent_contains (AccessibleComponent *obj, } /** - * AccessibleComponent_getAccessibleAtPoint: - * @obj: a pointer to the #AccessibleComponent to query. + * SpiAccessibleComponent_getAccessibleAtPoint: + * @obj: a pointer to the #SpiAccessibleComponent to query. * @x: a #long specifying the x coordinate of the point in question. * @y: a #long specifying the y coordinate of the point in question. * @ctype: the coordinate system of the point (@x, @y) * (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN). * - * Get the accessible child at a given coordinate within an #AccessibleComponent. + * Get the accessible child at a given coordinate within an #SpiAccessibleComponent. * - * Returns: a pointer to an #Accessible child of the specified component which + * Returns: a pointer to an #SpiAccessible child of the specified component which * contains the point (@x, @y), or NULL of no child contains the point. **/ -Accessible * -AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj, +SpiAccessible * +SpiAccessibleComponent_getAccessibleAtPoint (SpiAccessibleComponent *obj, long x, long y, - AccessibleCoordType ctype) + SpiAccessibleCoordType ctype) { - Accessible child; - child = Accessibility_Component_getAccessibleAtPoint(*obj, + SpiAccessible child; + child = Accessibility_SpiComponent_getAccessibleAtPoint(*obj, (CORBA_long) x, (CORBA_long) y, ctype, @@ -89,8 +89,8 @@ AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj, } /** - * AccessibleComponent_getExtents: - * @obj: a pointer to the #AccessibleComponent to query. + * SpiAccessibleComponent_getExtents: + * @obj: a pointer to the #SpiAccessibleComponent to query. * @x: a pointer to a #long into which the minimum x coordinate will be returned. * @y: a pointer to a #long into which the minimum y coordinate will be returned. * @width: a pointer to a #long into which the x extents (width) will be returned. @@ -98,26 +98,26 @@ AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj, * @ctype: the desired coordinate system into which to return the results, * (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN). * - * Get the bounding box of the specified #AccessibleComponent. + * Get the bounding box of the specified #SpiAccessibleComponent. * **/ void -AccessibleComponent_getExtents (AccessibleComponent *obj, +SpiAccessibleComponent_getExtents (SpiAccessibleComponent *obj, long *x, long *y, long *width, long *height, - AccessibleCoordType ctype) + SpiAccessibleCoordType ctype) { CORBA_long cx, cy, cw, ch; - Accessibility_Component_getExtents (*obj, + Accessibility_SpiComponent_getExtents (*obj, &cx, &cy, &cw, &ch, ctype, &ev); - spi_warn_ev (&ev, "AccessibleComponent_getExtents"); + spi_warn_ev (&ev, "SpiAccessibleComponent_getExtents"); *x = (long) cx; *y = (long) cy; *width = (long) cw; @@ -125,23 +125,23 @@ AccessibleComponent_getExtents (AccessibleComponent *obj, } /** - * AccessibleComponent_getPosition: - * @obj: a pointer to the #AccessibleComponent to query. + * SpiAccessibleComponent_getPosition: + * @obj: a pointer to the #SpiAccessibleComponent to query. * @x: a pointer to a #long into which the minimum x coordinate will be returned. * @y: a pointer to a #long into which the minimum y coordinate will be returned. * @ctype: the desired coordinate system into which to return the results, * (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN). * - * Get the minimum x and y coordinates of the specified #AccessibleComponent. + * Get the minimum x and y coordinates of the specified #SpiAccessibleComponent. * **/ void -AccessibleComponent_getPosition (AccessibleComponent *obj, +SpiAccessibleComponent_getPosition (SpiAccessibleComponent *obj, long *x, long *y, - AccessibleCoordType ctype) + SpiAccessibleCoordType ctype) { - Accessibility_Component_getPosition (*obj, + Accessibility_SpiComponent_getPosition (*obj, (CORBA_long *) x, (CORBA_long *) y, ctype, @@ -149,20 +149,20 @@ AccessibleComponent_getPosition (AccessibleComponent *obj, } /** - * AccessibleComponent_getSize: - * @obj: a pointer to the #AccessibleComponent to query. + * SpiAccessibleComponent_getSize: + * @obj: a pointer to the #SpiAccessibleComponent to query. * @width: a pointer to a #long into which the x extents (width) will be returned. * @height: a pointer to a #long into which the y extents (height) will be returned. * - * Get the size of the specified #AccessibleComponent. + * Get the size of the specified #SpiAccessibleComponent. * **/ void -AccessibleComponent_getSize (AccessibleComponent *obj, +SpiAccessibleComponent_getSize (SpiAccessibleComponent *obj, long *width, long *height) { - Accessibility_Component_getSize (*obj, + Accessibility_SpiComponent_getSize (*obj, (CORBA_long *) width, (CORBA_long *) height, &ev); @@ -170,7 +170,7 @@ AccessibleComponent_getSize (AccessibleComponent *obj, /* Not Yet Implemented */ void -AccessibleComponent_grabFocus (AccessibleComponent *obj) +SpiAccessibleComponent_grabFocus (SpiAccessibleComponent *obj) { ; } diff --git a/cspi/spi_editabletext.c b/cspi/spi_editabletext.c index 876a66e..fdf8f25 100644 --- a/cspi/spi_editabletext.c +++ b/cspi/spi_editabletext.c @@ -1,28 +1,28 @@ int -AccessibleEditableText_ref (AccessibleEditableText *obj) +SpiAccessibleEditableText_ref (SpiAccessibleEditableText *obj) { - Accessibility_EditableText_ref (*obj, &ev); + Accessibility_SpiEditableText_ref (*obj, &ev); return 0; } int -AccessibleEditableText_unref (AccessibleEditableText *obj) +SpiAccessibleEditableText_unref (SpiAccessibleEditableText *obj) { - Accessibility_EditableText_unref (*obj, &ev); + Accessibility_SpiEditableText_unref (*obj, &ev); return 0; } boolean -AccessibleEditableText_setAttributes (AccessibleEditableText *obj, +SpiAccessibleEditableText_setAttributes (SpiAccessibleEditableText *obj, const char *attributes, long startPos, long endPos) { return (boolean) - Accessibility_EditableText_setAttributes (*obj, + Accessibility_SpiEditableText_setAttributes (*obj, (CORBA_char *) attributes, (CORBA_long) startPos, (CORBA_long) endPos, &ev); } @@ -30,22 +30,22 @@ AccessibleEditableText_setAttributes (AccessibleEditableText *obj, void -AccessibleEditableText_setTextContents (AccessibleEditableText *obj, +SpiAccessibleEditableText_setTextContents (SpiAccessibleEditableText *obj, const char *newContents) { - Accessibility_EditableText_setTextContents (*obj, + Accessibility_SpiEditableText_setTextContents (*obj, (CORBA_char *) newContents, &ev); } void -AccessibleEditableText_insertText (AccessibleEditableText *obj, +SpiAccessibleEditableText_insertText (SpiAccessibleEditableText *obj, long position, char *text, long length) { - Accessibility_EditableText_insertText (*obj, + Accessibility_SpiEditableText_insertText (*obj, (CORBA_long) position, (CORBA_char *) text, (CORBA_long) length, &ev); } @@ -53,43 +53,43 @@ AccessibleEditableText_insertText (AccessibleEditableText *obj, void -AccessibleEditableText_copyText (AccessibleText *obj, +SpiAccessibleEditableText_copySpiText (SpiAccessibleText *obj, long startPos, long endPos) { - Accessibility_EditableText_copyText (*obj, + Accessibility_SpiEditableText_copySpiText (*obj, (CORBA_long) startPos, (CORBA_long) endPos, &ev); } void -AccessibleEditableText_cutText (AccessibleEditableText *obj, +SpiAccessibleEditableText_cutText (SpiAccessibleEditableText *obj, long startPos, long endPos) { - Accessibility_EditableText_cutText (*obj, + Accessibility_SpiEditableText_cutText (*obj, (CORBA_long) startPos, (CORBA_long) endPos, &ev); } void -AccessibleEditableText_deleteText (AccessibleEditableText *obj, +SpiAccessibleEditableText_deleteText (SpiAccessibleEditableText *obj, long startPos, long endPos) { - Accessibility_EditableText_deleteText (*obj, + Accessibility_SpiEditableText_deleteText (*obj, (CORBA_long) startPos, (CORBA_long) endPos, &ev); } void -AccessibleEditableText_pasteText (AccessibleEditableText *obj, +SpiAccessibleEditableText_pasteText (SpiAccessibleEditableText *obj, long position) { - Accessibility_EditableText_pasteText (*obj, + Accessibility_SpiEditableText_pasteText (*obj, (CORBA_long) position, &ev); } diff --git a/cspi/spi_event.c b/cspi/spi_event.c index 4db0b71..8d5278f 100644 --- a/cspi/spi_event.c +++ b/cspi/spi_event.c @@ -1,57 +1,57 @@ /** * createEventListener: - * @callback : an #AccessibleEventListenerCB callback function, or NULL. + * @callback : an #SpiAccessibleEventListenerCB callback function, or NULL. * - * Create a new #AccessibleEventListener with a specified callback function. + * Create a new #SpiAccessibleEventListener with a specified callback function. * - * Returns: a pointer to a newly-created #AccessibleEventListener. + * Returns: a pointer to a newly-created #SpiAccessibleEventListener. * **/ -AccessibleEventListener * -createEventListener (AccessibleEventListenerCB callback) +SpiAccessibleEventListener * +createEventListener (SpiAccessibleEventListenerCB callback) { - AccessibleEventListener *listener = accessible_event_listener_new (); + SpiAccessibleEventListener *listener = spi_accessible_event_spi_listener_new (); if (callback) { - accessible_event_listener_add_callback (listener, callback); + spi_accessible_event_spi_listener_add_callback (listener, callback); } return listener; } /** * EventListener_addCallback: - * @listener: the #AccessibleEventListener instance to modify. - * @callback: an #AccessibleEventListenerCB function pointer. + * @listener: the #SpiAccessibleEventListener instance to modify. + * @callback: an #SpiAccessibleEventListenerCB function pointer. * - * Add an in-process callback function to an existing AccessibleEventListener. + * Add an in-process callback function to an existing SpiAccessibleEventListener. * * Returns: #TRUE if successful, otherwise #FALSE. * **/ boolean -EventListener_addCallback (AccessibleEventListener *listener, - AccessibleEventListenerCB callback) +EventListener_addCallback (SpiAccessibleEventListener *listener, + SpiAccessibleEventListenerCB callback) { - accessible_event_listener_add_callback (listener, callback); + spi_accessible_event_spi_listener_add_callback (listener, callback); return TRUE; } /** * EventListener_removeCallback: - * @listener: the #AccessibleEventListener instance to modify. - * @callback: an #AccessibleEventListenerCB function pointer. + * @listener: the #SpiAccessibleEventListener instance to modify. + * @callback: an #SpiAccessibleEventListenerCB function pointer. * - * Remove an in-process callback function from an existing AccessibleEventListener. + * Remove an in-process callback function from an existing SpiAccessibleEventListener. * * Returns: #TRUE if successful, otherwise #FALSE. * **/ boolean -EventListener_removeCallback (AccessibleEventListener *listener, - AccessibleEventListenerCB callback) +EventListener_removeCallback (SpiAccessibleEventListener *listener, + SpiAccessibleEventListenerCB callback) { - accessible_event_listener_remove_callback (listener, callback); + spi_accessible_event_spi_listener_remove_callback (listener, callback); return TRUE; } @@ -67,10 +67,10 @@ EventListener_removeCallback (AccessibleEventListener *listener, KeystrokeListener * createKeystrokeListener (KeystrokeListenerCB callback) { - KeystrokeListener *listener = keystroke_listener_new (); + KeystrokeListener *listener = keystroke_spi_listener_new (); if (callback) { - keystroke_listener_add_callback (listener, callback); + keystroke_spi_listener_add_callback (listener, callback); } return listener; } @@ -89,7 +89,7 @@ boolean KeystrokeListener_addCallback (KeystrokeListener *listener, KeystrokeListenerCB callback) { - keystroke_listener_add_callback (listener, callback); + keystroke_spi_listener_add_callback (listener, callback); return TRUE; } @@ -107,7 +107,7 @@ boolean KeystrokeListener_removeCallback (KeystrokeListener *listener, KeystrokeListenerCB callback) { - keystroke_listener_remove_callback (listener, callback); + keystroke_spi_listener_remove_callback (listener, callback); return TRUE; } diff --git a/cspi/spi_hyperlink.c b/cspi/spi_hyperlink.c index 7df6612..5538c34 100644 --- a/cspi/spi_hyperlink.c +++ b/cspi/spi_hyperlink.c @@ -1,70 +1,70 @@ int -AccessibleHyperlink_ref (AccessibleHyperlink *obj) +SpiAccessibleHyperlink_ref (SpiAccessibleHyperlink *obj) { - Accessibility_Hyperlink_ref (*obj, &ev); + Accessibility_SpiHyperlink_ref (*obj, &ev); return 0; } int -AccessibleHyperlink_unref (AccessibleHyperlink *obj) +SpiAccessibleHyperlink_unref (SpiAccessibleHyperlink *obj) { - Accessibility_Hyperlink_unref (*obj, &ev); + Accessibility_SpiHyperlink_unref (*obj, &ev); return 0; } long -AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj) +SpiAccessibleHyperlink_getNAnchors (SpiAccessibleHyperlink *obj) { return (long) - Accessibility_Hyperlink__get_nAnchors (*obj, &ev); + Accessibility_SpiHyperlink__get_nAnchors (*obj, &ev); } char * -AccessibleHyperlink_getURI (AccessibleHyperlink *obj, +SpiAccessibleHyperlink_getURI (SpiAccessibleHyperlink *obj, long i) { return (char *) - Accessibility_Hyperlink_getURI (*obj, + Accessibility_SpiHyperlink_getURI (*obj, (CORBA_long) i, &ev); } -Accessible -AccessibleHyperlink_getObject (AccessibleHyperlink *obj, +SpiAccessible +SpiAccessibleHyperlink_getObject (SpiAccessibleHyperlink *obj, long i) { - return (Accessible) - Accessibility_Hyperlink_getObject (*obj, + return (SpiAccessible) + Accessibility_SpiHyperlink_getObject (*obj, (CORBA_long) i, &ev); } void -AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj, +SpiAccessibleHyperlink_getIndexRange (SpiAccessibleHyperlink *obj, long *startIndex, long *endIndex) { *startIndex = (long) - Accessibility_Hyperlink__get_startIndex (*obj, &ev); + Accessibility_SpiHyperlink__get_startIndex (*obj, &ev); *endIndex = (long) - Accessibility_Hyperlink__get_endIndex (*obj, &ev); + Accessibility_SpiHyperlink__get_endIndex (*obj, &ev); } boolean -AccessibleHyperlink_isValid (AccessibleHyperlink *obj) +SpiAccessibleHyperlink_isValid (SpiAccessibleHyperlink *obj) { return (boolean) - Accessibility_Hyperlink_isValid (*obj, &ev); + Accessibility_SpiHyperlink_isValid (*obj, &ev); } diff --git a/cspi/spi_hypertext.c b/cspi/spi_hypertext.c index 05a6e29..4db6950 100644 --- a/cspi/spi_hypertext.c +++ b/cspi/spi_hypertext.c @@ -1,46 +1,46 @@ int -AccessibleHypertext_ref (AccessibleHypertext *obj) +SpiAccessibleHyperspi_text_ref (SpiAccessibleHypertext *obj) { - Accessibility_Hypertext_ref (*obj, &ev); + Accessibility_SpiHyperspi_text_ref (*obj, &ev); return 0; } int -AccessibleHypertext_unref (AccessibleHypertext *obj) +SpiAccessibleHyperspi_text_unref (SpiAccessibleHypertext *obj) { - Accessibility_Hypertext_unref (*obj, &ev); + Accessibility_SpiHyperspi_text_unref (*obj, &ev); return 0; } long -AccessibleHypertext_getNLinks (AccessibleHypertext *obj) +SpiAccessibleHyperspi_text_getNLinks (SpiAccessibleHypertext *obj) { return (long) - Accessibility_Hypertext_getNLinks (*obj, &ev); + Accessibility_SpiHyperspi_text_getNLinks (*obj, &ev); } -AccessibleHyperlink * -AccessibleHyperText_getLink (AccessibleHypertext *obj, +SpiAccessibleHyperlink * +SpiAccessibleHyperSpiText_getLink (SpiAccessibleHypertext *obj, long linkIndex) { - return (AccessibleHyperlink *) - Accessibility_Hypertext_getLink (*obj, + return (SpiAccessibleHyperlink *) + Accessibility_SpiHyperspi_text_getLink (*obj, (CORBA_long) linkIndex, &ev); } long -AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj, +SpiAccessibleHyperspi_text_getLinkIndex (SpiAccessibleHypertext *obj, long characterIndex) { return (long) - Accessibility_Hypertext_getLinkIndex (*obj, + Accessibility_SpiHyperspi_text_getLinkIndex (*obj, (CORBA_long) characterIndex, &ev); } diff --git a/cspi/spi_image.c b/cspi/spi_image.c index 3076fbb..506edac 100644 --- a/cspi/spi_image.c +++ b/cspi/spi_image.c @@ -1,48 +1,48 @@ int -AccessibleImage_ref (AccessibleImage *obj) +SpiAccessibleImage_ref (SpiAccessibleImage *obj) { - Accessibility_Image_ref (*obj, &ev); + Accessibility_SpiImage_ref (*obj, &ev); return 0; } int -AccessibleImage_unref (AccessibleImage *obj) +SpiAccessibleImage_unref (SpiAccessibleImage *obj) { - Accessibility_Image_unref (*obj, &ev); + Accessibility_SpiImage_unref (*obj, &ev); return 0; } char * -AccessibleImage_getImageDescription (AccessibleImage *obj) +SpiAccessibleImage_getImageDescription (SpiAccessibleImage *obj) { return (char *) - Accessibility_Image__get_imageDescription (*obj, &ev); + Accessibility_SpiImage__get_imageDescription (*obj, &ev); } void -AccessibleImage_getImageSize (AccessibleImage *obj, +SpiAccessibleImage_getImageSize (SpiAccessibleImage *obj, long *width, long *height) { - Accessibility_Image_getImageSize (*obj, + Accessibility_SpiImage_getImageSize (*obj, (CORBA_long *) width, (CORBA_long *) height, &ev); } void -AccessibleImage_getImagePosition (AccessibleImage *obj, +SpiAccessibleImage_getImagePosition (SpiAccessibleImage *obj, long *x, long *y, - AccessibleCoordType ctype) + SpiAccessibleCoordType ctype) { - Accessibility_Image_getImagePosition (*obj, + Accessibility_SpiImage_getImagePosition (*obj, (CORBA_long *) x, (CORBA_long *) y, (CORBA_short) ctype, &ev); } diff --git a/cspi/spi_main.c b/cspi/spi_main.c index c4e1891..08a145f 100644 --- a/cspi/spi_main.c +++ b/cspi/spi_main.c @@ -26,7 +26,7 @@ SPI_init (void) g_error ("Could not initialize Bonobo"); } - obj_id = "OAFIID:Accessibility_Registry:proto0.1"; + obj_id = "OAFIID:Accessibility_SpiRegistry:proto0.1"; oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { @@ -43,7 +43,7 @@ SPI_init (void) exit(-1); } - registry = (Accessibility_Registry) oclient; + registry = (Accessibility_SpiRegistry) oclient; bonobo_activate (); @@ -99,10 +99,10 @@ SPI_eventIsReady () * Used by clients that don't wish to use SPI_event_main(). * Not Yet Implemented. * - * Returns: the next #AccessibleEvent in the SPI event queue. + * Returns: the next #SpiAccessibleEvent in the SPI event queue. * **/ -AccessibleEvent * +SpiAccessibleEvent * SPI_nextEvent (boolean waitForEvent) { return NULL; @@ -111,7 +111,7 @@ SPI_nextEvent (boolean waitForEvent) /** * SPI_exit: * - * Disconnects from the Accessibility Registry and releases resources. + * Disconnects from the Accessibility SpiRegistry and releases resources. * Not Yet Implemented. * **/ diff --git a/cspi/spi_registry.c b/cspi/spi_registry.c index aa294c1..e41bbeb 100644 --- a/cspi/spi_registry.c +++ b/cspi/spi_registry.c @@ -11,7 +11,7 @@ static Display *display = NULL; /** * registerGlobalEventListener: - * @listener: the #AccessibleEventListener to be registered against an event type. + * @listener: the #SpiAccessibleEventListener to be registered against an event type. * @callback: a character string indicating the type of events for which * notification is requested. Format is * EventClass:major_type:minor_type:detail @@ -25,16 +25,16 @@ static Display *display = NULL; * functions are used internally. In general, listening to * toolkit-specific events is not recommended. * - * Add an in-process callback function to an existing AccessibleEventListener. + * Add an in-process callback function to an existing SpiAccessibleEventListener. * * Returns: #TRUE if successful, otherwise #FALSE. * **/ boolean -registerGlobalEventListener (AccessibleEventListener *listener, +registerGlobalEventListener (SpiAccessibleEventListener *listener, char *eventType) { - Accessibility_Registry_registerGlobalEventListener ( + Accessibility_SpiRegistry_registerGlobalEventListener ( registry, (Accessibility_EventListener) bonobo_object_corba_objref (bonobo_object (listener)), @@ -53,17 +53,17 @@ registerGlobalEventListener (AccessibleEventListener *listener, /** * deregisterGlobalEventListener: - * @listener: the #AccessibleEventListener to be registered against an event type. + * @listener: the #SpiAccessibleEventListener to be registered against an event type. * - * deregisters an AccessibleEventListener from the registry, for all event types it may be listening to. + * deregisters an SpiAccessibleEventListener from the registry, for all event types it may be listening to. * * Returns: #TRUE if successful, otherwise #FALSE. * **/ boolean -deregisterGlobalEventListenerAll (AccessibleEventListener *listener) +deregisterGlobalEventListenerAll (SpiAccessibleEventListener *listener) { - Accessibility_Registry_deregisterGlobalEventListenerAll ( + Accessibility_SpiRegistry_deregisterGlobalEventListenerAll ( registry, (Accessibility_EventListener) CORBA_Object_duplicate (bonobo_object_corba_objref (bonobo_object (listener)), &ev), @@ -92,7 +92,7 @@ deregisterGlobalEventListenerAll (AccessibleEventListener *listener) int getDesktopCount () { - return Accessibility_Registry_getDesktopCount (registry, &ev); + return Accessibility_SpiRegistry_getDesktopCount (registry, &ev); } /** @@ -103,18 +103,18 @@ getDesktopCount () * NOTE: currently multiple virtual desktops are not implemented, this * function always returns '1'. * - * Returns: a pointer to the 'i-th' virtual desktop's #Accessible representation. + * Returns: a pointer to the 'i-th' virtual desktop's #SpiAccessible representation. * **/ -Accessible* +SpiAccessible* getDesktop (int n) { - return Obj_Add (Accessibility_Registry_getDesktop (registry, (CORBA_short) n, &ev)); + return Obj_Add (Accessibility_SpiRegistry_getDesktop (registry, (CORBA_short) n, &ev)); } /** * getDesktopList: - * @list: a pointer to an array of #Accessible objects. + * @list: a pointer to an array of #SpiAccessible objects. * * Get the list of virtual desktops. On return, @list will point * to a newly-created array of virtual desktop pointers. @@ -127,7 +127,7 @@ getDesktop (int n) * placed in the list pointed to by parameter @list. **/ int -getDesktopList (Accessible **list) +getDesktopList (SpiAccessible **list) { *list = NULL; return 0; @@ -194,29 +194,29 @@ registerKeystrokeListener (KeystrokeListener *listener, KeySet *keys, KeyMaskType modmask, KeyEventMask eventmask, - KeyListenerSyncType sync_type) + KeySpiListenerSyncType sync_type) { Accessibility_ControllerEventMask *controller_event_mask = Accessibility_ControllerEventMask__alloc(); - Accessibility_DeviceEventController device_event_controller = - Accessibility_Registry_getDeviceEventController (registry, &ev); + Accessibility_SpiDeviceEventController device_event_controller = + Accessibility_SpiRegistry_getDeviceEventController (registry, &ev); Accessibility_KeySet *all_keys = Accessibility_KeySet__alloc(); Accessibility_KeyEventTypeSeq *key_events = Accessibility_KeyEventTypeSeq__alloc(); - Accessibility_KeystrokeListener listener_corba_ref; - Accessibility_DeviceEventController_ref (device_event_controller, &ev); + Accessibility_KeystrokeListener spi_listener_corba_ref; + Accessibility_SpiDeviceEventController_ref (device_event_controller, &ev); controller_event_mask->value = (CORBA_unsigned_long) modmask; controller_event_mask->refcount = (CORBA_unsigned_short) 1; - listener_corba_ref = (Accessibility_KeystrokeListener) + spi_listener_corba_ref = (Accessibility_KeystrokeListener) CORBA_Object_duplicate (bonobo_object_corba_objref (bonobo_object (listener)), &ev); - Accessibility_DeviceEventController_registerKeystrokeListener ( + Accessibility_SpiDeviceEventController_registerKeystrokeListener ( device_event_controller, - listener_corba_ref, + spi_listener_corba_ref, all_keys, controller_event_mask, key_events, - (CORBA_boolean) ((sync_type | KEYLISTENER_CANCONSUME)!=0), + (CORBA_boolean) ((sync_type | KEYSPI_LISTENER_CANCONSUME)!=0), &ev); } @@ -231,21 +231,21 @@ deregisterKeystrokeListener (KeystrokeListener *listener, KeyMaskType keymask) { Accessibility_ControllerEventMask *controller_event_mask = Accessibility_ControllerEventMask__alloc(); - Accessibility_DeviceEventController device_event_controller = - Accessibility_Registry_getDeviceEventController (registry, &ev); + Accessibility_SpiDeviceEventController device_event_controller = + Accessibility_SpiRegistry_getDeviceEventController (registry, &ev); Accessibility_KeySet *all_keys = Accessibility_KeySet__alloc(); Accessibility_KeyEventTypeSeq *key_events = Accessibility_KeyEventTypeSeq__alloc(); - Accessibility_KeystrokeListener listener_corba_ref; - Accessibility_DeviceEventController_unref (device_event_controller, &ev); + Accessibility_KeystrokeListener spi_listener_corba_ref; + Accessibility_SpiDeviceEventController_unref (device_event_controller, &ev); controller_event_mask->value = (CORBA_unsigned_long) keymask; controller_event_mask->refcount = (CORBA_unsigned_short) 1; - listener_corba_ref = (Accessibility_KeystrokeListener) + spi_listener_corba_ref = (Accessibility_KeystrokeListener) CORBA_Object_duplicate (bonobo_object_corba_objref (bonobo_object (listener)), &ev); - Accessibility_DeviceEventController_deregisterKeystrokeListener ( + Accessibility_SpiDeviceEventController_deregisterKeystrokeListener ( device_event_controller, - listener_corba_ref, + spi_listener_corba_ref, all_keys, controller_event_mask, key_events, @@ -271,9 +271,9 @@ generateKeyEvent (long keyval, KeySynthType type) /* TODO: check current modifier status and * send keycode to alter, if necessary */ - Accessibility_DeviceEventController device_event_controller = - Accessibility_Registry_getDeviceEventController (registry, &ev); - Accessibility_DeviceEventController_generateKeyEvent (device_event_controller, + Accessibility_SpiDeviceEventController device_event_controller = + Accessibility_SpiRegistry_getDeviceEventController (registry, &ev); + Accessibility_SpiDeviceEventController_generateKeyEvent (device_event_controller, keyval, (unsigned long) type, &ev); diff --git a/cspi/spi_selection.c b/cspi/spi_selection.c index dbef7ef..8ee238b 100644 --- a/cspi/spi_selection.c +++ b/cspi/spi_selection.c @@ -1,86 +1,86 @@ int -AccessibleSelection_ref (AccessibleSelection *obj) +SpiAccessibleSelection_ref (SpiAccessibleSelection *obj) { - Accessibility_Selection_ref (*obj, &ev); + Accessibility_SpiSelection_ref (*obj, &ev); return 0; } int -AccessibleSelection_unref (AccessibleSelection *obj) +SpiAccessibleSelection_unref (SpiAccessibleSelection *obj) { - Accessibility_Selection_unref (*obj, &ev); + Accessibility_SpiSelection_unref (*obj, &ev); return 0; } long -AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj) +SpiAccessibleSelection_getNSelectedChildren (SpiAccessibleSelection *obj) { return (long) - Accessibility_Selection__get_nSelectedChildren (*obj, &ev); + Accessibility_SpiSelection__get_nSelectedChildren (*obj, &ev); } -Accessible * -AccessibleSelection_getSelectedChild (AccessibleSelection *obj, +SpiAccessible * +SpiAccessibleSelection_getSelectedChild (SpiAccessibleSelection *obj, long selectedChildIndex) { - Accessibility_Accessible child = - Accessibility_Selection_getSelectedChild (*obj, + Accessibility_SpiAccessible child = + Accessibility_SpiSelection_getSelectedChild (*obj, (CORBA_long) selectedChildIndex, &ev); spi_warn_ev (&ev, "getSelectedChild"); - return (Accessible *) ((CORBA_Object_is_nil (child, &ev)) ? NULL : Obj_Add (child)); + return (SpiAccessible *) ((CORBA_Object_is_nil (child, &ev)) ? NULL : Obj_Add (child)); } boolean -AccessibleSelection_selectChild (AccessibleSelection *obj, +SpiAccessibleSelection_selectChild (SpiAccessibleSelection *obj, long childIndex) { return (boolean) - Accessibility_Selection_selectChild (*obj, + Accessibility_SpiSelection_selectChild (*obj, (CORBA_long) childIndex, &ev); } boolean -AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj, +SpiAccessibleSelection_deselectSelectedChild (SpiAccessibleSelection *obj, long selectedChildIndex) { - Accessibility_Selection_deselectSelectedChild (*obj, + Accessibility_SpiSelection_deselectSelectedChild (*obj, (CORBA_long) selectedChildIndex, &ev); } boolean -AccessibleSelection_isChildSelected (AccessibleSelection *obj, +SpiAccessibleSelection_isChildSelected (SpiAccessibleSelection *obj, long childIndex) { return (boolean) - Accessibility_Selection_isChildSelected (*obj, + Accessibility_SpiSelection_isChildSelected (*obj, (CORBA_long) childIndex, &ev); } void -AccessibleSelection_selectAll (AccessibleSelection *obj) +SpiAccessibleSelection_selectAll (SpiAccessibleSelection *obj) { - Accessibility_Selection_selectAll (*obj, &ev); + Accessibility_SpiSelection_selectAll (*obj, &ev); } void -AccessibleSelection_clearSelection (AccessibleSelection *obj) +SpiAccessibleSelection_clearSpiSelection (SpiAccessibleSelection *obj) { - Accessibility_Selection_clearSelection (*obj, &ev); + Accessibility_SpiSelection_clearSpiSelection (*obj, &ev); } diff --git a/cspi/spi_table.c b/cspi/spi_table.c index 91d9f76..306e8ac 100644 --- a/cspi/spi_table.c +++ b/cspi/spi_table.c @@ -1,183 +1,183 @@ int -AccessibleTable_ref (AccessibleTable *obj) +SpiAccessibleTable_ref (SpiAccessibleTable *obj) { - Accessibility_Table_ref (*obj, &ev); + Accessibility_SpiTable_ref (*obj, &ev); return 0; } int -AccessibleTable_unref (AccessibleTable *obj) +SpiAccessibleTable_unref (SpiAccessibleTable *obj) { - Accessibility_Table_unref (*obj, &ev); + Accessibility_SpiTable_unref (*obj, &ev); return 0; } -Accessible * -AccessibleTable_getCaption (AccessibleTable *obj) +SpiAccessible * +SpiAccessibleTable_getCaption (SpiAccessibleTable *obj) { - return (Accessible *) - Accessibility_Table__get_caption (*obj, &ev); + return (SpiAccessible *) + Accessibility_SpiTable__get_caption (*obj, &ev); } -Accessible * -AccessibleTable_getSummary (AccessibleTable *obj) +SpiAccessible * +SpiAccessibleTable_getSummary (SpiAccessibleTable *obj) { - return (Accessible *) - Accessibility_Table__get_summary (*obj, &ev); + return (SpiAccessible *) + Accessibility_SpiTable__get_summary (*obj, &ev); } long -AccessibleTable_getNRows (AccessibleTable *obj) +SpiAccessibleTable_getNRows (SpiAccessibleTable *obj) { return (long) - Accessibility_Table__get_nRows (*obj, &ev); + Accessibility_SpiTable__get_nRows (*obj, &ev); } long -AccessibleTable_getNColumns (AccessibleTable *obj) +SpiAccessibleTable_getNColumns (SpiAccessibleTable *obj) { return (long) - Accessibility_Table__get_nColumns (*obj, &ev); + Accessibility_SpiTable__get_nColumns (*obj, &ev); } -Accessible * -AccessibleTable_getAccessibleAt (AccessibleTable *obj, +SpiAccessible * +SpiAccessibleTable_getAccessibleAt (SpiAccessibleTable *obj, long row, long column) { - return (Accessible *) - Accessibility_Table_getAccessibleAt (*obj, + return (SpiAccessible *) + Accessibility_SpiTable_getAccessibleAt (*obj, (CORBA_long) row, (CORBA_long) column, &ev); } long -AccessibleTable_getIndexAt (AccessibleTable *obj, +SpiAccessibleTable_getIndexAt (SpiAccessibleTable *obj, long row, long column) { return (long) - Accessibility_Table_getIndexAt (*obj, + Accessibility_SpiTable_getIndexAt (*obj, (CORBA_long) row, (CORBA_long) column, &ev); } long -AccessibleTable_getRowAtIndex (AccessibleTable *obj, +SpiAccessibleTable_getRowAtIndex (SpiAccessibleTable *obj, long index) { return (long) - Accessibility_Table_getRowAtIndex (*obj, + Accessibility_SpiTable_getRowAtIndex (*obj, (CORBA_long) index, &ev); } long -AccessibleTable_getColumnAtIndex (AccessibleTable *obj, +SpiAccessibleTable_getColumnAtIndex (SpiAccessibleTable *obj, long index) { return (long) - Accessibility_Table_getColumnAtIndex (*obj, + Accessibility_SpiTable_getColumnAtIndex (*obj, (CORBA_long) index, &ev); } char * -AccessibleTable_getRowDescription (AccessibleTable *obj, +SpiAccessibleTable_getRowDescription (SpiAccessibleTable *obj, long row) { return (char *) - Accessibility_Table_getRowDescription (*obj, + Accessibility_SpiTable_getRowDescription (*obj, (CORBA_long) row, &ev); } char * -AccessibleTable_getColumnDescription (AccessibleTable *obj, +SpiAccessibleTable_getColumnDescription (SpiAccessibleTable *obj, long column) { return (char *) - Accessibility_Table_getColumnDescription (*obj, + Accessibility_SpiTable_getColumnDescription (*obj, (CORBA_long) column, &ev); } long -AccessibleTable_getRowExtentAt (AccessibleTable *obj, +SpiAccessibleTable_getRowExtentAt (SpiAccessibleTable *obj, long row, long column) { return (long) - Accessibility_Table_getRowExtentAt (*obj, + Accessibility_SpiTable_getRowExtentAt (*obj, (CORBA_long) row, (CORBA_long) column, &ev); } long -AccessibleTable_getColumnExtentAt (AccessibleTable *obj, +SpiAccessibleTable_getColumnExtentAt (SpiAccessibleTable *obj, long row, long column) { return (long) - Accessibility_Table_getColumnExtentAt (*obj, + Accessibility_SpiTable_getColumnExtentAt (*obj, (CORBA_long) row, (CORBA_long) column, &ev); } -Accessible * -AccessibleTable_getRowHeader (AccessibleTable *obj, +SpiAccessible * +SpiAccessibleTable_getRowHeader (SpiAccessibleTable *obj, long row) { - return (Accessible *) - Accessibility_Table_getRowHeader (*obj, + return (SpiAccessible *) + Accessibility_SpiTable_getRowHeader (*obj, (CORBA_long) row, &ev); } -Accessible * -AccessibleTable_getColumnHeader (AccessibleTable *obj, +SpiAccessible * +SpiAccessibleTable_getColumnHeader (SpiAccessibleTable *obj, long column) { - return (Accessible *) - Accessibility_Table_getColumnHeader (*obj, + return (SpiAccessible *) + Accessibility_SpiTable_getColumnHeader (*obj, (CORBA_long) column, &ev); } long -AccessibleTable_getNSelectedRows (AccessibleTable *obj) +SpiAccessibleTable_getNSelectedRows (SpiAccessibleTable *obj) { return (long) - Accessibility_Table__get_nSelectedRows (*obj, &ev); + Accessibility_SpiTable__get_nSelectedRows (*obj, &ev); } long -AccessibleTable_getSelectedRows (AccessibleTable *obj, +SpiAccessibleTable_getSelectedRows (SpiAccessibleTable *obj, long **selectedRows) { - Accessibility_LongSeq *rows = Accessibility_Table_getSelectedRows (*obj, &ev); + Accessibility_LongSeq *rows = Accessibility_SpiTable_getSelectedRows (*obj, &ev); CORBA_long *i; long *j; long length; @@ -197,18 +197,18 @@ AccessibleTable_getSelectedRows (AccessibleTable *obj, long -AccessibleTable_getNSelectedColumns (AccessibleTable *obj) +SpiAccessibleTable_getNSelectedColumns (SpiAccessibleTable *obj) { return (long) - Accessibility_Table__get_nSelectedColumns (*obj, &ev); + Accessibility_SpiTable__get_nSelectedColumns (*obj, &ev); } long -AccessibleTable_getSelectedColumns (AccessibleTable *obj, +SpiAccessibleTable_getSelectedColumns (SpiAccessibleTable *obj, long **selectedColumns) { - Accessibility_LongSeq *columns = Accessibility_Table_getSelectedColumns (*obj, &ev); + Accessibility_LongSeq *columns = Accessibility_SpiTable_getSelectedColumns (*obj, &ev); CORBA_long *i; long *j; long length; @@ -227,34 +227,34 @@ AccessibleTable_getSelectedColumns (AccessibleTable *obj, boolean -AccessibleTable_isRowSelected (AccessibleTable *obj, +SpiAccessibleTable_isRowSelected (SpiAccessibleTable *obj, long row) { return (boolean) - Accessibility_Table_isRowSelected (*obj, + Accessibility_SpiTable_isRowSelected (*obj, (CORBA_long) row, &ev); } boolean -AccessibleTable_isColumnSelected (AccessibleTable *obj, +SpiAccessibleTable_isColumnSelected (SpiAccessibleTable *obj, long column) { return (boolean) - Accessibility_Table_isColumnSelected (*obj, + Accessibility_SpiTable_isColumnSelected (*obj, (CORBA_long) column, &ev); } boolean -AccessibleTable_isSelected (AccessibleTable *obj, +SpiAccessibleTable_isSelected (SpiAccessibleTable *obj, long row, long column) { return (boolean) - Accessibility_Table_isSelected (*obj, + Accessibility_SpiTable_isSelected (*obj, (CORBA_long) row, (CORBA_long) column, &ev); } diff --git a/cspi/spi_text.c b/cspi/spi_text.c index 4c9ed87..2922abb 100644 --- a/cspi/spi_text.c +++ b/cspi/spi_text.c @@ -1,31 +1,31 @@ int -AccessibleText_ref (AccessibleText *obj) +SpiAccessibleText_ref (SpiAccessibleText *obj) { - Accessibility_Text_ref (*obj, &ev); + Accessibility_SpiText_ref (*obj, &ev); return 0; } int -AccessibleText_unref (AccessibleText *obj) +SpiAccessibleText_unref (SpiAccessibleText *obj) { - Accessibility_Text_unref (*obj, &ev); + Accessibility_SpiText_unref (*obj, &ev); return 0; } long -AccessibleText_getCharacterCount (AccessibleText *obj) +SpiAccessibleText_getCharacterCount (SpiAccessibleText *obj) { long retval; CORBA_exception_init (&ev); retval = (long) - Accessibility_Text__get_characterCount (*obj, &ev); + Accessibility_SpiText__get_characterCount (*obj, &ev); - spi_check_ev (&ev, "AccessibleText_getCharacterCount"); + spi_check_ev (&ev, "SpiAccessibleText_getCharacterCount"); return retval; } @@ -33,12 +33,12 @@ AccessibleText_getCharacterCount (AccessibleText *obj) char * -AccessibleText_getText (AccessibleText *obj, +SpiAccessibleText_getText (SpiAccessibleText *obj, long startOffset, long endOffset) { return (char *) - Accessibility_Text_getText (*obj, + Accessibility_SpiText_getText (*obj, (CORBA_long) startOffset, (CORBA_long) endOffset, &ev); } @@ -46,16 +46,16 @@ AccessibleText_getText (AccessibleText *obj, long -AccessibleText_getCaretOffset (AccessibleText *obj) +SpiAccessibleText_getCaretOffset (SpiAccessibleText *obj) { return (long) - Accessibility_Text__get_caretOffset (*obj, &ev); + Accessibility_SpiText__get_caretOffset (*obj, &ev); } char * -AccessibleText_getAttributes (AccessibleText *obj, +SpiAccessibleText_getAttributes (SpiAccessibleText *obj, long offset, long *startOffset, long *endOffset) @@ -63,7 +63,7 @@ AccessibleText_getAttributes (AccessibleText *obj, CORBA_long retStartOffset, retEndOffset; char *retval; retval = (char *) - Accessibility_Text_getAttributes (*obj, + Accessibility_SpiText_getAttributes (*obj, (CORBA_long) offset, &retStartOffset, &retEndOffset, @@ -76,26 +76,26 @@ AccessibleText_getAttributes (AccessibleText *obj, boolean -AccessibleText_setCaretOffset (AccessibleText *obj, +SpiAccessibleText_setCaretOffset (SpiAccessibleText *obj, long newOffset) { return (boolean) - Accessibility_Text_setCaretOffset (*obj, + Accessibility_SpiText_setCaretOffset (*obj, (CORBA_long) newOffset, &ev); } char * -AccessibleText_getTextBeforeOffset (AccessibleText *obj, +SpiAccessibleText_getTextBeforeOffset (SpiAccessibleText *obj, long offset, - TEXT_BOUNDARY_TYPE type, + SPI_TEXT_BOUNDARY_TYPE type, long *startOffset, long *endOffset) { char *retval; CORBA_long retStartOffset, retEndOffset; retval = (char *) - Accessibility_Text_getTextBeforeOffset (*obj, + Accessibility_SpiText_getTextBeforeOffset (*obj, (CORBA_long) offset, (Accessibility_TEXT_BOUNDARY_TYPE) type, &retStartOffset, &retEndOffset, &ev); @@ -107,15 +107,15 @@ AccessibleText_getTextBeforeOffset (AccessibleText *obj, char * -AccessibleText_getTextAtOffset (AccessibleText *obj, +SpiAccessibleText_getTextAtOffset (SpiAccessibleText *obj, long offset, - TEXT_BOUNDARY_TYPE type, + SPI_TEXT_BOUNDARY_TYPE type, long *startOffset, long *endOffset) { CORBA_long corbaStartOffset; CORBA_long corbaEndOffset; char *retval = ""; - retval = Accessibility_Text_getTextAtOffset (*obj, + retval = Accessibility_SpiText_getTextAtOffset (*obj, (CORBA_long) offset, (Accessibility_TEXT_BOUNDARY_TYPE) type, &corbaStartOffset, @@ -132,15 +132,15 @@ AccessibleText_getTextAtOffset (AccessibleText *obj, char * -AccessibleText_getTextAfterOffset (AccessibleText *obj, +SpiAccessibleText_getTextAfterOffset (SpiAccessibleText *obj, long offset, - TEXT_BOUNDARY_TYPE type, + SPI_TEXT_BOUNDARY_TYPE type, long *startOffset, long *endOffset) { char *retval; CORBA_long retStartOffset, retEndOffset; retval = (char *) - Accessibility_Text_getTextAfterOffset (*obj, + Accessibility_SpiText_getTextAfterOffset (*obj, (CORBA_long) offset, (Accessibility_TEXT_BOUNDARY_TYPE) type, &retStartOffset, &retEndOffset, &ev); @@ -152,27 +152,27 @@ AccessibleText_getTextAfterOffset (AccessibleText *obj, unsigned long -AccessibleText_getCharacterAtOffset (AccessibleText *obj, +SpiAccessibleText_getCharacterAtOffset (SpiAccessibleText *obj, long offset) { return (unsigned long) - Accessibility_Text_getCharacterAtOffset (*obj, + Accessibility_SpiText_getCharacterAtOffset (*obj, (CORBA_long) offset, &ev); } void -AccessibleText_getCharacterExtents (AccessibleText *obj, +SpiAccessibleText_getCharacterExtents (SpiAccessibleText *obj, long offset, long *x, long *y, long *width, long *height, - AccessibleCoordType type) + SpiAccessibleCoordType type) { CORBA_long retX, retY, retWidth, retHeight; - Accessibility_Text_getCharacterExtents (*obj, + Accessibility_SpiText_getCharacterExtents (*obj, (CORBA_long) offset, &retX, &retY, @@ -188,34 +188,34 @@ AccessibleText_getCharacterExtents (AccessibleText *obj, long -AccessibleText_getOffsetAtPoint (AccessibleText *obj, +SpiAccessibleText_getOffsetAtPoint (SpiAccessibleText *obj, long x, long y, - AccessibleCoordType type) + SpiAccessibleCoordType type) { return (long) - Accessibility_Text_getOffsetAtPoint (*obj, + Accessibility_SpiText_getOffsetAtPoint (*obj, (CORBA_long) x, (CORBA_long) y, (CORBA_short) type, &ev); } long -AccessibleText_getNSelections (AccessibleText *obj) +SpiAccessibleText_getNSpiSelections (SpiAccessibleText *obj) { return (long) - Accessibility_Text_getNSelections (*obj, &ev); + Accessibility_SpiText_getNSpiSelections (*obj, &ev); } void -AccessibleText_getSelection (AccessibleText *obj, +SpiAccessibleText_getSelection (SpiAccessibleText *obj, long selectionNum, long *startOffset, long *endOffset) { CORBA_long retStartOffset, retEndOffset; - Accessibility_Text_getSelection (*obj, + Accessibility_SpiText_getSelection (*obj, (CORBA_long) selectionNum, &retStartOffset, &retEndOffset, &ev); @@ -226,11 +226,11 @@ AccessibleText_getSelection (AccessibleText *obj, boolean -AccessibleText_addSelection (AccessibleText *obj, +SpiAccessibleText_addSpiSelection (SpiAccessibleText *obj, long startOffset, long endOffset) { return (boolean) - Accessibility_Text_addSelection (*obj, + Accessibility_SpiText_addSpiSelection (*obj, (CORBA_long) startOffset, (CORBA_long) endOffset, &ev); } @@ -238,24 +238,24 @@ AccessibleText_addSelection (AccessibleText *obj, boolean -AccessibleText_removeSelection (AccessibleText *obj, +SpiAccessibleText_removeSelection (SpiAccessibleText *obj, long selectionNum) { return (boolean) - Accessibility_Text_removeSelection (*obj, + Accessibility_SpiText_removeSelection (*obj, (CORBA_long) selectionNum, &ev); } boolean -AccessibleText_setSelection (AccessibleText *obj, +SpiAccessibleText_setSelection (SpiAccessibleText *obj, long selectionNum, long startOffset, long endOffset) { return (boolean) - Accessibility_Text_setSelection (*obj, + Accessibility_SpiText_setSelection (*obj, (CORBA_long) selectionNum, (CORBA_long) startOffset, (CORBA_long) endOffset, &ev); diff --git a/cspi/spi_value.c b/cspi/spi_value.c index b6a0746..bca1357 100644 --- a/cspi/spi_value.c +++ b/cspi/spi_value.c @@ -1,54 +1,54 @@ int -AccessibleValue_ref (AccessibleValue *obj) +SpiAccessibleValue_ref (SpiAccessibleValue *obj) { - Accessibility_Value_ref (*obj, &ev); + Accessibility_SpiValue_ref (*obj, &ev); return 0; } int -AccessibleValue_unref (AccessibleValue *obj) +SpiAccessibleValue_unref (SpiAccessibleValue *obj) { - Accessibility_Value_unref (*obj, &ev); + Accessibility_SpiValue_unref (*obj, &ev); return 0; } float -AccessibleValue_getMinimumValue (AccessibleValue *obj) +SpiAccessibleValue_getMinimumSpiValue (SpiAccessibleValue *obj) { return (float) - Accessibility_Value__get_minimumValue (*obj, &ev); + Accessibility_SpiValue__get_minimumSpiValue (*obj, &ev); } float -AccessibleValue_getCurrentValue (AccessibleValue *obj) +SpiAccessibleValue_getCurrentValue (SpiAccessibleValue *obj) { return (float) - Accessibility_Value__get_currentValue (*obj, &ev); + Accessibility_SpiValue__get_currentValue (*obj, &ev); } float -AccessibleValue_getMaximumValue (AccessibleValue *obj) +SpiAccessibleValue_getMaximumSpiValue (SpiAccessibleValue *obj) { return (float) - Accessibility_Value__get_maximumValue (*obj, &ev); + Accessibility_SpiValue__get_maximumSpiValue (*obj, &ev); } boolean -AccessibleValue_setCurrentValue (AccessibleValue *obj, - float newValue) +SpiAccessibleValue_setCurrentValue (SpiAccessibleValue *obj, + float newSpiValue) { - Accessibility_Value__set_currentValue (*obj, - (CORBA_float) newValue, &ev); + Accessibility_SpiValue__set_currentValue (*obj, + (CORBA_float) newSpiValue, &ev); return TRUE; } diff --git a/libspi/accessible.c b/libspi/accessible.c index 24cbd43..4209185 100644 --- a/libspi/accessible.c +++ b/libspi/accessible.c @@ -30,7 +30,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include @@ -56,34 +56,34 @@ /* * A pointer to our parent object class */ -static GObjectClass *accessible_parent_class; +static GObjectClass *spi_accessible_parent_class; /* * Implemented GObject::finalize */ static void -accessible_object_finalize (GObject *object) +spi_accessible_object_finalize (GObject *object) { - Accessible *accessible = ACCESSIBLE (object); + SpiAccessible *accessible = SPI_ACCESSIBLE (object); - printf("accessible_object_finalize called\n"); + printf("spi_accessible_object_finalize called\n"); ATK_OBJECT (accessible->atko); /* assertion */ g_object_unref (G_OBJECT(accessible->atko)); accessible->atko = NULL; printf("atko freed, calling parent finalize\n"); - accessible_parent_class->finalize (object); + spi_accessible_parent_class->finalize (object); } /* - * CORBA Accessibility::Accessible::get_name method implementation + * CORBA Accessibility::SpiAccessible::get_name method implementation */ static CORBA_char * impl_accessibility_accessible_get_name (PortableServer_Servant servant, CORBA_Environment *ev) { CORBA_char * retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); retval = (CORBA_char *) atk_object_get_name (accessible->atko); if (retval ) retval = CORBA_string_dup (retval); @@ -94,163 +94,163 @@ impl_accessibility_accessible_get_name (PortableServer_Servant servant, } /* - * CORBA Accessibility::Accessible::set_name method implementation + * CORBA Accessibility::SpiAccessible::set_name method implementation */ static void impl_accessibility_accessible_set_name (PortableServer_Servant servant, const CORBA_char *name, CORBA_Environment *ev) { - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); atk_object_set_name (accessible->atko, name); - printf ("Accessible set_name called: %s\n", name); + printf ("SpiAccessible set_name called: %s\n", name); } /* - * CORBA Accessibility::Accessible::get_description method implementation + * CORBA Accessibility::SpiAccessible::get_description method implementation */ static CORBA_char * impl_accessibility_accessible_get_description (PortableServer_Servant servant, CORBA_Environment *ev) { CORBA_char * retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); retval = CORBA_string_dup (atk_object_get_description (accessible->atko)); return retval; } /* - * CORBA Accessibility::Accessible::set_description method implementation + * CORBA Accessibility::SpiAccessible::set_description method implementation */ static void impl_accessibility_accessible_set_description (PortableServer_Servant servant, const CORBA_char *name, CORBA_Environment *ev) { - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); atk_object_set_description (accessible->atko, name); - printf ("Accessible set_description called: %s\n", name); + printf ("SpiAccessible set_description called: %s\n", name); } /* - * CORBA Accessibility::Accessible::get_parent method implementation + * CORBA Accessibility::SpiAccessible::get_parent method implementation */ -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_accessibility_accessible_get_parent (PortableServer_Servant servant, CORBA_Environment *ev) { - Accessibility_Accessible retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + Accessibility_SpiAccessible retval; + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); AtkObject *parent; parent = atk_object_get_parent (accessible->atko); - retval = BONOBO_OBJREF (accessible_new (parent)); - printf ("Accessible get_parent called\n"); + retval = BONOBO_OBJREF (spi_accessible_new (parent)); + printf ("SpiAccessible get_parent called\n"); return CORBA_Object_duplicate (retval, &ev); } /* - * CORBA Accessibility::Accessible::get_IndexInParent method implementation + * CORBA Accessibility::SpiAccessible::get_IndexInParent method implementation */ static CORBA_long impl_accessibility_accessible_get_index_in_parent (PortableServer_Servant servant, CORBA_Environment *ev) { CORBA_long retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); retval = (CORBA_long) atk_object_get_index_in_parent (accessible->atko); - printf ("Accessible get_index_in_parent called\n"); + printf ("SpiAccessible get_index_in_parent called\n"); return retval; } /* - * CORBA Accessibility::Accessible::get_childCount method implementation + * CORBA Accessibility::SpiAccessible::get_childCount method implementation */ static CORBA_long impl_accessibility_accessible_get_child_count (PortableServer_Servant servant, CORBA_Environment *ev) { CORBA_long retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); retval = (CORBA_long) atk_object_get_n_accessible_children (accessible->atko); - printf ("Accessible get_childCount called: %d\n", (int) retval); + printf ("SpiAccessible get_childCount called: %d\n", (int) retval); return retval; } /* - * CORBA Accessibility::Accessible::getChildAtIndex method implementation + * CORBA Accessibility::SpiAccessible::getChildAtIndex method implementation */ -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_accessibility_accessible_get_child_at_index (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment *ev) { - Accessibility_Accessible retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + Accessibility_SpiAccessible retval; + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); AtkObject *child = atk_object_ref_accessible_child (accessible->atko, (gint) index); - retval = BONOBO_OBJREF (accessible_new (child)); - printf ("Accessible get_child_at_index called.\n"); + retval = BONOBO_OBJREF (spi_accessible_new (child)); + printf ("SpiAccessible get_child_at_index called.\n"); return CORBA_Object_duplicate (retval, &ev); } /* - * CORBA Accessibility::Accessible::getState method implementation + * CORBA Accessibility::SpiAccessible::getState method implementation */ static Accessibility_StateSet impl_accessibility_accessible_get_state (PortableServer_Servant servant, CORBA_Environment *ev) { Accessibility_StateSet retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); AtkStateSet *state = atk_object_ref_state_set (accessible->atko); retval = CORBA_OBJECT_NIL; - printf ("Accessible get_state.\n"); + printf ("SpiAccessible get_state.\n"); /* TODO: implement the bonobo stateset class */ return (Accessibility_StateSet) retval; } /* - * CORBA Accessibility::Accessible::getRelationSet method implementation + * CORBA Accessibility::SpiAccessible::getRelationSet method implementation */ static Accessibility_RelationSet * impl_accessibility_accessible_get_relation_set (PortableServer_Servant servant, CORBA_Environment *ev) { Accessibility_RelationSet *retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); AtkRelationSet *relation_set = atk_object_ref_relation_set (accessible->atko); retval = CORBA_sequence_Accessibility_Relation__alloc (); /* * TODO: fill the sequence with relation set objects, themselves * initialized from the AtkRelation object in the AtkRelationSet. */ - printf ("Accessible get_relation_set.\n"); + printf ("SpiAccessible get_relation_set.\n"); return retval; } /* - * CORBA Accessibility::Accessible::getRole method implementation + * CORBA Accessibility::SpiAccessible::getRole method implementation */ static Accessibility_Role impl_accessibility_accessible_get_role (PortableServer_Servant servant, CORBA_Environment *ev) { Accessibility_Role retval; - Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); + SpiAccessible *accessible = SPI_ACCESSIBLE (bonobo_object_from_servant (servant)); AtkRole role = atk_object_get_role (accessible->atko); retval = role; - printf ("Accessible get_role.\n"); + printf ("SpiAccessible get_role.\n"); return (Accessibility_Role) retval; } static void -accessible_class_init (AccessibleClass *klass) +spi_accessible_class_init (SpiAccessibleClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Accessible__epv *epv = &klass->epv; - accessible_parent_class = g_type_class_peek_parent (klass); + POA_Accessibility_SpiAccessible__epv *epv = &klass->epv; + spi_accessible_parent_class = g_type_class_peek_parent (klass); - object_class->finalize = accessible_object_finalize; + object_class->finalize = spi_accessible_object_finalize; epv->_get_name = impl_accessibility_accessible_get_name; epv->_set_name = impl_accessibility_accessible_set_name; @@ -268,26 +268,26 @@ accessible_class_init (AccessibleClass *klass) } static void -accessible_init (Accessible *accessible) +spi_accessible_init (SpiAccessible *accessible) { } GType -accessible_get_type (void) +spi_accessible_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (AccessibleClass), + sizeof (SpiAccessibleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) accessible_class_init, + (GClassInitFunc) spi_accessible_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Accessible), + sizeof (SpiAccessible), 0, /* n preallocs */ - (GInstanceInitFunc) accessible_init, + (GInstanceInitFunc) spi_accessible_init, NULL /* value table */ }; /* @@ -297,29 +297,29 @@ accessible_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_Accessible__init, + POA_Accessibility_SpiAccessible__init, NULL, - G_STRUCT_OFFSET (AccessibleClass, epv), + G_STRUCT_OFFSET (SpiAccessibleClass, epv), &tinfo, - "Accessible"); + "SpiAccessible"); } return type; } -Accessible * -accessible_new (AtkObject *o) +SpiAccessible * +spi_accessible_new (AtkObject *o) { - Accessible *retval = - ACCESSIBLE (g_object_new (accessible_get_type (), NULL)); + SpiAccessible *retval = + SPI_ACCESSIBLE (g_object_new (spi_accessible_get_type (), NULL)); CORBA_Environment ev; CORBA_exception_init (&ev); g_object_ref (o); retval->atko = ATK_OBJECT (o); /* - * TODO: add interface containers/constructors for EDITABLE_TEXT, HYPERTEXT, - * IMAGE, SELECTION, TABLE, TEXT, VALUE. + * TODO: add interface containers/constructors for SPI_EDITABLE_TEXT, SPI_HYPERTEXT, + * SPI_IMAGE, SPI_SELECTION, SPI_TABLE, SPI_TEXT, SPI_VALUE. */ /* add appropriate ATK interfaces */ @@ -327,55 +327,55 @@ accessible_new (AtkObject *o) if (ATK_IS_ACTION (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT (action_interface_new (o))); + BONOBO_OBJECT (spi_action_interface_new (o))); } if (ATK_IS_COMPONENT (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT (component_interface_new (o))); + BONOBO_OBJECT (spi_component_interface_new (o))); } if (ATK_IS_EDITABLE_TEXT (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT(editable_text_interface_new (o))); + BONOBO_OBJECT(spi_editable_text_interface_new (o))); } else if (ATK_IS_HYPERTEXT (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT (hypertext_interface_new (o))); + BONOBO_OBJECT (spi_hypertext_interface_new (o))); } else if (ATK_IS_TEXT (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT (text_interface_new (o))); + BONOBO_OBJECT (spi_text_interface_new (o))); } if (ATK_IS_IMAGE (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT (image_interface_new (o))); + BONOBO_OBJECT (spi_image_interface_new (o))); } if (ATK_IS_SELECTION (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT (selection_interface_new (o))); + BONOBO_OBJECT (spi_selection_interface_new (o))); } if (ATK_IS_TABLE (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT (table_interface_new (o))); + BONOBO_OBJECT (spi_table_interface_new (o))); } if (ATK_IS_VALUE (o)) { bonobo_object_add_interface (bonobo_object (retval), - BONOBO_OBJECT (value_interface_new (o))); + BONOBO_OBJECT (spi_value_interface_new (o))); } return retval; diff --git a/libspi/accessible.h b/libspi/accessible.h index acb2123..bc63201 100644 --- a/libspi/accessible.h +++ b/libspi/accessible.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef ACCESSIBLE_H_ -#define ACCESSIBLE_H_ +#ifndef SPI_ACCESSIBLE_H_ +#define SPI_ACCESSIBLE_H_ #ifdef __cplusplus @@ -29,28 +29,28 @@ extern "C" { #include #include -#define ACCESSIBLE_TYPE (accessible_get_type ()) -#define ACCESSIBLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ACCESSIBLE_TYPE, Accessible)) -#define ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ACCESSIBLE_TYPE, AccessibleClass)) -#define IS_ACCESSIBLE(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), ACCESSIBLE_TYPE)) -#define IS_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ACCESSIBLE_TYPE)) +#define SPI_ACCESSIBLE_TYPE (spi_accessible_get_type ()) +#define SPI_ACCESSIBLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_ACCESSIBLE_TYPE, SpiAccessible)) +#define SPI_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_ACCESSIBLE_TYPE, SpiAccessibleClass)) +#define IS_SPI_ACCESSIBLE(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_ACCESSIBLE_TYPE)) +#define IS_SPI_ACCESSIBLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_ACCESSIBLE_TYPE)) typedef struct { BonoboObject parent; AtkObject *atko; -} Accessible; +} SpiAccessible; typedef struct { BonoboObjectClass parent_class; - POA_Accessibility_Accessible__epv epv; -} AccessibleClass; + POA_Accessibility_SpiAccessible__epv epv; +} SpiAccessibleClass; -GType accessible_get_type (void); -Accessible *accessible_new (AtkObject *o); +GType spi_accessible_get_type (void); +SpiAccessible *spi_accessible_new (AtkObject *o); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* ACCESSIBLE_H_ */ +#endif /* SPI_ACCESSIBLE_H_ */ diff --git a/libspi/accessibleeventlistener.c b/libspi/accessibleeventlistener.c index 9de4519..c682be9 100644 --- a/libspi/accessibleeventlistener.c +++ b/libspi/accessibleeventlistener.c @@ -21,7 +21,7 @@ */ /* - * accessibleeventlistener.c: bonobo implementation of Listener.idl, + * accessibleeventlistener.c: bonobo implementation of SpiListener.idl, * with added ability to attach/remove in-process callbacks. * */ @@ -42,27 +42,27 @@ /* * Our parent Gtk object type */ -#define PARENT_TYPE LISTENER_TYPE +#define PARENT_TYPE SPI_LISTENER_TYPE /* * A pointer to our parent object class */ -static ListenerClass *accessible_event_listener_parent_class; +static SpiListenerClass *spi_accessible_event_spi_listener_parent_class; /* * Implemented GObject::finalize */ static void -accessible_event_listener_object_finalize (GObject *object) +spi_accessible_event_spi_listener_object_finalize (GObject *object) { #ifdef SPI_DEBUG - fprintf(stderr, "listener_object_finalize called\n"); + fprintf(stderr, "spi_listener_object_finalize called\n"); #endif - ((GObjectClass *) accessible_event_listener_parent_class)->finalize (object); + ((GObjectClass *) spi_accessible_event_spi_listener_parent_class)->finalize (object); } /* - * CORBA Accessibility::Listener::notifyEvent method implementation + * CORBA Accessibility::SpiListener::notifyEvent method implementation */ static void @@ -73,7 +73,7 @@ impl_accessible_event_notify_event (PortableServer_Servant servant, int n; int len; VoidEventListenerCB cb; - AccessibleEventListener *listener = ACCESSIBLE_EVENT_LISTENER ( + SpiAccessibleEventListener *listener = SPI_ACCESSIBLE_EVENT_SPI_LISTENER ( bonobo_object_from_servant (servant)); len = g_list_length (listener->callbacks); @@ -85,44 +85,44 @@ impl_accessible_event_notify_event (PortableServer_Servant servant, (*cb) (e); } } - /* Accessibility_Accessible_unref (e->source, ev); */ + /* Accessibility_SpiAccessible_unref (e->source, ev); */ } static void -accessible_event_listener_class_init (AccessibleEventListenerClass *klass) +spi_accessible_event_spi_listener_class_init (SpiAccessibleEventListenerClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - ListenerClass * listener_class = (ListenerClass *) klass; - POA_Accessibility_EventListener__epv *epv = &listener_class->epv; - accessible_event_listener_parent_class = g_type_class_ref (LISTENER_TYPE); + SpiListenerClass * spi_listener_class = (SpiListenerClass *) klass; + POA_Accessibility_EventListener__epv *epv = &spi_listener_class->epv; + spi_accessible_event_spi_listener_parent_class = g_type_class_ref (SPI_LISTENER_TYPE); - object_class->finalize = accessible_event_listener_object_finalize; + object_class->finalize = spi_accessible_event_spi_listener_object_finalize; epv->notifyEvent = impl_accessible_event_notify_event; } static void -accessible_event_listener_init (AccessibleEventListener *listener) +spi_accessible_event_spi_listener_init (SpiAccessibleEventListener *listener) { listener->callbacks = NULL; } GType -accessible_event_listener_get_type (void) +spi_accessible_event_spi_listener_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (AccessibleEventListenerClass), + sizeof (SpiAccessibleEventListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) accessible_event_listener_class_init, + (GClassInitFunc) spi_accessible_event_spi_listener_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Listener), + sizeof (SpiListener), 0, /* n preallocs */ - (GInstanceInitFunc) accessible_event_listener_init, + (GInstanceInitFunc) spi_accessible_event_spi_listener_init, NULL /* value table */ }; /* @@ -135,29 +135,29 @@ accessible_event_listener_get_type (void) PARENT_TYPE, POA_Accessibility_EventListener__init, NULL, - G_STRUCT_OFFSET (ListenerClass, epv), + G_STRUCT_OFFSET (SpiListenerClass, epv), &tinfo, - "AccessibleEventListener"); + "SpiAccessibleEventListener"); } return type; } -AccessibleEventListener * -accessible_event_listener_new () +SpiAccessibleEventListener * +spi_accessible_event_spi_listener_new () { - AccessibleEventListener *retval = - ACCESSIBLE_EVENT_LISTENER (g_object_new (accessible_event_listener_get_type (), NULL)); + SpiAccessibleEventListener *retval = + SPI_ACCESSIBLE_EVENT_SPI_LISTENER (g_object_new (spi_accessible_event_spi_listener_get_type (), NULL)); return retval; } -void accessible_event_listener_add_callback (AccessibleEventListener *listener, +void spi_accessible_event_spi_listener_add_callback (SpiAccessibleEventListener *listener, VoidEventListenerCB callback) { listener->callbacks = g_list_append (listener->callbacks, callback); } -void accessible_event_listener_remove_callback (AccessibleEventListener *listener, +void spi_accessible_event_spi_listener_remove_callback (SpiAccessibleEventListener *listener, VoidEventListenerCB callback) { listener->callbacks = g_list_remove (listener->callbacks, callback); diff --git a/libspi/accessibleeventlistener.h b/libspi/accessibleeventlistener.h index f303ade..68d36ee 100644 --- a/libspi/accessibleeventlistener.h +++ b/libspi/accessibleeventlistener.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef ACCESSIBLE_EVENT_LISTENER_H_ -#define ACCESSIBLE_EVENT_LISTENER_H_ +#ifndef SPI_ACCESSIBLE_EVENT_SPI_LISTENER_H_ +#define SPI_ACCESSIBLE_EVENT_SPI_LISTENER_H_ #ifdef __cplusplus extern "C" { @@ -29,32 +29,32 @@ extern "C" { #include "listener.h" -#define ACCESSIBLE_EVENT_LISTENER_TYPE (accessible_event_listener_get_type ()) -#define ACCESSIBLE_EVENT_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ACCESSIBLE_EVENT_LISTENER_TYPE, AccessibleEventListener)) -#define ACCESSIBLE_EVENT_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ACCESSIBLE_EVENT_LISTENER_TYPE, AccessibleEventListenerClass)) -#define IS_ACCESSIBLE_EVENT_LISTENER(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), ACCESSIBLE_EVENT_LISTENER_TYPE)) -#define IS_ACCESSIBLE_EVENT_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ACCESSIBLE_EVENT_LISTENER_TYPE)) +#define SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE (spi_accessible_event_spi_listener_get_type ()) +#define SPI_ACCESSIBLE_EVENT_SPI_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE, SpiAccessibleEventListener)) +#define SPI_ACCESSIBLE_EVENT_SPI_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE, SpiAccessibleEventListenerClass)) +#define IS_SPI_ACCESSIBLE_EVENT_SPI_LISTENER(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE)) +#define IS_SPI_ACCESSIBLE_EVENT_SPI_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE)) typedef void (*VoidEventListenerCB) (gpointer event_ptr); typedef struct { - Listener parent; + SpiListener parent; GList *callbacks; -} AccessibleEventListener; +} SpiAccessibleEventListener; typedef struct { - ListenerClass parent_class; -} AccessibleEventListenerClass; + SpiListenerClass parent_class; +} SpiAccessibleEventListenerClass; -GType accessible_event_listener_get_type (void); -AccessibleEventListener *accessible_event_listener_new (void); -void accessible_event_listener_add_callback (AccessibleEventListener *listener, +GType spi_accessible_event_spi_listener_get_type (void); +SpiAccessibleEventListener *spi_accessible_event_spi_listener_new (void); +void spi_accessible_event_spi_listener_add_callback (SpiAccessibleEventListener *listener, VoidEventListenerCB callback); -void accessible_event_listener_remove_callback (AccessibleEventListener *listener, +void spi_accessible_event_spi_listener_remove_callback (SpiAccessibleEventListener *listener, VoidEventListenerCB callback); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* ACCESSIBLE_EVENT_LISTENER_H_ */ +#endif /* SPI_ACCESSIBLE_EVENT_SPI_LISTENER_H_ */ diff --git a/libspi/action.c b/libspi/action.c index 0027dfb..26440d3 100644 --- a/libspi/action.c +++ b/libspi/action.c @@ -30,12 +30,12 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include /* - * This pulls the definition of the Action bonobo object + * This pulls the definition of the SpiAction bonobo object */ #include "action.h" @@ -44,20 +44,20 @@ */ static void -action_class_init (ActionClass *klass); +spi_action_class_init (SpiActionClass *klass); static void -action_init (Action *action); +spi_action_init (SpiAction *action); static void -action_finalize (GObject *obj); +spi_action_finalize (GObject *obj); static CORBA_long -impl__get_nActions(PortableServer_Servant servant, +impl__get_nSpiActions(PortableServer_Servant servant, CORBA_Environment * ev); static CORBA_string impl_getDescription (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment * ev); static CORBA_boolean -impl_doAction (PortableServer_Servant servant, +impl_doSpiAction (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment * ev); static CORBA_string impl_getName (PortableServer_Servant servant, @@ -71,21 +71,21 @@ impl_getKeyBinding (PortableServer_Servant servant, static GObjectClass *parent_class; GType -action_get_type (void) +spi_action_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (ActionClass), + sizeof (SpiActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) action_class_init, + (GClassInitFunc) spi_action_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Action), + sizeof (SpiAction), 0, /* n preallocs */ - (GInstanceInitFunc) action_init, + (GInstanceInitFunc) spi_action_init, NULL /* value table */ }; @@ -96,72 +96,72 @@ action_get_type (void) */ type = bonobo_type_unique ( BONOBO_OBJECT_TYPE, - POA_Accessibility_Action__init, + POA_Accessibility_SpiAction__init, NULL, - G_STRUCT_OFFSET (ActionClass, epv), + G_STRUCT_OFFSET (SpiActionClass, epv), &tinfo, - "AccessibleAction"); + "SpiAccessibleAction"); } return type; } static void -action_class_init (ActionClass *klass) +spi_action_class_init (SpiActionClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Action__epv *epv = &klass->epv; + POA_Accessibility_SpiAction__epv *epv = &klass->epv; parent_class = g_type_class_peek_parent (klass); - object_class->finalize = action_finalize; + object_class->finalize = spi_action_finalize; /* Initialize epv table */ - epv->_get_nActions = impl__get_nActions; - epv->doAction = impl_doAction; + epv->_get_nSpiActions = impl__get_nSpiActions; + epv->doSpiAction = impl_doSpiAction; epv->getDescription = impl_getDescription; epv->getName = impl_getName; epv->getKeyBinding = impl_getKeyBinding; } static void -action_init (Action *action) +spi_action_init (SpiAction *action) { } static void -action_finalize (GObject *obj) +spi_action_finalize (GObject *obj) { - Action *action = ACTION (obj); + SpiAction *action = SPI_ACTION (obj); g_object_unref (action->atko); action->atko = NULL; parent_class->finalize (obj); } -Action * -action_interface_new (AtkObject *obj) +SpiAction * +spi_action_interface_new (AtkObject *obj) { - Action *new_action = - ACTION(g_object_new (ACTION_TYPE, NULL)); + SpiAction *new_action = + SPI_ACTION(g_object_new (SPI_ACTION_TYPE, NULL)); new_action->atko = obj; g_object_ref (obj); return new_action; } static CORBA_long -impl__get_nActions(PortableServer_Servant servant, +impl__get_nSpiActions(PortableServer_Servant servant, CORBA_Environment * ev) { - Action *action = ACTION (bonobo_object_from_servant(servant)); + SpiAction *action = SPI_ACTION (bonobo_object_from_servant(servant)); return (CORBA_long) atk_action_get_n_actions (ATK_ACTION(action->atko)); } static CORBA_boolean -impl_doAction (PortableServer_Servant servant, +impl_doSpiAction (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment * ev) { - Action *action = ACTION (bonobo_object_from_servant (servant)); + SpiAction *action = SPI_ACTION (bonobo_object_from_servant (servant)); return (CORBA_boolean) atk_action_do_action (ATK_ACTION(action->atko), (gint) index); } @@ -171,7 +171,7 @@ impl_getDescription (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment * ev) { - Action *action = ACTION (bonobo_object_from_servant(servant)); + SpiAction *action = SPI_ACTION (bonobo_object_from_servant(servant)); CORBA_char *rv; rv = atk_action_get_description (ATK_ACTION(action->atko), (gint) index); @@ -187,7 +187,7 @@ impl_getName (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment * ev) { - Action *action = ACTION (bonobo_object_from_servant(servant)); + SpiAction *action = SPI_ACTION (bonobo_object_from_servant(servant)); CORBA_char *rv; rv = atk_action_get_name (ATK_ACTION(action->atko), (gint) index); @@ -202,7 +202,7 @@ impl_getKeyBinding (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment * ev) { - Action *action = ACTION (bonobo_object_from_servant(servant)); + SpiAction *action = SPI_ACTION (bonobo_object_from_servant(servant)); CORBA_char *rv; rv = atk_action_get_keybinding (ATK_ACTION(action->atko), (gint) index); diff --git a/libspi/action.h b/libspi/action.h index 8b4f013..88faf1c 100644 --- a/libspi/action.h +++ b/libspi/action.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef ACTION_H_ -#define ACTION_H_ +#ifndef SPI_ACTION_H_ +#define SPI_ACTION_H_ #ifdef __cplusplus @@ -29,33 +29,33 @@ extern "C" { #include #include -#define ACTION_TYPE (action_get_type ()) -#define ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ACTION_TYPE, Action)) -#define ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ACTION_TYPE, ActionClass)) -#define IS_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ACTION_TYPE)) -#define IS_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ACTION_TYPE)) +#define SPI_ACTION_TYPE (spi_action_get_type ()) +#define SPI_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_ACTION_TYPE, SpiAction)) +#define SPI_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_ACTION_TYPE, SpiActionClass)) +#define SPI_IS_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPI_ACTION_TYPE)) +#define SPI_IS_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_ACTION_TYPE)) -typedef struct _Action Action; -typedef struct _ActionClass ActionClass; +typedef struct _SpiAction SpiAction; +typedef struct _SpiActionClass SpiActionClass; -struct _Action { +struct _SpiAction { BonoboObject parent; AtkObject *atko; }; -struct _ActionClass { +struct _SpiActionClass { BonoboObjectClass parent_class; - POA_Accessibility_Action__epv epv; + POA_Accessibility_SpiAction__epv epv; }; GType -action_get_type (void); +spi_action_get_type (void); -Action * -action_interface_new (AtkObject *obj); +SpiAction * +spi_action_interface_new (AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* ACTION_H_ */ +#endif /* SPI_ACTION_H_ */ diff --git a/libspi/application.c b/libspi/application.c index 9d9d93c..1ece4c1 100644 --- a/libspi/application.c +++ b/libspi/application.c @@ -21,7 +21,7 @@ */ /* - * application.c: implements Application.idl + * application.c: implements SpiApplication.idl * */ #include @@ -30,7 +30,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include @@ -42,14 +42,14 @@ /* * Our parent Gtk object type */ -#define PARENT_TYPE ACCESSIBLE_TYPE +#define PARENT_TYPE SPI_ACCESSIBLE_TYPE /* * A pointer to our parent object class */ -static AccessibleClass *application_parent_class; +static SpiAccessibleClass *spi_application_parent_class; -static Application *the_app; +static SpiApplication *the_app; /* static methods */ @@ -65,55 +65,55 @@ static char* reverse_lookup_name_for_toolkit_event (char *toolkit_name); * Implemented GObject::finalize */ static void -accessible_application_finalize (GObject *object) +spi_accessible_spi_application_finalize (GObject *object) { /* TODO: any necessary cleanup */ - (G_OBJECT_CLASS (application_parent_class))->finalize (object); + (G_OBJECT_CLASS (spi_application_parent_class))->finalize (object); } static CORBA_string -impl_accessibility_application_get_toolkit_name (PortableServer_Servant servant, +impl_accessibility_spi_application_get_toolkit_name (PortableServer_Servant servant, CORBA_Environment *ev) { CORBA_char *retval; - Application *application = APPLICATION (bonobo_object_from_servant (servant)); + SpiApplication *application = SPI_APPLICATION (bonobo_object_from_servant (servant)); retval = CORBA_string_dup (atk_get_toolkit_name ()); return retval; } static CORBA_string -impl_accessibility_application_get_version (PortableServer_Servant servant, +impl_accessibility_spi_application_get_version (PortableServer_Servant servant, CORBA_Environment *ev) { CORBA_char *retval; - Application *application = APPLICATION (bonobo_object_from_servant (servant)); + SpiApplication *application = SPI_APPLICATION (bonobo_object_from_servant (servant)); retval = CORBA_string_dup (atk_get_toolkit_version ()); return retval; } static CORBA_long -impl_accessibility_application_get_id (PortableServer_Servant servant, +impl_accessibility_spi_application_get_id (PortableServer_Servant servant, CORBA_Environment *ev) { CORBA_long retval; - Application *application = APPLICATION (bonobo_object_from_servant (servant)); + SpiApplication *application = SPI_APPLICATION (bonobo_object_from_servant (servant)); retval = (CORBA_long) application->id; return retval; } static void -impl_accessibility_application_set_id (PortableServer_Servant servant, +impl_accessibility_spi_application_set_id (PortableServer_Servant servant, const CORBA_long id, CORBA_Environment *ev) { - Application *application = APPLICATION (bonobo_object_from_servant (servant)); + SpiApplication *application = SPI_APPLICATION (bonobo_object_from_servant (servant)); application->id = id; } #define APP_STATIC_BUFF_SZ 64 static gboolean -application_object_event_listener (GSignalInvocationHint *signal_hint, +spi_application_object_event_listener (GSignalInvocationHint *signal_hint, guint n_param_values, const GValue *param_values, gpointer data) @@ -121,7 +121,7 @@ application_object_event_listener (GSignalInvocationHint *signal_hint, Accessibility_Event *e = Accessibility_Event__alloc(); AtkObject *aobject; GObject *gobject; - Accessible *source; + SpiAccessible *source; CORBA_Environment ev; GSignalQuery signal_query; gchar *name; @@ -157,7 +157,7 @@ application_object_event_listener (GSignalInvocationHint *signal_hint, g_return_val_if_fail (generic_name, FALSE); if (generic_name) { - source = accessible_new (aobject); + source = spi_accessible_new (aobject); e->type = CORBA_string_dup (generic_name); e->source = BONOBO_OBJREF (source); /* @@ -171,7 +171,7 @@ application_object_event_listener (GSignalInvocationHint *signal_hint, bonobo_object_release_unref (e->source, &ev); } /* and, decrement the refcount on atkobject, incremented moments ago: - * the call to accessible_new() above should have added an extra ref */ + * the call to spi_accessible_new() above should have added an extra ref */ g_object_unref (G_OBJECT (aobject)); return TRUE; @@ -179,7 +179,7 @@ application_object_event_listener (GSignalInvocationHint *signal_hint, static gboolean -application_toolkit_event_listener (GSignalInvocationHint *signal_hint, +spi_application_toolkit_event_listener (GSignalInvocationHint *signal_hint, guint n_param_values, const GValue *param_values, gpointer data) @@ -187,7 +187,7 @@ application_toolkit_event_listener (GSignalInvocationHint *signal_hint, Accessibility_Event *e = Accessibility_Event__alloc(); AtkObject *aobject; GObject *gobject; - Accessible *source; + SpiAccessible *source; CORBA_Environment ev; GSignalQuery signal_query; gchar *name; @@ -205,7 +205,7 @@ application_toolkit_event_listener (GSignalInvocationHint *signal_hint, if (ATK_IS_IMPLEMENTOR (gobject)) { aobject = atk_implementor_ref_accessible (ATK_IMPLEMENTOR (gobject)); - source = accessible_new (aobject); + source = spi_accessible_new (aobject); e->type = CORBA_string_dup (sbuf); e->source = BONOBO_OBJREF (source); e->detail1 = 0; @@ -218,42 +218,42 @@ application_toolkit_event_listener (GSignalInvocationHint *signal_hint, } static void -impl_accessibility_application_register_toolkit_event_listener (PortableServer_Servant servant, +impl_accessibility_spi_application_register_toolkit_event_listener (PortableServer_Servant servant, Accessibility_EventListener listener, const CORBA_char *event_name, CORBA_Environment *ev) { - guint listener_id; - listener_id = - atk_add_global_event_listener (application_toolkit_event_listener, event_name); + guint spi_listener_id; + spi_listener_id = + atk_add_global_event_listener (spi_application_toolkit_event_listener, event_name); the_app->toolkit_listeners = g_list_append (the_app->toolkit_listeners, CORBA_Object_duplicate (listener, ev)); #ifdef SPI_DEBUG fprintf (stderr, "registered %d for toolkit events named: %s\n", - listener_id, + spi_listener_id, event_name); #endif } static void -impl_accessibility_application_register_object_event_listener (PortableServer_Servant servant, +impl_accessibility_spi_application_register_object_event_listener (PortableServer_Servant servant, Accessibility_EventListener listener, const CORBA_char *event_name, CORBA_Environment *ev) { - guint listener_id; + guint spi_listener_id; char *toolkit_specific_event_name = lookup_toolkit_event_for_name (event_name); if (toolkit_specific_event_name) { - listener_id = - atk_add_global_event_listener (application_object_event_listener, + spi_listener_id = + atk_add_global_event_listener (spi_application_object_event_listener, CORBA_string_dup (toolkit_specific_event_name)); the_app->toolkit_listeners = g_list_append (the_app->toolkit_listeners, CORBA_Object_duplicate (listener, ev)); } #ifdef SPI_DEBUG fprintf (stderr, "registered %d for object events named: %s\n", - listener_id, + spi_listener_id, event_name); #endif } @@ -281,7 +281,7 @@ static char * lookup_toolkit_event_for_name (char *generic_name) { char *toolkit_specific_name; - ApplicationClass *klass = g_type_class_peek (APPLICATION_TYPE); + SpiApplicationClass *klass = g_type_class_peek (SPI_APPLICATION_TYPE); #ifdef SPI_DEBUG fprintf (stderr, "looking for %s in hash table.\n", generic_name); #endif @@ -297,7 +297,7 @@ static char * reverse_lookup_name_for_toolkit_event (char *toolkit_specific_name) { char *generic_name; - ApplicationClass *klass = g_type_class_peek (APPLICATION_TYPE); + SpiApplicationClass *klass = g_type_class_peek (SPI_APPLICATION_TYPE); #ifdef SPI_DEBUG fprintf (stderr, "(reverse lookup) looking for %s in hash table.\n", toolkit_specific_name); #endif @@ -321,52 +321,52 @@ init_toolkit_names (GHashTable **generic_event_names, GHashTable **toolkit_event "Gtk:AtkObject:property-change", "object:property-change"); #ifdef SPI_DEBUG - fprintf (stderr, "inserted selection_changed hash\n"); + fprintf (stderr, "inserted spi_selection_changed hash\n"); #endif } static void -application_class_init (ApplicationClass *klass) +spi_application_class_init (SpiApplicationClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Application__epv *epv = &klass->epv; + POA_Accessibility_SpiApplication__epv *epv = &klass->epv; - application_parent_class = g_type_class_ref (ACCESSIBLE_TYPE); + spi_application_parent_class = g_type_class_ref (SPI_ACCESSIBLE_TYPE); - object_class->finalize = accessible_application_finalize; + object_class->finalize = spi_accessible_spi_application_finalize; - epv->_get_toolkitName = impl_accessibility_application_get_toolkit_name; - epv->_get_version = impl_accessibility_application_get_version; - epv->_get_id = impl_accessibility_application_get_id; - epv->_set_id = impl_accessibility_application_set_id; - epv->registerToolkitEventListener = impl_accessibility_application_register_toolkit_event_listener; + epv->_get_toolkitName = impl_accessibility_spi_application_get_toolkit_name; + epv->_get_version = impl_accessibility_spi_application_get_version; + epv->_get_id = impl_accessibility_spi_application_get_id; + epv->_set_id = impl_accessibility_spi_application_set_id; + epv->registerToolkitEventListener = impl_accessibility_spi_application_register_toolkit_event_listener; init_toolkit_names (&klass->generic_event_names, &klass->toolkit_event_names); } static void -application_init (Application *application) +spi_application_init (SpiApplication *application) { - ACCESSIBLE (application)->atko = g_object_new (atk_object_get_type(), NULL); + SPI_ACCESSIBLE (application)->atko = g_object_new (atk_object_get_type(), NULL); application->toolkit_listeners = (GList *) NULL; the_app = application; } GType -application_get_type (void) +spi_application_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (ApplicationClass), + sizeof (SpiApplicationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) application_class_init, + (GClassInitFunc) spi_application_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Application), + sizeof (SpiApplication), 0, /* n preallocs */ - (GInstanceInitFunc) application_init, + (GInstanceInitFunc) spi_application_init, NULL /* value table */ }; /* @@ -376,22 +376,22 @@ application_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_Application__init, + POA_Accessibility_SpiApplication__init, NULL, - G_STRUCT_OFFSET (ApplicationClass, epv), + G_STRUCT_OFFSET (SpiApplicationClass, epv), &tinfo, - "Application"); + "SpiApplication"); } return type; } -Application * -application_new (AtkObject *app_root) +SpiApplication * +spi_application_new (AtkObject *app_root) { - Application *retval = - APPLICATION (g_object_new (application_get_type (), NULL)); - ACCESSIBLE (retval)->atko = app_root; + SpiApplication *retval = + SPI_APPLICATION (g_object_new (spi_application_get_type (), NULL)); + SPI_ACCESSIBLE (retval)->atko = app_root; g_object_ref (G_OBJECT (app_root)); return retval; } diff --git a/libspi/application.h b/libspi/application.h index 5886d95..ddbb81b 100644 --- a/libspi/application.h +++ b/libspi/application.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef APPLICATION_H_ -#define APPLICATION_H_ +#ifndef SPI_APPLICATION_H_ +#define SPI_APPLICATION_H_ #ifdef __cplusplus extern "C" { @@ -32,32 +32,32 @@ extern "C" { #include #include -#define APPLICATION_TYPE (application_get_type ()) -#define APPLICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), APPLICATION_TYPE, Application)) -#define APPLICATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), APPLICATION_TYPE, ApplicationClass)) -#define IS_APPLICATION(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), APPLICATION_TYPE)) -#define IS_APPLICATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), APPLICATION_TYPE)) +#define SPI_APPLICATION_TYPE (spi_application_get_type ()) +#define SPI_APPLICATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_APPLICATION_TYPE, SpiApplication)) +#define SPI_APPLICATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_APPLICATION_TYPE, SpiApplicationClass)) +#define IS_SPI_APPLICATION(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_APPLICATION_TYPE)) +#define IS_SPI_APPLICATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_APPLICATION_TYPE)) typedef struct { - Accessible parent; + SpiAccessible parent; long id; GList *toolkit_listeners; -} Application; +} SpiApplication; typedef struct { - AccessibleClass parent_class; - POA_Accessibility_Application__epv epv; + SpiAccessibleClass parent_class; + POA_Accessibility_SpiApplication__epv epv; GHashTable *toolkit_event_names; GHashTable *generic_event_names; -} ApplicationClass; +} SpiApplicationClass; -GType application_get_type (void); -gboolean *application_set_id (AtkObject *app, long id); -Application *application_new (AtkObject *app_root); +GType spi_application_get_type (void); +gboolean *spi_application_set_id (AtkObject *app, long id); +SpiApplication *spi_application_new (AtkObject *app_root); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* APPLICATION_H_ */ +#endif /* SPI_APPLICATION_H_ */ diff --git a/libspi/component.c b/libspi/component.c index 5e679d9..b6d1df9 100644 --- a/libspi/component.c +++ b/libspi/component.c @@ -30,7 +30,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include @@ -48,29 +48,29 @@ /* * A pointer to our parent object class */ -static GObjectClass *component_parent_class; +static GObjectClass *spi_component_parent_class; /* * Implemented GObject::finalize */ static void -accessibility_component_object_finalize (GObject *object) +accessibility_spi_component_object_finalize (GObject *object) { - Component *component = COMPONENT (object); + SpiComponent *component = SPI_COMPONENT (object); - printf("accessible_component_object_finalize called\n"); + printf("spi_accessible_spi_component_object_finalize called\n"); g_object_unref (component->atko); component->atko = NULL; printf("component atko freed, calling parent finalize\n"); - component_parent_class->finalize (object); + spi_component_parent_class->finalize (object); } /* - * CORBA Accessibility::Component::contains method implementation + * CORBA Accessibility::SpiComponent::contains method implementation */ static CORBA_boolean -impl_accessibility_component_contains (PortableServer_Servant servant, +impl_accessibility_spi_component_contains (PortableServer_Servant servant, const CORBA_long x, const CORBA_long y, CORBA_short coord_type, @@ -78,11 +78,11 @@ impl_accessibility_component_contains (PortableServer_Servant servant, { CORBA_boolean retval; BonoboObject *obj; - Component *component; + SpiComponent *component; obj = bonobo_object_from_servant (servant); - g_return_val_if_fail (IS_COMPONENT(obj), FALSE); - component = COMPONENT (obj); + g_return_val_if_fail (IS_SPI_COMPONENT(obj), FALSE); + component = SPI_COMPONENT (obj); g_return_val_if_fail (ATK_IS_COMPONENT(component->atko), FALSE); retval = atk_component_contains (ATK_COMPONENT (component->atko), (gint) x, (gint) y, (AtkCoordType) coord_type); @@ -90,37 +90,37 @@ impl_accessibility_component_contains (PortableServer_Servant servant, } /* - * CORBA Accessibility::Component::getAccessibleAtPoint method implementation + * CORBA Accessibility::SpiComponent::getAccessibleAtPoint method implementation */ -static Accessibility_Accessible -impl_accessibility_component_get_accessible_at_point (PortableServer_Servant servant, +static Accessibility_SpiAccessible +impl_accessibility_spi_component_get_accessible_at_point (PortableServer_Servant servant, const CORBA_long x, const CORBA_long y, CORBA_short coord_type, CORBA_Environment *ev) { BonoboObject *obj; - Component *component; - Accessibility_Accessible retval; + SpiComponent *component; + Accessibility_SpiAccessible retval; AtkObject *child; obj = bonobo_object_from_servant (servant); - g_return_val_if_fail (IS_COMPONENT(obj), CORBA_OBJECT_NIL); - component = COMPONENT (obj); + g_return_val_if_fail (IS_SPI_COMPONENT(obj), CORBA_OBJECT_NIL); + component = SPI_COMPONENT (obj); g_return_val_if_fail (ATK_IS_COMPONENT(component->atko), CORBA_OBJECT_NIL); child = atk_component_ref_accessible_at_point (ATK_COMPONENT (component->atko), (gint) x, (gint) y, (AtkCoordType) coord_type); - retval = bonobo_object_corba_objref (bonobo_object (accessible_new (child))); + retval = bonobo_object_corba_objref (bonobo_object (spi_accessible_new (child))); return CORBA_Object_duplicate (retval, ev); } /* - * CORBA Accessibility::Component::getExtents method implementation + * CORBA Accessibility::SpiComponent::getExtents method implementation */ static void -impl_accessibility_component_get_extents (PortableServer_Servant servant, +impl_accessibility_spi_component_get_extents (PortableServer_Servant servant, CORBA_long * x, CORBA_long * y, CORBA_long * width, @@ -129,12 +129,12 @@ impl_accessibility_component_get_extents (PortableServer_Servant servant, CORBA_Environment *ev) { BonoboObject *obj; - Component *component; + SpiComponent *component; gint ix, iy, iw, ih; obj = bonobo_object_from_servant (servant); - g_return_if_fail (IS_COMPONENT(obj)); - component = COMPONENT (obj); + g_return_if_fail (IS_SPI_COMPONENT(obj)); + component = SPI_COMPONENT (obj); g_return_if_fail (ATK_IS_COMPONENT (component->atko)); atk_component_get_extents (ATK_COMPONENT (component->atko), &ix, &iy, &iw, &ih, @@ -146,21 +146,21 @@ impl_accessibility_component_get_extents (PortableServer_Servant servant, } /* - * CORBA Accessibility::Component::getPosition method implementation + * CORBA Accessibility::SpiComponent::getPosition method implementation */ static void -impl_accessibility_component_get_position (PortableServer_Servant servant, +impl_accessibility_spi_component_get_position (PortableServer_Servant servant, CORBA_long * x, CORBA_long * y, const CORBA_short coord_type, CORBA_Environment *ev) { BonoboObject *obj = bonobo_object_from_servant (servant); - Component *component; + SpiComponent *component; gint ix, iy; - g_return_if_fail (IS_COMPONENT(obj)); - component = COMPONENT(obj); + g_return_if_fail (IS_SPI_COMPONENT(obj)); + component = SPI_COMPONENT(obj); g_return_if_fail (ATK_IS_COMPONENT(component->atko)); atk_component_get_position (ATK_COMPONENT (component->atko), &ix, &iy, @@ -170,20 +170,20 @@ impl_accessibility_component_get_position (PortableServer_Servant servant, } /* - * CORBA Accessibility::Component::getSize method implementation + * CORBA Accessibility::SpiComponent::getSize method implementation */ static void -impl_accessibility_component_get_size (PortableServer_Servant servant, +impl_accessibility_spi_component_get_size (PortableServer_Servant servant, CORBA_long * width, CORBA_long * height, CORBA_Environment *ev) { - Component *component; + SpiComponent *component; BonoboObject *obj = bonobo_object_from_servant (servant); gint iw, ih; - g_return_if_fail (IS_COMPONENT(obj)); - component = COMPONENT(obj); + g_return_if_fail (IS_SPI_COMPONENT(obj)); + component = SPI_COMPONENT(obj); g_return_if_fail (ATK_IS_COMPONENT(component->atko)); atk_component_get_size (ATK_COMPONENT (component->atko), &iw, &ih); *width = (CORBA_long) iw; @@ -191,42 +191,42 @@ impl_accessibility_component_get_size (PortableServer_Servant servant, } static void -accessibility_component_class_init (ComponentClass *klass) +accessibility_spi_component_class_init (SpiComponentClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Component__epv *epv = &klass->epv; - component_parent_class = g_type_class_peek_parent (klass); + POA_Accessibility_SpiComponent__epv *epv = &klass->epv; + spi_component_parent_class = g_type_class_peek_parent (klass); - object_class->finalize = accessibility_component_object_finalize; + object_class->finalize = accessibility_spi_component_object_finalize; - epv->contains = impl_accessibility_component_contains; - epv->getAccessibleAtPoint = impl_accessibility_component_get_accessible_at_point; - epv->getExtents = impl_accessibility_component_get_extents; - epv->getPosition = impl_accessibility_component_get_position; - epv->getSize = impl_accessibility_component_get_size; + epv->contains = impl_accessibility_spi_component_contains; + epv->getAccessibleAtPoint = impl_accessibility_spi_component_get_accessible_at_point; + epv->getExtents = impl_accessibility_spi_component_get_extents; + epv->getPosition = impl_accessibility_spi_component_get_position; + epv->getSize = impl_accessibility_spi_component_get_size; } static void -accessibility_component_init (Component *component) +accessibility_spi_component_init (SpiComponent *component) { } GType -accessibility_component_get_type (void) +accessibility_spi_component_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (ComponentClass), + sizeof (SpiComponentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) accessibility_component_class_init, + (GClassInitFunc) accessibility_spi_component_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Component), + sizeof (SpiComponent), 0, /* n preallocs */ - (GInstanceInitFunc) accessibility_component_init, + (GInstanceInitFunc) accessibility_spi_component_init, NULL /* value table */ }; /* @@ -236,21 +236,21 @@ accessibility_component_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_Component__init, + POA_Accessibility_SpiComponent__init, NULL, - G_STRUCT_OFFSET (ComponentClass, epv), + G_STRUCT_OFFSET (SpiComponentClass, epv), &tinfo, - "AccessibleComponent"); + "SpiAccessibleComponent"); } return type; } -Component * -component_interface_new (AtkObject *o) +SpiComponent * +spi_component_interface_new (AtkObject *o) { - Component *retval = - COMPONENT (g_object_new (accessibility_component_get_type (), NULL)); + SpiComponent *retval = + SPI_COMPONENT (g_object_new (accessibility_spi_component_get_type (), NULL)); retval->atko = o; g_object_ref (o); return retval; diff --git a/libspi/component.h b/libspi/component.h index 355fc06..1ec686d 100644 --- a/libspi/component.h +++ b/libspi/component.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef COMPONENT_H_ -#define COMPONENT_H_ +#ifndef SPI_COMPONENT_H_ +#define SPI_COMPONENT_H_ #ifdef __cplusplus @@ -29,27 +29,27 @@ extern "C" { #include #include -#define COMPONENT_TYPE (accessibility_component_get_type ()) -#define COMPONENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), COMPONENT_TYPE, Component)) -#define COMPONENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), COMPONENT_TYPE, ComponentClass)) -#define IS_COMPONENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), COMPONENT_TYPE)) -#define IS_COMPONENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), COMPONENT_TYPE)) +#define SPI_COMPONENT_TYPE (accessibility_spi_component_get_type ()) +#define SPI_COMPONENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_COMPONENT_TYPE, SpiComponent)) +#define SPI_COMPONENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_COMPONENT_TYPE, SpiComponentClass)) +#define IS_SPI_COMPONENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SPI_COMPONENT_TYPE)) +#define IS_SPI_COMPONENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_COMPONENT_TYPE)) typedef struct { BonoboObject parent; AtkObject *atko; -} Component; +} SpiComponent; typedef struct { BonoboObjectClass parent_class; - POA_Accessibility_Component__epv epv; -} ComponentClass; + POA_Accessibility_SpiComponent__epv epv; +} SpiComponentClass; -GType accessibility_component_get_type (void); -Component *component_interface_new (AtkObject *o); +GType accessibility_spi_component_get_type (void); +SpiComponent *spi_component_interface_new (AtkObject *o); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* COMPONENT_H_ */ +#endif /* SPI_COMPONENT_H_ */ diff --git a/libspi/desktop.c b/libspi/desktop.c index 040e698..82acb44 100644 --- a/libspi/desktop.c +++ b/libspi/desktop.c @@ -21,7 +21,7 @@ */ /* - * desktop.c: implements Desktop.idl + * desktop.c: implements SpiDesktop.idl * */ @@ -31,7 +31,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include @@ -43,26 +43,26 @@ /* * Our parent Gtk object type */ -#define PARENT_TYPE ACCESSIBLE_TYPE +#define PARENT_TYPE SPI_ACCESSIBLE_TYPE /* * A pointer to our parent object class */ -static AccessibleClass *parent_class; +static SpiAccessibleClass *parent_class; static void -desktop_init (Desktop *desktop) +spi_desktop_init (SpiDesktop *desktop) { - ACCESSIBLE (desktop)->atko = g_object_new (atk_object_get_type(), NULL); + SPI_ACCESSIBLE (desktop)->atko = g_object_new (atk_object_get_type(), NULL); desktop->applications = NULL; - atk_object_set_name (ATK_OBJECT (ACCESSIBLE (desktop)->atko), "main"); + atk_object_set_name (ATK_OBJECT (SPI_ACCESSIBLE (desktop)->atko), "main"); } static CORBA_long -impl_desktop_get_child_count (PortableServer_Servant servant, +impl_spi_desktop_get_child_count (PortableServer_Servant servant, CORBA_Environment * ev) { - Desktop *desktop = DESKTOP (bonobo_object_from_servant (servant)); + SpiDesktop *desktop = SPI_DESKTOP (bonobo_object_from_servant (servant)); if (desktop->applications) { return g_list_length (desktop->applications); @@ -73,12 +73,12 @@ impl_desktop_get_child_count (PortableServer_Servant servant, } } -static Accessibility_Accessible -impl_desktop_get_child_at_index (PortableServer_Servant servant, +static Accessibility_SpiAccessible +impl_spi_desktop_get_child_at_index (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment * ev) { - Desktop *desktop = DESKTOP (bonobo_object_from_servant (servant)); + SpiDesktop *desktop = SPI_DESKTOP (bonobo_object_from_servant (servant)); CORBA_Object retval; if ((desktop->applications) && (index < g_list_length (desktop->applications))) { @@ -94,37 +94,37 @@ impl_desktop_get_child_at_index (PortableServer_Servant servant, fprintf (stderr, "no %ldth child\n", (long) index); retval = CORBA_OBJECT_NIL; } - return (Accessibility_Accessible) retval; + return (Accessibility_SpiAccessible) retval; } static void -desktop_class_init (DesktopClass *klass) +spi_desktop_class_init (SpiDesktopClass *klass) { - AccessibleClass * accessible_class = (AccessibleClass *) klass; - POA_Accessibility_Accessible__epv *epv = &accessible_class->epv; + SpiAccessibleClass * spi_accessible_class = (SpiAccessibleClass *) klass; + POA_Accessibility_SpiAccessible__epv *epv = &spi_accessible_class->epv; - parent_class = g_type_class_ref (ACCESSIBLE_TYPE); + parent_class = g_type_class_ref (SPI_ACCESSIBLE_TYPE); - epv->_get_childCount = impl_desktop_get_child_count; - epv->getChildAtIndex = impl_desktop_get_child_at_index; + epv->_get_childCount = impl_spi_desktop_get_child_count; + epv->getChildAtIndex = impl_spi_desktop_get_child_at_index; } GType -desktop_get_type (void) +spi_desktop_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (DesktopClass), + sizeof (SpiDesktopClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) desktop_class_init, + (GClassInitFunc) spi_desktop_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Desktop), + sizeof (SpiDesktop), 0, /* n preallocs */ - (GInstanceInitFunc) desktop_init, + (GInstanceInitFunc) spi_desktop_init, NULL /* value table */ }; /* @@ -135,20 +135,20 @@ desktop_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_Desktop__init, + POA_Accessibility_SpiDesktop__init, NULL, - G_STRUCT_OFFSET (DesktopClass, epv), + G_STRUCT_OFFSET (SpiDesktopClass, epv), &tinfo, - "Desktop"); + "SpiDesktop"); } return type; } -Desktop * -desktop_new (void) +SpiDesktop * +spi_desktop_new (void) { - Desktop *retval = - DESKTOP (g_object_new (desktop_get_type (), NULL)); + SpiDesktop *retval = + SPI_DESKTOP (g_object_new (spi_desktop_get_type (), NULL)); return retval; } diff --git a/libspi/desktop.h b/libspi/desktop.h index 87866e7..d3430f6 100644 --- a/libspi/desktop.h +++ b/libspi/desktop.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef DESKTOP_H_ -#define DESKTOP_H_ +#ifndef SPI_DESKTOP_H_ +#define SPI_DESKTOP_H_ #ifdef __cplusplus extern "C" { @@ -33,29 +33,29 @@ extern "C" { #include #include -#define DESKTOP_TYPE (desktop_get_type ()) -#define DESKTOP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DESKTOP_TYPE, Desktop)) -#define DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DESKTOP_TYPE, DesktopClass)) -#define IS_DESKTOP(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), DESKTOP_TYPE)) -#define IS_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DESKTOP_TYPE)) +#define SPI_DESKTOP_TYPE (spi_desktop_get_type ()) +#define SPI_DESKTOP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_DESKTOP_TYPE, SpiDesktop)) +#define SPI_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_DESKTOP_TYPE, SpiDesktopClass)) +#define IS_SPI_DESKTOP(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_DESKTOP_TYPE)) +#define IS_SPI_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_DESKTOP_TYPE)) typedef struct { - Accessible parent; + SpiAccessible parent; GList *applications; /* TODO: maybe change this so it's generated on-demand ? */ -} Desktop; +} SpiDesktop; typedef struct { - AccessibleClass parent_class; - POA_Accessibility_Desktop__epv epv; -} DesktopClass; + SpiAccessibleClass parent_class; + POA_Accessibility_SpiDesktop__epv epv; +} SpiDesktopClass; -GType desktop_get_type (void); -void desktop_add_application (Application *app); -void desktop_remove_application (Application *app); -Desktop *desktop_new (void); +GType spi_desktop_get_type (void); +void spi_desktop_add_application (SpiApplication *app); +void spi_desktop_remove_application (SpiApplication *app); +SpiDesktop *spi_desktop_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* DESKTOP_H_ */ +#endif /* SPI_DESKTOP_H_ */ diff --git a/libspi/deviceeventcontroller.c b/libspi/deviceeventcontroller.c index e3271bc..6098395 100644 --- a/libspi/deviceeventcontroller.c +++ b/libspi/deviceeventcontroller.c @@ -50,7 +50,7 @@ /* * A pointer to our parent object class */ -static GObjectClass *device_event_controller_parent_class; +static GObjectClass *spi_device_event_controller_parent_class; static gboolean kbd_registered = FALSE; @@ -64,10 +64,10 @@ typedef enum { DEVICE_TYPE_LAST_DEFINED } DeviceTypeCategory; -static gboolean _controller_register_with_devices (DeviceEventController *controller); -static gboolean _controller_grab_keyboard (DeviceEventController *controller); +static gboolean _controller_register_with_devices (SpiDeviceEventController *controller); +static gboolean _controller_grab_keyboard (SpiDeviceEventController *controller); -static void _controller_register_device_listener (DeviceEventController *controller, +static void _controller_register_device_listener (SpiDeviceEventController *controller, const CORBA_Object l, const Accessibility_ControllerEventMask *mask, DeviceTypeCategory type, @@ -105,7 +105,7 @@ _eventmask_compare_value (gconstpointer p1, gconstpointer p2) } static void -_controller_register_device_listener (DeviceEventController *controller, +_controller_register_device_listener (SpiDeviceEventController *controller, const CORBA_Object l, const Accessibility_ControllerEventMask *mask, DeviceTypeCategory type, @@ -150,7 +150,7 @@ _controller_register_device_listener (DeviceEventController *controller, } static void -_controller_deregister_device_listener (DeviceEventController *controller, +_controller_deregister_device_listener (SpiDeviceEventController *controller, const CORBA_Object l, const Accessibility_ControllerEventMask *mask, DeviceTypeCategory type, @@ -189,7 +189,7 @@ _controller_deregister_device_listener (DeviceEventController *controller, } static gboolean -_controller_register_with_devices (DeviceEventController *controller) +_controller_register_with_devices (SpiDeviceEventController *controller) { gboolean retval = FALSE; @@ -212,7 +212,7 @@ _controller_register_with_devices (DeviceEventController *controller) } static gboolean -_check_key_event (DeviceEventController *controller) +_check_key_event (SpiDeviceEventController *controller) { static gboolean initialized = FALSE; static gboolean is_active = FALSE; @@ -289,7 +289,7 @@ _check_key_event (DeviceEventController *controller) } static gboolean -_controller_grab_keyboard (DeviceEventController *controller) +_controller_grab_keyboard (SpiDeviceEventController *controller) { GList *maskList = controller->keymask_list; int i; @@ -336,17 +336,17 @@ _controller_grab_keyboard (DeviceEventController *controller) * Implemented GObject::finalize */ static void -device_event_controller_object_finalize (GObject *object) +spi_device_event_controller_object_finalize (GObject *object) { #ifdef SPI_DEBUG - fprintf(stderr, "device_event_controller_object_finalize called\n"); + fprintf(stderr, "spi_device_event_controller_object_finalize called\n"); #endif - device_event_controller_parent_class->finalize (object); + spi_device_event_controller_parent_class->finalize (object); } /* - * CORBA Accessibility::DeviceEventController::registerKeystrokeListener + * CORBA Accessibility::SpiDeviceEventController::registerKeystrokeListener * method implementation */ static void @@ -358,7 +358,7 @@ impl_register_keystroke_listener (PortableServer_Servant servant, const CORBA_boolean is_synchronous, CORBA_Environment *ev) { - DeviceEventController *controller = DEVICE_EVENT_CONTROLLER ( + SpiDeviceEventController *controller = SPI_DEVICE_EVENT_CONTROLLER ( bonobo_object_from_servant (servant)); #ifdef SPI_DEBUG fprintf (stderr, "registering keystroke listener %p with maskVal %lu\n", @@ -371,7 +371,7 @@ impl_register_keystroke_listener (PortableServer_Servant servant, ; /* register with toolkit instead */ } /* - * CORBA Accessibility::DeviceEventController::deregisterKeystrokeListener + * CORBA Accessibility::SpiDeviceEventController::deregisterKeystrokeListener * method implementation */ static void @@ -383,7 +383,7 @@ impl_deregister_keystroke_listener (PortableServer_Servant servant, const CORBA_boolean is_synchronous, CORBA_Environment *ev) { - DeviceEventController *controller = DEVICE_EVENT_CONTROLLER ( + SpiDeviceEventController *controller = SPI_DEVICE_EVENT_CONTROLLER ( bonobo_object_from_servant (servant)); #ifdef SPI_DEBUG fprintf (stderr, "deregistering keystroke listener %p with maskVal %lu\n", @@ -393,7 +393,7 @@ impl_deregister_keystroke_listener (PortableServer_Servant servant, } /* - * CORBA Accessibility::DeviceEventController::registerMouseListener + * CORBA Accessibility::SpiDeviceEventController::registerMouseListener * method implementation */ /* @@ -402,7 +402,7 @@ impl_register_mouse_listener (PortableServer_Servant servant, const Accessibility_MouseListener *l, CORBA_Environment *ev) { - DeviceEventController *controller = DEVICE_EVENT_CONTROLLER ( + SpiDeviceEventController *controller = SPI_DEVICE_EVENT_CONTROLLER ( bonobo_object_from_servant (servant)); #ifdef SPI_DEBUG fprintf (stderr, "registering mouse listener %p\n", l); @@ -418,7 +418,7 @@ keycode_for_keysym (long keysym) } /* - * CORBA Accessibility::DeviceEventController::registerKeystrokeListener + * CORBA Accessibility::SpiDeviceEventController::registerKeystrokeListener * method implementation */ static void @@ -459,7 +459,7 @@ impl_generate_key_event (PortableServer_Servant servant, } /* - * CORBA Accessibility::DeviceEventController::generateMouseEvent + * CORBA Accessibility::SpiDeviceEventController::generateMouseEvent * method implementation */ static void @@ -475,13 +475,13 @@ impl_generate_mouse_event (PortableServer_Servant servant, } static void -device_event_controller_class_init (DeviceEventControllerClass *klass) +spi_device_event_controller_class_init (SpiDeviceEventControllerClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_DeviceEventController__epv *epv = &klass->epv; - device_event_controller_parent_class = g_type_class_ref (BONOBO_OBJECT_TYPE); + POA_Accessibility_SpiDeviceEventController__epv *epv = &klass->epv; + spi_device_event_controller_parent_class = g_type_class_ref (BONOBO_OBJECT_TYPE); - object_class->finalize = device_event_controller_object_finalize; + object_class->finalize = spi_device_event_controller_object_finalize; epv->registerKeystrokeListener = impl_register_keystroke_listener; epv->deregisterKeystrokeListener = impl_deregister_keystroke_listener; @@ -492,7 +492,7 @@ device_event_controller_class_init (DeviceEventControllerClass *klass) } static void -device_event_controller_init (DeviceEventController *device_event_controller) +spi_device_event_controller_init (SpiDeviceEventController *device_event_controller) { device_event_controller->key_listeners = NULL; device_event_controller->mouse_listeners = NULL; @@ -500,29 +500,29 @@ device_event_controller_init (DeviceEventController *device_event_controller) kbd_registered = _controller_register_with_devices (device_event_controller); } -gboolean device_event_controller_check_key_event (DeviceEventController *controller) +gboolean spi_device_event_controller_check_key_event (SpiDeviceEventController *controller) { - DeviceEventControllerClass *klass = DEVICE_EVENT_CONTROLLER_GET_CLASS (controller); + SpiDeviceEventControllerClass *klass = SPI_DEVICE_EVENT_CONTROLLER_GET_CLASS (controller); if (klass->check_key_event) return (klass->check_key_event) (controller); } GType -device_event_controller_get_type (void) +spi_device_event_controller_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (DeviceEventControllerClass), + sizeof (SpiDeviceEventControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) device_event_controller_class_init, + (GClassInitFunc) spi_device_event_controller_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (DeviceEventController), + sizeof (SpiDeviceEventController), 0, /* n preallocs */ - (GInstanceInitFunc) device_event_controller_init, + (GInstanceInitFunc) spi_device_event_controller_init, NULL /* value table */ }; /* @@ -533,11 +533,11 @@ device_event_controller_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_DeviceEventController__init, + POA_Accessibility_SpiDeviceEventController__init, NULL, - G_STRUCT_OFFSET (DeviceEventControllerClass, epv), + G_STRUCT_OFFSET (SpiDeviceEventControllerClass, epv), &tinfo, - "DeviceEventController"); + "SpiDeviceEventController"); } return type; diff --git a/libspi/deviceeventcontroller.h b/libspi/deviceeventcontroller.h index dd195db..985a36e 100644 --- a/libspi/deviceeventcontroller.h +++ b/libspi/deviceeventcontroller.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef DEVICE_EVENT_CONTROLLER_H_ -#define DEVICE_EVENT_CONTROLLER_H_ +#ifndef SPI_DEVICE_EVENT_CONTROLLER_H_ +#define SPI_DEVICE_EVENT_CONTROLLER_H_ #ifdef __cplusplus extern "C" { @@ -31,27 +31,27 @@ extern "C" { #include #include "keystrokelistener.h" -#define DEVICE_EVENT_CONTROLLER_TYPE (device_event_controller_get_type ()) -#define DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventController)) -#define DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventControllerClass)) -#define IS_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DEVICE_EVENT_CONTROLLER_TYPE)) -#define IS_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DEVICE_EVENT_CONTROLLER_TYPE)) -#define DEVICE_EVENT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventControllerClass)) +#define SPI_DEVICE_EVENT_CONTROLLER_TYPE (spi_device_event_controller_get_type ()) +#define SPI_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDeviceEventController)) +#define SPI_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDeviceEventControllerClass)) +#define IS_SPI_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SPI_DEVICE_EVENT_CONTROLLER_TYPE)) +#define IS_SPI_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_DEVICE_EVENT_CONTROLLER_TYPE)) +#define SPI_DEVICE_EVENT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDeviceEventControllerClass)) typedef struct { BonoboObject parent; GList *key_listeners; GList *mouse_listeners; GList *keymask_list; -} DeviceEventController; +} SpiDeviceEventController; typedef struct { BonoboObjectClass parent_class; - POA_Accessibility_DeviceEventController__epv epv; - gboolean (*check_key_event) (DeviceEventController *controller); -} DeviceEventControllerClass; + POA_Accessibility_SpiDeviceEventController__epv epv; + gboolean (*check_key_event) (SpiDeviceEventController *controller); +} SpiDeviceEventControllerClass; -GType device_event_controller_get_type (void); +GType spi_device_event_controller_get_type (void); #ifdef __cplusplus } diff --git a/libspi/editabletext.c b/libspi/editabletext.c index 5b01139..f5244a4 100644 --- a/libspi/editabletext.c +++ b/libspi/editabletext.c @@ -30,12 +30,12 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include /* - * This pulls the definition of the EditableText bonobo object + * This pulls the definition of the SpiEditableText bonobo object */ #include "editabletext.h" @@ -44,11 +44,11 @@ */ static void -editable_text_class_init (EditableTextClass *klass); +spi_editable_text_class_init (SpiEditableTextClass *klass); static void -editable_text_init (EditableText *editable); +spi_editable_text_init (SpiEditableText *editable); static void -editable_text_finalize (GObject *obj); +spi_editable_text_finalize (GObject *obj); static CORBA_boolean impl_setAttributes (PortableServer_Servant _servant, const CORBA_char * attributes, @@ -66,7 +66,7 @@ impl_insertText (PortableServer_Servant _servant, const CORBA_long length, CORBA_Environment * ev); static void -impl_copyText (PortableServer_Servant _servant, +impl_copySpiText (PortableServer_Servant _servant, const CORBA_long startPos, const CORBA_long endPos, CORBA_Environment * ev); static void @@ -84,21 +84,21 @@ impl_pasteText (PortableServer_Servant _servant, static GObjectClass *parent_class; GType -editable_text_get_type (void) +spi_editable_text_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (EditableTextClass), + sizeof (SpiEditableTextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) editable_text_class_init, + (GClassInitFunc) spi_editable_text_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (EditableText), + sizeof (SpiEditableText), 0, /* n preallocs */ - (GInstanceInitFunc) editable_text_init, + (GInstanceInitFunc) spi_editable_text_init, NULL /* value table */ }; @@ -108,54 +108,54 @@ editable_text_get_type (void) * use bonobo_type_unique. */ type = bonobo_type_unique ( - TEXT_TYPE, - POA_Accessibility_EditableText__init, + SPI_TEXT_TYPE, + POA_Accessibility_SpiEditableText__init, NULL, - G_STRUCT_OFFSET (EditableTextClass, epv), + G_STRUCT_OFFSET (SpiEditableTextClass, epv), &tinfo, - "AccessibleEditableText"); + "SpiAccessibleEditableText"); } return type; } static void -editable_text_class_init (EditableTextClass *klass) +spi_editable_text_class_init (SpiEditableTextClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_EditableText__epv *epv = &klass->epv; + POA_Accessibility_SpiEditableText__epv *epv = &klass->epv; parent_class = g_type_interface_peek_parent (klass); - object_class->finalize = editable_text_finalize; + object_class->finalize = spi_editable_text_finalize; /* Initialize epv table */ epv->setAttributes = impl_setAttributes; epv->setTextContents = impl_setTextContents; epv->insertText = impl_insertText; - epv->copyText = impl_copyText; + epv->copySpiText = impl_copySpiText; epv->cutText = impl_cutText; epv->deleteText = impl_deleteText; epv->pasteText = impl_pasteText; } static void -editable_text_init (EditableText *editable) +spi_editable_text_init (SpiEditableText *editable) { } static void -editable_text_finalize (GObject *obj) +spi_editable_text_finalize (GObject *obj) { parent_class->finalize (obj); } -EditableText * -editable_text_interface_new (AtkObject *obj) +SpiEditableText * +spi_editable_text_interface_new (AtkObject *obj) { - EditableText *new_editable = - EDITABLE_TEXT(g_object_new (EDITABLE_TEXT_TYPE, NULL)); - (TEXT (new_editable))->atko = obj; + SpiEditableText *new_editable = + SPI_EDITABLE_TEXT(g_object_new (SPI_EDITABLE_TEXT_TYPE, NULL)); + (SPI_TEXT (new_editable))->atko = obj; g_object_ref (obj); return new_editable; } @@ -167,12 +167,12 @@ impl_setAttributes (PortableServer_Servant _servant, const CORBA_long endPos, CORBA_Environment * ev) { - EditableText *editable; + SpiEditableText *editable; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); - g_return_if_fail (IS_EDITABLE_TEXT (obj)); - editable = EDITABLE_TEXT(bonobo_object_from_servant (_servant)); - g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (TEXT (obj))->atko)); + g_return_if_fail (IS_SPI_EDITABLE_TEXT (obj)); + editable = SPI_EDITABLE_TEXT(bonobo_object_from_servant (_servant)); + g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (SPI_TEXT (obj))->atko)); g_print ("setRunAttributes not implemented.\n"); } @@ -184,14 +184,14 @@ impl_setTextContents (PortableServer_Servant _servant, const CORBA_char * newContents, CORBA_Environment * ev) { - EditableText *editable; + SpiEditableText *editable; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); - g_return_if_fail (IS_EDITABLE_TEXT (obj)); - editable = EDITABLE_TEXT(bonobo_object_from_servant (_servant)); - g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (TEXT (obj))->atko)); + g_return_if_fail (IS_SPI_EDITABLE_TEXT (obj)); + editable = SPI_EDITABLE_TEXT(bonobo_object_from_servant (_servant)); + g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (SPI_TEXT (obj))->atko)); - atk_editable_text_set_text_contents (ATK_EDITABLE_TEXT( TEXT (editable)->atko), + atk_editable_text_set_text_contents (ATK_EDITABLE_TEXT( SPI_TEXT (editable)->atko), (gchar *) newContents); } @@ -204,14 +204,14 @@ impl_insertText (PortableServer_Servant _servant, const CORBA_long length, CORBA_Environment * ev) { - EditableText *editable; + SpiEditableText *editable; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); - g_return_if_fail (IS_EDITABLE_TEXT (obj)); - editable = EDITABLE_TEXT(bonobo_object_from_servant (_servant)); - g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (TEXT (obj))->atko)); + g_return_if_fail (IS_SPI_EDITABLE_TEXT (obj)); + editable = SPI_EDITABLE_TEXT(bonobo_object_from_servant (_servant)); + g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (SPI_TEXT (obj))->atko)); - atk_editable_text_insert_text (ATK_EDITABLE_TEXT( TEXT (editable)->atko), + atk_editable_text_insert_text (ATK_EDITABLE_TEXT( SPI_TEXT (editable)->atko), (gchar *) text, (gint) length, (gint *) &position); @@ -219,18 +219,18 @@ impl_insertText (PortableServer_Servant _servant, static void -impl_copyText (PortableServer_Servant _servant, +impl_copySpiText (PortableServer_Servant _servant, const CORBA_long startPos, const CORBA_long endPos, CORBA_Environment * ev) { - EditableText *editable; + SpiEditableText *editable; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); - g_return_if_fail (IS_EDITABLE_TEXT (obj)); - editable = EDITABLE_TEXT(bonobo_object_from_servant (_servant)); - g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (TEXT (obj))->atko)); + g_return_if_fail (IS_SPI_EDITABLE_TEXT (obj)); + editable = SPI_EDITABLE_TEXT(bonobo_object_from_servant (_servant)); + g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (SPI_TEXT (obj))->atko)); - atk_editable_text_copy_text (ATK_EDITABLE_TEXT( TEXT(editable)->atko), + atk_editable_text_copy_text (ATK_EDITABLE_TEXT( SPI_TEXT(editable)->atko), (gint) startPos, (gint) endPos); } @@ -241,14 +241,14 @@ impl_cutText (PortableServer_Servant _servant, const CORBA_long startPos, const CORBA_long endPos, CORBA_Environment * ev) { - EditableText *editable; + SpiEditableText *editable; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); - g_return_if_fail (IS_EDITABLE_TEXT (obj)); - editable = EDITABLE_TEXT(bonobo_object_from_servant (_servant)); - g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (TEXT (obj))->atko)); + g_return_if_fail (IS_SPI_EDITABLE_TEXT (obj)); + editable = SPI_EDITABLE_TEXT(bonobo_object_from_servant (_servant)); + g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (SPI_TEXT (obj))->atko)); - atk_editable_text_cut_text (ATK_EDITABLE_TEXT(TEXT (editable)->atko), + atk_editable_text_cut_text (ATK_EDITABLE_TEXT(SPI_TEXT (editable)->atko), (gint) startPos, (gint) endPos); } @@ -260,14 +260,14 @@ impl_deleteText (PortableServer_Servant _servant, const CORBA_long startPos, const CORBA_long endPos, CORBA_Environment * ev) { - EditableText *editable; + SpiEditableText *editable; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); - g_return_if_fail (IS_EDITABLE_TEXT (obj)); - editable = EDITABLE_TEXT(bonobo_object_from_servant (_servant)); - g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (TEXT (obj))->atko)); + g_return_if_fail (IS_SPI_EDITABLE_TEXT (obj)); + editable = SPI_EDITABLE_TEXT(bonobo_object_from_servant (_servant)); + g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (SPI_TEXT (obj))->atko)); - atk_editable_text_delete_text (ATK_EDITABLE_TEXT( TEXT(editable)->atko), + atk_editable_text_delete_text (ATK_EDITABLE_TEXT( SPI_TEXT(editable)->atko), (gint) startPos, (gint) endPos); } @@ -276,13 +276,13 @@ static void impl_pasteText (PortableServer_Servant _servant, const CORBA_long position, CORBA_Environment * ev) { - EditableText *editable; + SpiEditableText *editable; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); - g_return_if_fail (IS_EDITABLE_TEXT (obj)); - editable = EDITABLE_TEXT(bonobo_object_from_servant (_servant)); - g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (TEXT (obj))->atko)); + g_return_if_fail (IS_SPI_EDITABLE_TEXT (obj)); + editable = SPI_EDITABLE_TEXT(bonobo_object_from_servant (_servant)); + g_return_if_fail (ATK_IS_EDITABLE_TEXT ( (SPI_TEXT (obj))->atko)); - atk_editable_text_paste_text (ATK_EDITABLE_TEXT( TEXT(editable)->atko), position); + atk_editable_text_paste_text (ATK_EDITABLE_TEXT( SPI_TEXT(editable)->atko), position); } diff --git a/libspi/editabletext.h b/libspi/editabletext.h index 66b4ca7..0686c6e 100644 --- a/libspi/editabletext.h +++ b/libspi/editabletext.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef EDITABLE_TEXT_H_ -#define EDITABLE_TEXT_H_ +#ifndef SPI_EDITABLE_TEXT_H_ +#define SPI_EDITABLE_TEXT_H_ #ifdef __cplusplus @@ -30,32 +30,32 @@ extern "C" { #include #include "text.h" -#define EDITABLE_TEXT_TYPE (editable_text_get_type ()) -#define EDITABLE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EDITABLE_TEXT_TYPE, EditableText)) -#define EDITABLE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EDITABLE_TEXT_TYPE, EditableText)) -#define IS_EDITABLE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EDITABLE_TEXT_TYPE)) -#define IS_EDITABLE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EDITABLE_TEXT_TYPE)) +#define SPI_EDITABLE_TEXT_TYPE (spi_editable_text_get_type ()) +#define SPI_EDITABLE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_EDITABLE_TEXT_TYPE, SpiEditableText)) +#define SPI_EDITABLE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_EDITABLE_TEXT_TYPE, SpiEditableText)) +#define IS_SPI_EDITABLE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPI_EDITABLE_TEXT_TYPE)) +#define IS_SPI_EDITABLE_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_EDITABLE_TEXT_TYPE)) -typedef struct _EditableText EditableText; -typedef struct _EditableTextClass EditableTextClass; +typedef struct _SpiEditableText SpiEditableText; +typedef struct _SpiEditableTextClass SpiEditableTextClass; -struct _EditableText { - Text parent; +struct _SpiEditableText { + SpiText parent; }; -struct _EditableTextClass { - TextClass parent_class; - POA_Accessibility_EditableText__epv epv; +struct _SpiEditableTextClass { + SpiTextClass parent_class; + POA_Accessibility_SpiEditableText__epv epv; }; GType -editable_text_get_type (void); +spi_editable_text_get_type (void); -EditableText * -editable_text_interface_new ( AtkObject *obj); +SpiEditableText * +spi_editable_text_interface_new ( AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* EDITABLE_TEXT_H_ */ +#endif /* SPI_EDITABLE_TEXT_H_ */ diff --git a/libspi/eventlistener.c b/libspi/eventlistener.c index 9de4519..c682be9 100644 --- a/libspi/eventlistener.c +++ b/libspi/eventlistener.c @@ -21,7 +21,7 @@ */ /* - * accessibleeventlistener.c: bonobo implementation of Listener.idl, + * accessibleeventlistener.c: bonobo implementation of SpiListener.idl, * with added ability to attach/remove in-process callbacks. * */ @@ -42,27 +42,27 @@ /* * Our parent Gtk object type */ -#define PARENT_TYPE LISTENER_TYPE +#define PARENT_TYPE SPI_LISTENER_TYPE /* * A pointer to our parent object class */ -static ListenerClass *accessible_event_listener_parent_class; +static SpiListenerClass *spi_accessible_event_spi_listener_parent_class; /* * Implemented GObject::finalize */ static void -accessible_event_listener_object_finalize (GObject *object) +spi_accessible_event_spi_listener_object_finalize (GObject *object) { #ifdef SPI_DEBUG - fprintf(stderr, "listener_object_finalize called\n"); + fprintf(stderr, "spi_listener_object_finalize called\n"); #endif - ((GObjectClass *) accessible_event_listener_parent_class)->finalize (object); + ((GObjectClass *) spi_accessible_event_spi_listener_parent_class)->finalize (object); } /* - * CORBA Accessibility::Listener::notifyEvent method implementation + * CORBA Accessibility::SpiListener::notifyEvent method implementation */ static void @@ -73,7 +73,7 @@ impl_accessible_event_notify_event (PortableServer_Servant servant, int n; int len; VoidEventListenerCB cb; - AccessibleEventListener *listener = ACCESSIBLE_EVENT_LISTENER ( + SpiAccessibleEventListener *listener = SPI_ACCESSIBLE_EVENT_SPI_LISTENER ( bonobo_object_from_servant (servant)); len = g_list_length (listener->callbacks); @@ -85,44 +85,44 @@ impl_accessible_event_notify_event (PortableServer_Servant servant, (*cb) (e); } } - /* Accessibility_Accessible_unref (e->source, ev); */ + /* Accessibility_SpiAccessible_unref (e->source, ev); */ } static void -accessible_event_listener_class_init (AccessibleEventListenerClass *klass) +spi_accessible_event_spi_listener_class_init (SpiAccessibleEventListenerClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - ListenerClass * listener_class = (ListenerClass *) klass; - POA_Accessibility_EventListener__epv *epv = &listener_class->epv; - accessible_event_listener_parent_class = g_type_class_ref (LISTENER_TYPE); + SpiListenerClass * spi_listener_class = (SpiListenerClass *) klass; + POA_Accessibility_EventListener__epv *epv = &spi_listener_class->epv; + spi_accessible_event_spi_listener_parent_class = g_type_class_ref (SPI_LISTENER_TYPE); - object_class->finalize = accessible_event_listener_object_finalize; + object_class->finalize = spi_accessible_event_spi_listener_object_finalize; epv->notifyEvent = impl_accessible_event_notify_event; } static void -accessible_event_listener_init (AccessibleEventListener *listener) +spi_accessible_event_spi_listener_init (SpiAccessibleEventListener *listener) { listener->callbacks = NULL; } GType -accessible_event_listener_get_type (void) +spi_accessible_event_spi_listener_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (AccessibleEventListenerClass), + sizeof (SpiAccessibleEventListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) accessible_event_listener_class_init, + (GClassInitFunc) spi_accessible_event_spi_listener_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Listener), + sizeof (SpiListener), 0, /* n preallocs */ - (GInstanceInitFunc) accessible_event_listener_init, + (GInstanceInitFunc) spi_accessible_event_spi_listener_init, NULL /* value table */ }; /* @@ -135,29 +135,29 @@ accessible_event_listener_get_type (void) PARENT_TYPE, POA_Accessibility_EventListener__init, NULL, - G_STRUCT_OFFSET (ListenerClass, epv), + G_STRUCT_OFFSET (SpiListenerClass, epv), &tinfo, - "AccessibleEventListener"); + "SpiAccessibleEventListener"); } return type; } -AccessibleEventListener * -accessible_event_listener_new () +SpiAccessibleEventListener * +spi_accessible_event_spi_listener_new () { - AccessibleEventListener *retval = - ACCESSIBLE_EVENT_LISTENER (g_object_new (accessible_event_listener_get_type (), NULL)); + SpiAccessibleEventListener *retval = + SPI_ACCESSIBLE_EVENT_SPI_LISTENER (g_object_new (spi_accessible_event_spi_listener_get_type (), NULL)); return retval; } -void accessible_event_listener_add_callback (AccessibleEventListener *listener, +void spi_accessible_event_spi_listener_add_callback (SpiAccessibleEventListener *listener, VoidEventListenerCB callback) { listener->callbacks = g_list_append (listener->callbacks, callback); } -void accessible_event_listener_remove_callback (AccessibleEventListener *listener, +void spi_accessible_event_spi_listener_remove_callback (SpiAccessibleEventListener *listener, VoidEventListenerCB callback) { listener->callbacks = g_list_remove (listener->callbacks, callback); diff --git a/libspi/eventlistener.h b/libspi/eventlistener.h index f303ade..68d36ee 100644 --- a/libspi/eventlistener.h +++ b/libspi/eventlistener.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef ACCESSIBLE_EVENT_LISTENER_H_ -#define ACCESSIBLE_EVENT_LISTENER_H_ +#ifndef SPI_ACCESSIBLE_EVENT_SPI_LISTENER_H_ +#define SPI_ACCESSIBLE_EVENT_SPI_LISTENER_H_ #ifdef __cplusplus extern "C" { @@ -29,32 +29,32 @@ extern "C" { #include "listener.h" -#define ACCESSIBLE_EVENT_LISTENER_TYPE (accessible_event_listener_get_type ()) -#define ACCESSIBLE_EVENT_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ACCESSIBLE_EVENT_LISTENER_TYPE, AccessibleEventListener)) -#define ACCESSIBLE_EVENT_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ACCESSIBLE_EVENT_LISTENER_TYPE, AccessibleEventListenerClass)) -#define IS_ACCESSIBLE_EVENT_LISTENER(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), ACCESSIBLE_EVENT_LISTENER_TYPE)) -#define IS_ACCESSIBLE_EVENT_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ACCESSIBLE_EVENT_LISTENER_TYPE)) +#define SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE (spi_accessible_event_spi_listener_get_type ()) +#define SPI_ACCESSIBLE_EVENT_SPI_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE, SpiAccessibleEventListener)) +#define SPI_ACCESSIBLE_EVENT_SPI_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE, SpiAccessibleEventListenerClass)) +#define IS_SPI_ACCESSIBLE_EVENT_SPI_LISTENER(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE)) +#define IS_SPI_ACCESSIBLE_EVENT_SPI_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_ACCESSIBLE_EVENT_SPI_LISTENER_TYPE)) typedef void (*VoidEventListenerCB) (gpointer event_ptr); typedef struct { - Listener parent; + SpiListener parent; GList *callbacks; -} AccessibleEventListener; +} SpiAccessibleEventListener; typedef struct { - ListenerClass parent_class; -} AccessibleEventListenerClass; + SpiListenerClass parent_class; +} SpiAccessibleEventListenerClass; -GType accessible_event_listener_get_type (void); -AccessibleEventListener *accessible_event_listener_new (void); -void accessible_event_listener_add_callback (AccessibleEventListener *listener, +GType spi_accessible_event_spi_listener_get_type (void); +SpiAccessibleEventListener *spi_accessible_event_spi_listener_new (void); +void spi_accessible_event_spi_listener_add_callback (SpiAccessibleEventListener *listener, VoidEventListenerCB callback); -void accessible_event_listener_remove_callback (AccessibleEventListener *listener, +void spi_accessible_event_spi_listener_remove_callback (SpiAccessibleEventListener *listener, VoidEventListenerCB callback); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* ACCESSIBLE_EVENT_LISTENER_H_ */ +#endif /* SPI_ACCESSIBLE_EVENT_SPI_LISTENER_H_ */ diff --git a/libspi/hyperlink.c b/libspi/hyperlink.c index 5d0c72f..e24a6ba 100644 --- a/libspi/hyperlink.c +++ b/libspi/hyperlink.c @@ -30,7 +30,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include @@ -44,11 +44,11 @@ */ static void -hyperlink_class_init (HyperlinkClass *klass); +spi_hyperlink_class_init (SpiHyperlinkClass *klass); static void -hyperlink_init (Hyperlink *hyperlink); +spi_hyperlink_init (SpiHyperlink *hyperlink); static void -hyperlink_finalize (GObject *obj); +spi_hyperlink_finalize (GObject *obj); static CORBA_string impl_getURI (PortableServer_Servant _servant, const CORBA_long i, CORBA_Environment * ev); @@ -61,7 +61,7 @@ impl__get_startIndex (PortableServer_Servant _servant, static CORBA_long impl__get_endIndex (PortableServer_Servant _servant, CORBA_Environment * ev); -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_getObject (PortableServer_Servant _servant, const CORBA_long i, CORBA_Environment * ev); @@ -72,21 +72,21 @@ impl_isValid (PortableServer_Servant _servant, static GObjectClass *parent_class; GType -hyperlink_get_type (void) +spi_hyperlink_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (HyperlinkClass), + sizeof (SpiHyperlinkClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) hyperlink_class_init, + (GClassInitFunc) spi_hyperlink_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Hyperlink), + sizeof (SpiHyperlink), 0, /* n preallocs */ - (GInstanceInitFunc) hyperlink_init, + (GInstanceInitFunc) spi_hyperlink_init, NULL /* value table */ }; @@ -97,24 +97,24 @@ hyperlink_get_type (void) */ type = bonobo_type_unique ( BONOBO_OBJECT_TYPE, - POA_Accessibility_Hyperlink__init, + POA_Accessibility_SpiHyperlink__init, NULL, - G_STRUCT_OFFSET (HyperlinkClass, epv), + G_STRUCT_OFFSET (SpiHyperlinkClass, epv), &tinfo, - "AccessibleHyperlink"); + "SpiAccessibleHyperlink"); } return type; } static void -hyperlink_class_init (HyperlinkClass *klass) +spi_hyperlink_class_init (SpiHyperlinkClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Hyperlink__epv *epv = &klass->epv; + POA_Accessibility_SpiHyperlink__epv *epv = &klass->epv; parent_class = g_type_class_peek_parent (klass); - object_class->finalize = hyperlink_finalize; + object_class->finalize = spi_hyperlink_finalize; /* Initialize epv table */ @@ -127,24 +127,24 @@ hyperlink_class_init (HyperlinkClass *klass) } static void -hyperlink_init (Hyperlink *hyperlink) +spi_hyperlink_init (SpiHyperlink *hyperlink) { } static void -hyperlink_finalize (GObject *obj) +spi_hyperlink_finalize (GObject *obj) { - Hyperlink *hyperlink = HYPERLINK(obj); + SpiHyperlink *hyperlink = SPI_HYPERLINK(obj); g_object_unref (hyperlink->atko); hyperlink->atko = NULL; parent_class->finalize (obj); } -Hyperlink * -hyperlink_interface_new (AtkObject *obj) +SpiHyperlink * +spi_hyperlink_interface_new (AtkObject *obj) { - Hyperlink *new_hyperlink = - HYPERLINK(g_object_new (HYPERLINK_TYPE, NULL)); + SpiHyperlink *new_hyperlink = + SPI_HYPERLINK(g_object_new (SPI_HYPERLINK_TYPE, NULL)); new_hyperlink->atko = obj; g_object_ref (obj); return new_hyperlink; @@ -156,7 +156,7 @@ static CORBA_short impl__get_n_anchors (PortableServer_Servant _servant, CORBA_Environment * ev) { - Hyperlink *link = HYPERLINK(bonobo_object_from_servant(_servant)); + SpiHyperlink *link = SPI_HYPERLINK(bonobo_object_from_servant(_servant)); return (CORBA_short) atk_hyperlink_get_n_anchors (ATK_HYPERLINK(link->atko)); } @@ -166,7 +166,7 @@ static CORBA_long impl__get_startIndex (PortableServer_Servant _servant, CORBA_Environment * ev) { - Hyperlink *link = HYPERLINK(bonobo_object_from_servant(_servant)); + SpiHyperlink *link = SPI_HYPERLINK(bonobo_object_from_servant(_servant)); return (CORBA_long) atk_hyperlink_get_start_index (ATK_HYPERLINK(link->atko)); } @@ -176,7 +176,7 @@ static CORBA_long impl__get_endIndex (PortableServer_Servant _servant, CORBA_Environment * ev) { - Hyperlink *link = HYPERLINK(bonobo_object_from_servant(_servant)); + SpiHyperlink *link = SPI_HYPERLINK(bonobo_object_from_servant(_servant)); return (CORBA_long) atk_hyperlink_get_end_index (ATK_HYPERLINK(link->atko)); } @@ -186,7 +186,7 @@ static CORBA_string impl_getURI (PortableServer_Servant _servant, const CORBA_long i, CORBA_Environment * ev) { - Hyperlink *link = HYPERLINK(bonobo_object_from_servant(_servant)); + SpiHyperlink *link = SPI_HYPERLINK(bonobo_object_from_servant(_servant)); gchar *uri; CORBA_char *rv; uri = atk_hyperlink_get_uri (ATK_HYPERLINK(link->atko), (gint) i); @@ -202,16 +202,16 @@ impl_getURI (PortableServer_Servant _servant, -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_getObject (PortableServer_Servant _servant, const CORBA_long i, CORBA_Environment * ev) { - Hyperlink *link = HYPERLINK(bonobo_object_from_servant(_servant)); + SpiHyperlink *link = SPI_HYPERLINK(bonobo_object_from_servant(_servant)); AtkObject *atk_object; - Accessibility_Accessible rv; + Accessibility_SpiAccessible rv; atk_object = atk_hyperlink_get_object (ATK_HYPERLINK(link->atko), (gint) i); - rv = bonobo_object_corba_objref (BONOBO_OBJECT(accessible_new(atk_object))); + rv = bonobo_object_corba_objref (BONOBO_OBJECT(spi_accessible_new(atk_object))); return rv; } @@ -221,7 +221,7 @@ static CORBA_boolean impl_isValid (PortableServer_Servant _servant, CORBA_Environment * ev) { - Hyperlink *link = HYPERLINK(bonobo_object_from_servant(_servant)); + SpiHyperlink *link = SPI_HYPERLINK(bonobo_object_from_servant(_servant)); return (CORBA_boolean) atk_hyperlink_is_valid (ATK_HYPERLINK(link->atko)); } diff --git a/libspi/hyperlink.h b/libspi/hyperlink.h index 9eb196c..91186e9 100644 --- a/libspi/hyperlink.h +++ b/libspi/hyperlink.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef HYPERLINK_H_ -#define HYPERLINK_H_ +#ifndef SPI_HYPERLINK_H_ +#define SPI_HYPERLINK_H_ #ifdef __cplusplus @@ -29,33 +29,33 @@ extern "C" { #include #include -#define HYPERLINK_TYPE (hyperlink_get_type ()) -#define HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HYPERLINK_TYPE, Hyperlink)) -#define HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), HYPERLINK_TYPE, HyperlinkClass)) -#define IS_HYPERLINK(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), HYPERLINK_TYPE)) -#define IS_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HYPERLINK_TYPE)) +#define SPI_HYPERLINK_TYPE (spi_hyperlink_get_type ()) +#define SPI_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_HYPERLINK_TYPE, SpiHyperlink)) +#define SPI_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_HYPERLINK_TYPE, SpiHyperlinkClass)) +#define IS_SPI_HYPERLINK(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), SPI_HYPERLINK_TYPE)) +#define IS_SPI_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_HYPERLINK_TYPE)) -typedef struct _Hyperlink Hyperlink; -typedef struct _HyperlinkClass HyperlinkClass; +typedef struct _SpiHyperlink SpiHyperlink; +typedef struct _SpiHyperlinkClass SpiHyperlinkClass; -struct _Hyperlink { +struct _SpiHyperlink { BonoboObject parent; AtkObject *atko; }; -struct _HyperlinkClass { +struct _SpiHyperlinkClass { BonoboObjectClass parent_class; - POA_Accessibility_Hyperlink__epv epv; + POA_Accessibility_SpiHyperlink__epv epv; }; GType -hyperlink_get_type (void); +spi_hyperlink_get_type (void); -Hyperlink * -hyperlink_interface_new (AtkObject *obj); +SpiHyperlink * +spi_hyperlink_interface_new (AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* HYPERLINK_H_ */ +#endif /* SPI_HYPERLINK_H_ */ diff --git a/libspi/hypertext.c b/libspi/hypertext.c index e9780d2..8e5e039 100644 --- a/libspi/hypertext.c +++ b/libspi/hypertext.c @@ -30,7 +30,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include @@ -44,11 +44,11 @@ */ static void -hypertext_class_init (HypertextClass *klass); +spi_hypertext_class_init (SpiHypertextClass *klass); static void -hypertext_init (Hypertext *hypertext); +spi_hypertext_init (SpiHypertext *hypertext); static void -hypertext_finalize (GObject *obj); +spi_hypertext_finalize (GObject *obj); static CORBA_short impl__get_n_anchors (PortableServer_Servant _servant, CORBA_Environment * ev); @@ -61,18 +61,18 @@ impl__get_startIndex (PortableServer_Servant _servant, static CORBA_long impl__get_endIndex (PortableServer_Servant _servant, CORBA_Environment * ev); -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_getAnchor (PortableServer_Servant _servant, const CORBA_long i, CORBA_Environment * ev); -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_getObject (PortableServer_Servant _servant, const CORBA_long i, CORBA_Environment * ev); static CORBA_long impl_getNLinks (PortableServer_Servant _servant, CORBA_Environment * ev); -static Accessibility_Hyperlink +static Accessibility_SpiHyperlink impl_getLink (PortableServer_Servant _servant, const CORBA_long linkIndex, CORBA_Environment * ev); @@ -84,21 +84,21 @@ impl_getLinkIndex (PortableServer_Servant _servant, static GObjectClass *parent_class; GType -hypertext_get_type (void) +spi_hypertext_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (HypertextClass), + sizeof (SpiHypertextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) hypertext_class_init, + (GClassInitFunc) spi_hypertext_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Hypertext), + sizeof (SpiHypertext), 0, /* n preallocs */ - (GInstanceInitFunc) hypertext_init, + (GInstanceInitFunc) spi_hypertext_init, NULL /* value table */ }; @@ -109,24 +109,24 @@ hypertext_get_type (void) */ type = bonobo_type_unique ( BONOBO_OBJECT_TYPE, - POA_Accessibility_Hypertext__init, + POA_Accessibility_SpiHyperspi_text__init, NULL, - G_STRUCT_OFFSET (HypertextClass, epv), + G_STRUCT_OFFSET (SpiHypertextClass, epv), &tinfo, - "AccessibleHypertext"); + "SpiAccessibleHypertext"); } return type; } static void -hypertext_class_init (HypertextClass *klass) +spi_hypertext_class_init (SpiHypertextClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Hypertext__epv *epv = &klass->epv; + POA_Accessibility_SpiHyperspi_text__epv *epv = &klass->epv; parent_class = g_type_class_peek_parent (klass); - object_class->finalize = hypertext_finalize; + object_class->finalize = spi_hypertext_finalize; /* Initialize epv table */ @@ -136,24 +136,24 @@ hypertext_class_init (HypertextClass *klass) } static void -hypertext_init (Hypertext *hypertext) +spi_hypertext_init (SpiHypertext *hypertext) { } static void -hypertext_finalize (GObject *obj) +spi_hypertext_finalize (GObject *obj) { - Hypertext *hypertext = HYPERTEXT(obj); + SpiHypertext *hypertext = SPI_HYPERTEXT(obj); g_object_unref (hypertext->atko); hypertext->atko = NULL; parent_class->finalize (obj); } -Hypertext * -hypertext_interface_new (AtkObject *obj) +SpiHypertext * +spi_hypertext_interface_new (AtkObject *obj) { - Hypertext *new_hypertext = - HYPERTEXT(g_object_new (HYPERTEXT_TYPE, NULL)); + SpiHypertext *new_hypertext = + SPI_HYPERTEXT(g_object_new (SPI_HYPERTEXT_TYPE, NULL)); new_hypertext->atko = obj; g_object_ref (obj); return new_hypertext; @@ -165,25 +165,25 @@ static CORBA_long impl_getNLinks (PortableServer_Servant _servant, CORBA_Environment * ev) { - Hypertext *hypertext = HYPERTEXT(bonobo_object_from_servant(_servant)); + SpiHypertext *hypertext = SPI_HYPERTEXT(bonobo_object_from_servant(_servant)); return (CORBA_long) atk_hypertext_get_n_links (ATK_HYPERTEXT(hypertext->atko)); } -static Accessibility_Hyperlink +static Accessibility_SpiHyperlink impl_getLink (PortableServer_Servant _servant, const CORBA_long linkIndex, CORBA_Environment * ev) { AtkHyperlink *link; - Hypertext *hypertext = HYPERTEXT(bonobo_object_from_servant(_servant)); - Accessibility_Hyperlink rv; + SpiHypertext *hypertext = SPI_HYPERTEXT(bonobo_object_from_servant(_servant)); + Accessibility_SpiHyperlink rv; link = atk_hypertext_get_link (ATK_HYPERTEXT(hypertext->atko), (gint) linkIndex); - rv = bonobo_object_corba_objref (BONOBO_OBJECT(hyperlink_interface_new(ATK_OBJECT(link)))); + rv = bonobo_object_corba_objref (BONOBO_OBJECT(spi_hyperlink_interface_new(ATK_OBJECT(link)))); return rv; } @@ -194,7 +194,7 @@ impl_getLinkIndex (PortableServer_Servant _servant, const CORBA_long characterIndex, CORBA_Environment * ev) { - Hypertext *hypertext = HYPERTEXT(bonobo_object_from_servant(_servant)); + SpiHypertext *hypertext = SPI_HYPERTEXT(bonobo_object_from_servant(_servant)); return (CORBA_long) atk_hypertext_get_link_index (ATK_HYPERTEXT(hypertext->atko), (gint) characterIndex); diff --git a/libspi/hypertext.h b/libspi/hypertext.h index f3d5e60..6837770 100644 --- a/libspi/hypertext.h +++ b/libspi/hypertext.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef HYPERTEXT_H_ -#define HYPERTEXT_H_ +#ifndef SPI_HYPERTEXT_H_ +#define SPI_HYPERTEXT_H_ #ifdef __cplusplus @@ -29,33 +29,33 @@ extern "C" { #include #include -#define HYPERTEXT_TYPE (hypertext_get_type ()) -#define HYPERTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HYPERTEXT_TYPE, Hypertext)) -#define HYPERTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), HYPERTEXT_TYPE, HypertextClass)) -#define IS_HYPERTEXT(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), HYPERTEXT_TYPE)) -#define IS_HYPETEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HYPERTEXT_TYPE)) +#define SPI_HYPERTEXT_TYPE (spi_hypertext_get_type ()) +#define SPI_HYPERTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_HYPERTEXT_TYPE, SpiHypertext)) +#define SPI_HYPERTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_HYPERTEXT_TYPE, SpiHypertextClass)) +#define IS_SPI_HYPERTEXT(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), SPI_HYPERTEXT_TYPE)) +#define IS_HYPESPI_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_HYPERTEXT_TYPE)) -typedef struct _Hypertext Hypertext; -typedef struct _HypertextClass HypertextClass; +typedef struct _SpiHypertext SpiHypertext; +typedef struct _SpiHypertextClass SpiHypertextClass; -struct _Hypertext { +struct _SpiHypertext { BonoboObject parent; AtkObject *atko; }; -struct _HypertextClass { +struct _SpiHypertextClass { BonoboObjectClass parent_class; - POA_Accessibility_Hypertext__epv epv; + POA_Accessibility_SpiHyperspi_text__epv epv; }; GType -hypertext_get_type (void); +spi_hypertext_get_type (void); -Hypertext * -hypertext_interface_new (AtkObject *obj); +SpiHypertext * +spi_hypertext_interface_new (AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* HYPERTEXT_H_ */ +#endif /* SPI_HYPERTEXT_H_ */ diff --git a/libspi/image.c b/libspi/image.c index f1c9893..be9deb3 100644 --- a/libspi/image.c +++ b/libspi/image.c @@ -30,7 +30,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include @@ -44,11 +44,11 @@ */ static void -image_class_init (ImageClass *klass); +spi_image_class_init (SpiImageClass *klass); static void -image_init (Image *image); +spi_image_init (SpiImage *image); static void -image_finalize (GObject *obj); +spi_image_finalize (GObject *obj); static void impl_getImagePosition (PortableServer_Servant _servant, CORBA_long * x, CORBA_long * y, @@ -66,21 +66,21 @@ impl__get_imageDescription (PortableServer_Servant _servant, static GObjectClass *parent_class; GType -image_get_type (void) +spi_image_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (ImageClass), + sizeof (SpiImageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) image_class_init, + (GClassInitFunc) spi_image_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Image), + sizeof (SpiImage), 0, /* n preallocs */ - (GInstanceInitFunc) image_init, + (GInstanceInitFunc) spi_image_init, NULL /* value table */ }; @@ -91,24 +91,24 @@ image_get_type (void) */ type = bonobo_type_unique ( BONOBO_OBJECT_TYPE, - POA_Accessibility_Image__init, + POA_Accessibility_SpiImage__init, NULL, - G_STRUCT_OFFSET (ImageClass, epv), + G_STRUCT_OFFSET (SpiImageClass, epv), &tinfo, - "AccessibleImage"); + "SpiAccessibleImage"); } return type; } static void -image_class_init (ImageClass *klass) +spi_image_class_init (SpiImageClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Image__epv *epv = &klass->epv; + POA_Accessibility_SpiImage__epv *epv = &klass->epv; parent_class = g_type_class_peek_parent (klass); - object_class->finalize = image_finalize; + object_class->finalize = spi_image_finalize; /* Initialize epv table */ @@ -119,24 +119,24 @@ image_class_init (ImageClass *klass) } static void -image_init (Image *image) +spi_image_init (SpiImage *image) { } static void -image_finalize (GObject *obj) +spi_image_finalize (GObject *obj) { - Image *image = IMAGE (obj); + SpiImage *image = SPI_IMAGE (obj); g_object_unref (image->atko); image->atko = NULL; parent_class->finalize (obj); } -Image * -image_interface_new (AtkObject *obj) +SpiImage * +spi_image_interface_new (AtkObject *obj) { - Image *new_image = - IMAGE(g_object_new (IMAGE_TYPE, NULL)); + SpiImage *new_image = + SPI_IMAGE(g_object_new (SPI_IMAGE_TYPE, NULL)); new_image->atko = obj; g_object_ref (obj); return new_image; @@ -150,7 +150,7 @@ impl_getImagePosition (PortableServer_Servant _servant, const CORBA_short coordType, CORBA_Environment * ev) { - Image *image = IMAGE (bonobo_object_from_servant(_servant)); + SpiImage *image = SPI_IMAGE (bonobo_object_from_servant(_servant)); atk_image_get_image_position (ATK_IMAGE(image->atko), (gint *) x, (gint *) y, (AtkCoordType) coordType); @@ -163,7 +163,7 @@ impl_getImageSize (PortableServer_Servant _servant, CORBA_long * width, CORBA_long * height, CORBA_Environment * ev) { - Image *image = IMAGE (bonobo_object_from_servant(_servant)); + SpiImage *image = SPI_IMAGE (bonobo_object_from_servant(_servant)); atk_image_get_image_size (ATK_IMAGE(image->atko), (gint *) width, (gint *) height); } @@ -174,7 +174,7 @@ static CORBA_string impl__get_imageDescription (PortableServer_Servant _servant, CORBA_Environment * ev) { - Image *image = IMAGE (bonobo_object_from_servant(_servant)); + SpiImage *image = SPI_IMAGE (bonobo_object_from_servant(_servant)); CORBA_char *rv; rv = atk_image_get_image_description (ATK_IMAGE(image->atko)); diff --git a/libspi/image.h b/libspi/image.h index 0ad0dcc..e3eae30 100644 --- a/libspi/image.h +++ b/libspi/image.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef IMAGE_H_ -#define IMAGE_H_ +#ifndef SPI_IMAGE_H_ +#define SPI_IMAGE_H_ #ifdef __cplusplus @@ -29,33 +29,33 @@ extern "C" { #include #include -#define IMAGE_TYPE (image_get_type ()) -#define IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IMAGE_TYPE, Image)) -#define IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), IMAGE_TYPE, ImageClass)) -#define IS_IMAGE(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), IMAGE_TYPE)) -#define IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IMAGE_TYPE)) +#define SPI_IMAGE_TYPE (spi_image_get_type ()) +#define SPI_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_IMAGE_TYPE, SpiImage)) +#define SPI_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_IMAGE_TYPE, SpiImageClass)) +#define IS_SPI_IMAGE(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), SPI_IMAGE_TYPE)) +#define IS_SPI_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_IMAGE_TYPE)) -typedef struct _Image Image; -typedef struct _ImageClass ImageClass; +typedef struct _SpiImage SpiImage; +typedef struct _SpiImageClass SpiImageClass; -struct _Image { +struct _SpiImage { BonoboObject parent; AtkObject *atko; }; -struct _ImageClass { +struct _SpiImageClass { BonoboObjectClass parent_class; - POA_Accessibility_Image__epv epv; + POA_Accessibility_SpiImage__epv epv; }; GType -image_get_type (void); +spi_image_get_type (void); -Image * -image_interface_new (AtkObject *obj); +SpiImage * +spi_image_interface_new (AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* IMAGE_H_ */ +#endif /* SPI_IMAGE_H_ */ diff --git a/libspi/keystrokelistener.c b/libspi/keystrokelistener.c index d897260..3d8893b 100644 --- a/libspi/keystrokelistener.c +++ b/libspi/keystrokelistener.c @@ -46,33 +46,33 @@ /* * A pointer to our parent object class */ -static GObjectClass *keystroke_listener_parent_class; +static GObjectClass *keystroke_spi_listener_parent_class; /* * Implemented GObject::finalize */ static void -keystroke_listener_object_finalize (GObject *object) +keystroke_spi_listener_object_finalize (GObject *object) { -/* KeystrokeListener *keystroke_listener = KEYSTROKE_LISTENER (object); */ +/* KeystrokeListener *keystroke_listener = KEYSTROKE_SPI_LISTENER (object); */ #ifdef SPI_DEBUG - fprintf(stderr, "keystroke_listener_object_finalize called\n"); + fprintf(stderr, "keystroke_spi_listener_object_finalize called\n"); #endif - keystroke_listener_parent_class->finalize (object); + keystroke_spi_listener_parent_class->finalize (object); } -void keystroke_listener_add_callback (KeystrokeListener *listener, +void keystroke_spi_listener_add_callback (KeystrokeListener *listener, BooleanKeystrokeListenerCB callback) { listener->callbacks = g_list_append (listener->callbacks, callback); #ifdef SPI_DEBUG - fprintf(stderr, "keystroke_listener_add_callback (%p) called\n", + fprintf(stderr, "keystroke_spi_listener_add_callback (%p) called\n", (gpointer) callback); #endif } -void keystroke_listener_remove_callback (KeystrokeListener *listener, +void keystroke_spi_listener_remove_callback (KeystrokeListener *listener, BooleanKeystrokeListenerCB callback) { listener->callbacks = g_list_remove (listener->callbacks, callback); @@ -86,7 +86,7 @@ impl_key_event (PortableServer_Servant servant, const Accessibility_KeyStroke *key, CORBA_Environment *ev) { - KeystrokeListener *listener = KEYSTROKE_LISTENER (bonobo_object_from_servant (servant)); + KeystrokeListener *listener = KEYSTROKE_SPI_LISTENER (bonobo_object_from_servant (servant)); GList *callbacks = listener->callbacks; gboolean was_consumed = FALSE; #ifdef SPI_KEYEVENT_DEBUG @@ -113,25 +113,25 @@ impl_key_event (PortableServer_Servant servant, } static void -keystroke_listener_class_init (KeystrokeListenerClass *klass) +keystroke_spi_listener_class_init (KeystrokeListenerClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; POA_Accessibility_KeystrokeListener__epv *epv = &klass->epv; - keystroke_listener_parent_class = g_type_class_ref (BONOBO_OBJECT_TYPE); + keystroke_spi_listener_parent_class = g_type_class_ref (BONOBO_OBJECT_TYPE); - object_class->finalize = keystroke_listener_object_finalize; + object_class->finalize = keystroke_spi_listener_object_finalize; epv->keyEvent = impl_key_event; } static void -keystroke_listener_init (KeystrokeListener *keystroke_listener) +keystroke_spi_listener_init (KeystrokeListener *keystroke_listener) { keystroke_listener->callbacks = NULL; } GType -keystroke_listener_get_type (void) +keystroke_spi_listener_get_type (void) { static GType type = 0; @@ -140,12 +140,12 @@ keystroke_listener_get_type (void) sizeof (KeystrokeListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) keystroke_listener_class_init, + (GClassInitFunc) keystroke_spi_listener_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ sizeof (KeystrokeListener), 0, /* n preallocs */ - (GInstanceInitFunc) keystroke_listener_init, + (GInstanceInitFunc) keystroke_spi_listener_init, NULL /* value table */ }; /* @@ -167,9 +167,9 @@ keystroke_listener_get_type (void) } KeystrokeListener * -keystroke_listener_new (void) +keystroke_spi_listener_new (void) { KeystrokeListener *retval = - KEYSTROKE_LISTENER (g_object_new (keystroke_listener_get_type (), NULL)); + KEYSTROKE_SPI_LISTENER (g_object_new (keystroke_spi_listener_get_type (), NULL)); return retval; } diff --git a/libspi/keystrokelistener.h b/libspi/keystrokelistener.h index 7daca15..8208451 100644 --- a/libspi/keystrokelistener.h +++ b/libspi/keystrokelistener.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef KEYSTROKE_LISTENER_H_ -#define KEYSTROKE_LISTENER_H_ +#ifndef KEYSTROKE_SPI_LISTENER_H_ +#define KEYSTROKE_SPI_LISTENER_H_ #ifdef __cplusplus extern "C" { @@ -32,11 +32,11 @@ extern "C" { #include #include "keymasks.h" -#define KEYSTROKE_LISTENER_TYPE (keystroke_listener_get_type ()) -#define KEYSTROKE_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), KEYSTROKE_LISTENER_TYPE, KeystrokeListener)) -#define KEYSTROKE_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), KEYSTROKE_LISTENER_TYPE, KeystrokeListenerClass)) -#define IS_KEYSTROKE_LISTENER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), KEYSTROKE_LISTENER_TYPE)) -#define IS_KEYSTROKE_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), KEYSTROKE_LISTENER_TYPE)) +#define KEYSTROKE_SPI_LISTENER_TYPE (keystroke_spi_listener_get_type ()) +#define KEYSTROKE_SPI_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), KEYSTROKE_SPI_LISTENER_TYPE, KeystrokeListener)) +#define KEYSTROKE_SPI_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), KEYSTROKE_SPI_LISTENER_TYPE, KeystrokeListenerClass)) +#define IS_KEYSTROKE_SPI_LISTENER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), KEYSTROKE_SPI_LISTENER_TYPE)) +#define IS_KEYSTROKE_SPI_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), KEYSTROKE_SPI_LISTENER_TYPE)) typedef gboolean (*BooleanKeystrokeListenerCB) (void *keystroke_ptr); @@ -50,11 +50,11 @@ typedef struct { POA_Accessibility_KeystrokeListener__epv epv; } KeystrokeListenerClass; -GType keystroke_listener_get_type (void); -KeystrokeListener *keystroke_listener_new (void); -void keystroke_listener_add_callback (KeystrokeListener *listener, +GType keystroke_spi_listener_get_type (void); +KeystrokeListener *keystroke_spi_listener_new (void); +void keystroke_spi_listener_add_callback (KeystrokeListener *listener, BooleanKeystrokeListenerCB callback); -void keystroke_listener_remove_callback (KeystrokeListener *listener, +void keystroke_spi_listener_remove_callback (KeystrokeListener *listener, BooleanKeystrokeListenerCB callback); @@ -62,4 +62,4 @@ void keystroke_listener_remove_callback (KeystrokeListener *listener, } #endif /* __cplusplus */ -#endif /* KEYSTROKE_LISTENER_H_ */ +#endif /* KEYSTROKE_SPI_LISTENER_H_ */ diff --git a/libspi/listener.c b/libspi/listener.c index 158bbc4..0d5c4a0 100644 --- a/libspi/listener.c +++ b/libspi/listener.c @@ -46,24 +46,24 @@ /* * A pointer to our parent object class */ -static GObjectClass *listener_parent_class; +static GObjectClass *spi_listener_parent_class; /* * Implemented GObject::finalize */ static void -listener_object_finalize (GObject *object) +spi_listener_object_finalize (GObject *object) { -/* Listener *listener = LISTENER (object); */ +/* SpiListener *listener = SPI_LISTENER (object); */ #ifdef SPI_DEBUG - fprintf(stderr, "listener_object_finalize called\n"); + fprintf(stderr, "spi_listener_object_finalize called\n"); #endif - listener_parent_class->finalize (object); + spi_listener_parent_class->finalize (object); } /* - * CORBA Accessibility::Listener::notifyEvent method implementation + * CORBA Accessibility::SpiListener::notifyEvent method implementation */ static void @@ -74,7 +74,7 @@ impl_notify_event (PortableServer_Servant servant, #ifdef SPI_DEBUG fprintf (stderr, "notify %s...\n", e->type); fprintf (stderr, "source name: '%s'\n", - Accessibility_Accessible__get_name(e->source, ev)); + Accessibility_SpiAccessible__get_name(e->source, ev)); if (ev->_major != CORBA_NO_EXCEPTION) { fprintf(stderr, ("Accessibility app error: exception during event notification: %s\n"), @@ -83,48 +83,48 @@ impl_notify_event (PortableServer_Servant servant, } /* fprintf (stderr, "source is component ? : %s\n", - Accessibility_Accessible_queryInterface (e->source, - "IDL:Accessibility/Component:1.0", + Accessibility_SpiAccessible_queryInterface (e->source, + "IDL:Accessibility/SpiComponent:1.0", ev) ? "yes" : "no"); */ #endif - Accessibility_Accessible_unref (e->source, ev); + Accessibility_SpiAccessible_unref (e->source, ev); } static void -listener_class_init (ListenerClass *klass) +spi_listener_class_init (SpiListenerClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; POA_Accessibility_EventListener__epv *epv = &klass->epv; - listener_parent_class = g_type_class_ref (BONOBO_OBJECT_TYPE); + spi_listener_parent_class = g_type_class_ref (BONOBO_OBJECT_TYPE); - object_class->finalize = listener_object_finalize; + object_class->finalize = spi_listener_object_finalize; epv->notifyEvent = impl_notify_event; } static void -listener_init (Listener *listener) +spi_listener_init (SpiListener *listener) { } GType -listener_get_type (void) +spi_listener_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (ListenerClass), + sizeof (SpiListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) listener_class_init, + (GClassInitFunc) spi_listener_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Listener), + sizeof (SpiListener), 0, /* n preallocs */ - (GInstanceInitFunc) listener_init, + (GInstanceInitFunc) spi_listener_init, NULL /* value table */ }; /* @@ -137,18 +137,18 @@ listener_get_type (void) PARENT_TYPE, POA_Accessibility_EventListener__init, NULL, - G_STRUCT_OFFSET (ListenerClass, epv), + G_STRUCT_OFFSET (SpiListenerClass, epv), &tinfo, - "Listener"); + "SpiListener"); } return type; } -Listener * -listener_new (void) +SpiListener * +spi_listener_new (void) { - Listener *retval = - LISTENER (g_object_new (listener_get_type (), NULL)); + SpiListener *retval = + SPI_LISTENER (g_object_new (spi_listener_get_type (), NULL)); return retval; } diff --git a/libspi/listener.h b/libspi/listener.h index 5560f15..f9302fa 100644 --- a/libspi/listener.h +++ b/libspi/listener.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef LISTENER_H_ -#define LISTENER_H_ +#ifndef SPI_LISTENER_H_ +#define SPI_LISTENER_H_ #ifdef __cplusplus extern "C" { @@ -31,26 +31,26 @@ extern "C" { #include #include -#define LISTENER_TYPE (listener_get_type ()) -#define LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), LISTENER_TYPE, Listener)) -#define LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), LISTENER_TYPE, ListenerClass)) -#define IS_LISTENER(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), LISTENER_TYPE)) -#define IS_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), LISTENER_TYPE)) +#define SPI_LISTENER_TYPE (spi_listener_get_type ()) +#define SPI_LISTENER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_LISTENER_TYPE, SpiListener)) +#define SPI_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_LISTENER_TYPE, SpiListenerClass)) +#define IS_SPI_LISTENER(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_LISTENER_TYPE)) +#define IS_SPI_LISTENER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_LISTENER_TYPE)) typedef struct { BonoboObject parent; -} Listener; +} SpiListener; typedef struct { BonoboObjectClass parent_class; POA_Accessibility_EventListener__epv epv; -} ListenerClass; +} SpiListenerClass; -GType listener_get_type (void); -Listener *listener_new (void); +GType spi_listener_get_type (void); +SpiListener *spi_listener_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* LISTENER_H_ */ +#endif /* SPI_LISTENER_H_ */ diff --git a/libspi/registry.c b/libspi/registry.c index ce196c5..782beaa 100644 --- a/libspi/registry.c +++ b/libspi/registry.c @@ -31,7 +31,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Registry" server + * This pulls the CORBA definitions for the "Accessibility::SpiRegistry" server */ #include @@ -51,12 +51,12 @@ /* * Our parent GObject type */ -#define PARENT_TYPE LISTENER_TYPE +#define PARENT_TYPE SPI_LISTENER_TYPE /* * A pointer to our parent object class */ -static ListenerClass *registry_parent_class; +static SpiListenerClass *spi_registry_parent_class; typedef enum { ETYPE_FOCUS, @@ -80,45 +80,45 @@ typedef struct { Accessibility_EventListener listener; guint event_type_hash; EventTypeCategory event_type_cat; -} ListenerStruct; +} SpiListenerStruct; /* static function prototypes */ -static void _registry_notify_listeners ( GList *listeners, +static void _spi_registry_notify_listeners ( GList *listeners, const Accessibility_Event *e, CORBA_Environment *ev); static long _get_unique_id(); -static gboolean _device_event_controller_hook (gpointer source); +static gboolean _spi_device_event_controller_hook (gpointer source); /* * Implemented GObject::finalize */ static void -registry_object_finalize (GObject *object) +spi_registry_object_finalize (GObject *object) { -/* Registry *registry = REGISTRY (object); */ +/* SpiRegistry *registry = SPI_REGISTRY (object); */ GObjectClass *object_class = G_OBJECT_GET_CLASS( object); - printf("registry_object_finalize called\n"); + printf("spi_registry_object_finalize called\n"); object_class->finalize (object); } /** - * registerApplication: - * @application: a reference to the requesting @Application + * registerSpiApplication: + * @application: a reference to the requesting @SpiApplication * return values: void * * Register a new application with the accessibility broker. * **/ static void -impl_accessibility_registry_register_application (PortableServer_Servant servant, - const Accessibility_Application application, +impl_accessibility_spi_registry_register_application (PortableServer_Servant servant, + const Accessibility_SpiApplication application, CORBA_Environment * ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); #ifdef SPI_DEBUG fprintf (stderr, "registering app %p\n", application); @@ -127,11 +127,11 @@ impl_accessibility_registry_register_application (PortableServer_Servant servant bonobo_object_dup_ref (application, ev)); /* TODO: create unique string here (with libuuid call ?) and hash ? */ - Accessibility_Application__set_id (application, _get_unique_id(), ev); + Accessibility_SpiApplication__set_id (application, _get_unique_id(), ev); /* * TODO: change the implementation below to a WM-aware one; - * e.g. don't add all apps to the Desktop + * e.g. don't add all apps to the SpiDesktop */ } @@ -151,30 +151,30 @@ compare_corba_objects (gconstpointer p1, gconstpointer p2) } static void -register_with_toolkits (Registry *registry_bonobo_object, EventTypeStruct *etype, CORBA_Environment *ev) +register_with_toolkits (SpiRegistry *spi_registry_bonobo_object, EventTypeStruct *etype, CORBA_Environment *ev) { gint n_desktops; gint n_apps; gint i, j; - Accessibility_Desktop desktop; - Accessibility_Application app; - Accessibility_Registry registry; - registry = BONOBO_OBJREF (registry_bonobo_object); + Accessibility_SpiDesktop desktop; + Accessibility_SpiApplication app; + Accessibility_SpiRegistry registry; + registry = BONOBO_OBJREF (spi_registry_bonobo_object); - /* for each app in each desktop, call ...Application_registerToolkitEventListener */ + /* for each app in each desktop, call ...SpiApplication_registerToolkitEventListener */ - n_desktops = Accessibility_Registry_getDesktopCount (registry, ev); + n_desktops = Accessibility_SpiRegistry_getDesktopCount (registry, ev); for (i=0; ievent_name), @@ -184,16 +184,16 @@ register_with_toolkits (Registry *registry_bonobo_object, EventTypeStruct *etype } static gint -compare_listener_hash (gconstpointer p1, gconstpointer p2) +compare_spi_listener_hash (gconstpointer p1, gconstpointer p2) { - return (((ListenerStruct *)p2)->event_type_hash - ((ListenerStruct *)p1)->event_type_hash); + return (((SpiListenerStruct *)p2)->event_type_hash - ((SpiListenerStruct *)p1)->event_type_hash); } static gint -compare_listener_corbaref (gconstpointer p1, gconstpointer p2) +compare_spi_listener_corbaref (gconstpointer p1, gconstpointer p2) { - return compare_corba_objects (((ListenerStruct *)p2)->listener, - ((ListenerStruct *)p1)->listener); + return compare_corba_objects (((SpiListenerStruct *)p2)->listener, + ((SpiListenerStruct *)p1)->listener); } static void @@ -257,8 +257,8 @@ parse_event_type (EventTypeStruct *etype, char *event_name) } /** - * deregisterApplication: - * @application: a reference to the @Application + * deregisterSpiApplication: + * @application: a reference to the @SpiApplication * to be deregistered. * return values: void * @@ -266,11 +266,11 @@ parse_event_type (EventTypeStruct *etype, char *event_name) * **/ static void -impl_accessibility_registry_deregister_application (PortableServer_Servant servant, - const Accessibility_Application application, +impl_accessibility_spi_registry_deregister_application (PortableServer_Servant servant, + const Accessibility_SpiApplication application, CORBA_Environment * ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); GList *list = g_list_find_custom (registry->desktop->applications, &application, compare_corba_objects); #ifdef SPI_DEBUG @@ -297,17 +297,17 @@ impl_accessibility_registry_deregister_application (PortableServer_Servant serva } /* - * CORBA Accessibility::Registry::registerGlobalEventListener method implementation + * CORBA Accessibility::SpiRegistry::registerGlobalEventListener method implementation */ static void -impl_accessibility_registry_register_global_event_listener ( +impl_accessibility_spi_registry_register_global_event_listener ( PortableServer_Servant servant, Accessibility_EventListener listener, const CORBA_char *event_name, CORBA_Environment *ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); - ListenerStruct *ls = g_malloc (sizeof (ListenerStruct)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); + SpiListenerStruct *ls = g_malloc (sizeof (SpiListenerStruct)); EventTypeStruct etype; gboolean is_toolkit_specific = TRUE; @@ -342,20 +342,20 @@ impl_accessibility_registry_register_global_event_listener ( } /* - * CORBA Accessibility::Registry::deregisterGlobalEventListenerAll method implementation + * CORBA Accessibility::SpiRegistry::deregisterGlobalEventListenerAll method implementation */ static void -impl_accessibility_registry_deregister_global_event_listener_all ( +impl_accessibility_spi_registry_deregister_global_event_spi_listener_all ( PortableServer_Servant servant, Accessibility_EventListener listener, CORBA_Environment *ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); - ListenerStruct *ls = g_malloc (sizeof (ListenerStruct)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); + SpiListenerStruct *ls = g_malloc (sizeof (SpiListenerStruct)); GList *list; ls->listener = listener; list = g_list_find_custom (registry->object_listeners, ls, - compare_listener_corbaref); + compare_spi_listener_corbaref); /* * TODO : de-register with toolkit if the last instance of a listener @@ -366,29 +366,29 @@ impl_accessibility_registry_deregister_global_event_listener_all ( { fprintf (stderr, "deregistering listener\n"); registry->object_listeners = g_list_delete_link (registry->object_listeners, list); - list = g_list_find_custom (registry->object_listeners, ls, compare_listener_corbaref); + list = g_list_find_custom (registry->object_listeners, ls, compare_spi_listener_corbaref); } - list = g_list_find_custom (registry->toolkit_listeners, ls, compare_listener_corbaref); + list = g_list_find_custom (registry->toolkit_listeners, ls, compare_spi_listener_corbaref); while (list) { fprintf (stderr, "deregistering listener\n"); registry->toolkit_listeners = g_list_delete_link (registry->toolkit_listeners, list); - list = g_list_find_custom (registry->toolkit_listeners, ls, compare_listener_corbaref); + list = g_list_find_custom (registry->toolkit_listeners, ls, compare_spi_listener_corbaref); } } /* - * CORBA Accessibility::Registry::deregisterGlobalEventListener method implementation + * CORBA Accessibility::SpiRegistry::deregisterGlobalEventListener method implementation */ static void -impl_accessibility_registry_deregister_global_event_listener ( +impl_accessibility_spi_registry_deregister_global_event_listener ( PortableServer_Servant servant, Accessibility_EventListener listener, const CORBA_char * event_name, CORBA_Environment *ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); - ListenerStruct ls; + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); + SpiListenerStruct ls; EventTypeStruct etype; GList *list; GList **listeners; @@ -412,13 +412,13 @@ impl_accessibility_registry_deregister_global_event_listener ( } ls.event_type_hash = etype.hash; - list = g_list_find_custom (*listeners, &ls, compare_listener_hash); + list = g_list_find_custom (*listeners, &ls, compare_spi_listener_hash); while (list) { fprintf (stderr, "deregistering listener\n"); *listeners = g_list_delete_link (*listeners, list); - list = g_list_find_custom (*listeners, &ls, compare_listener_hash); + list = g_list_find_custom (*listeners, &ls, compare_spi_listener_hash); } } @@ -426,13 +426,13 @@ impl_accessibility_registry_deregister_global_event_listener ( /** * getDesktopCount: * return values: a short integer indicating the current number of - * @Desktops. + * @SpiDesktops. * * Get the current number of desktops. * **/ static short -impl_accessibility_registry_get_desktop_count (PortableServer_Servant servant, +impl_accessibility_spi_registry_get_spi_desktop_count (PortableServer_Servant servant, CORBA_Environment * ev) { /* TODO: implement support for multiple virtual desktops */ @@ -443,63 +443,63 @@ impl_accessibility_registry_get_desktop_count (PortableServer_Servant servant, /** * getDesktop: - * @n: the index of the requested @Desktop. - * return values: a reference to the requested @Desktop. + * @n: the index of the requested @SpiDesktop. + * return values: a reference to the requested @SpiDesktop. * * Get the nth accessible desktop. * **/ -static Accessibility_Desktop -impl_accessibility_registry_get_desktop (PortableServer_Servant servant, +static Accessibility_SpiDesktop +impl_accessibility_spi_registry_get_desktop (PortableServer_Servant servant, const CORBA_short n, CORBA_Environment * ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); /* TODO: implement support for multiple virtual desktops */ if (n == 0) { - return (Accessibility_Desktop) + return (Accessibility_SpiDesktop) CORBA_Object_duplicate (BONOBO_OBJREF (registry->desktop), ev); } else { - return (Accessibility_Desktop) CORBA_OBJECT_NIL; + return (Accessibility_SpiDesktop) CORBA_OBJECT_NIL; } } /** * getDesktopList: * return values: a sequence containing references to - * the @Desktops. + * the @SpiDesktops. * * Get a list of accessible desktops. * **/ -static Accessibility_DesktopSeq * -impl_accessibility_registry_get_desktop_list (PortableServer_Servant servant, +static Accessibility_SpiDesktopSeq * +impl_accessibility_spi_registry_get_spi_desktop_list (PortableServer_Servant servant, CORBA_Environment * ev) { /* TODO: implement support for multiple virtual desktops */ - return (Accessibility_DesktopSeq *) NULL; + return (Accessibility_SpiDesktopSeq *) NULL; } -static Accessibility_DeviceEventController -impl_accessibility_registry_get_device_event_controller (PortableServer_Servant servant, +static Accessibility_SpiDeviceEventController +impl_accessibility_spi_registry_get_device_event_controller (PortableServer_Servant servant, CORBA_Environment * ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); if (!registry->device_event_controller) - registry->device_event_controller = g_object_new (DEVICE_EVENT_CONTROLLER_TYPE, NULL); + registry->device_event_controller = g_object_new (SPI_DEVICE_EVENT_CONTROLLER_TYPE, NULL); return CORBA_Object_duplicate (BONOBO_OBJREF (registry->device_event_controller), ev); } static void -impl_registry_notify_event (PortableServer_Servant servant, +impl_spi_registry_notify_event (PortableServer_Servant servant, const Accessibility_Event *e, CORBA_Environment *ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); EventTypeStruct etype; parse_event_type (&etype, e->type); @@ -509,18 +509,18 @@ impl_registry_notify_event (PortableServer_Servant servant, case (ETYPE_OBJECT) : case (ETYPE_PROPERTY) : case (ETYPE_FOCUS) : - _registry_notify_listeners (registry->object_listeners, e, ev); + _spi_registry_notify_listeners (registry->object_listeners, e, ev); break; case (ETYPE_WINDOW) : - _registry_notify_listeners (registry->window_listeners, e, ev); + _spi_registry_notify_listeners (registry->window_listeners, e, ev); break; case (ETYPE_TOOLKIT) : - _registry_notify_listeners (registry->toolkit_listeners, e, ev); + _spi_registry_notify_listeners (registry->toolkit_listeners, e, ev); break; default: break; } - /* Accessibility_Accessible_unref (e->source, ev);*/ /* This should be here! */ + /* Accessibility_SpiAccessible_unref (e->source, ev);*/ /* This should be here! */ } static long @@ -531,13 +531,13 @@ _get_unique_id () } static void -_registry_notify_listeners ( GList *listeners, +_spi_registry_notify_listeners ( GList *listeners, const Accessibility_Event *e, CORBA_Environment *ev) { int n; int len; - ListenerStruct *ls; + SpiListenerStruct *ls; EventTypeStruct etype; guint minor_hash; parse_event_type (&etype, e->type); @@ -546,8 +546,8 @@ _registry_notify_listeners ( GList *listeners, for (n=0; nevent_type_hash, etype.hash, minor_hash); fprintf(stderr, "event name: %s\n", etype.event_name); #endif @@ -555,10 +555,10 @@ _registry_notify_listeners ( GList *listeners, { #ifdef SPI_DEBUG fprintf(stderr, "notifying listener #%d\n", n); - fprintf(stderr, "event source name %s\n", Accessibility_Accessible__get_name(e->source, ev)); + fprintf(stderr, "event source name %s\n", Accessibility_SpiAccessible__get_name(e->source, ev)); #endif e->source = CORBA_Object_duplicate (e->source, ev); - Accessibility_Accessible_ref ( e->source, ev); + Accessibility_SpiAccessible_ref ( e->source, ev); Accessibility_EventListener_notifyEvent ((Accessibility_EventListener) ls->listener, e, ev); @@ -572,66 +572,66 @@ _registry_notify_listeners ( GList *listeners, } } -static gboolean _device_event_controller_hook (gpointer p) +static gboolean _spi_device_event_controller_hook (gpointer p) { - Registry *registry = (Registry *)p; - DeviceEventController *controller = registry->device_event_controller; + SpiRegistry *registry = (SpiRegistry *)p; + SpiDeviceEventController *controller = registry->device_event_controller; if (controller) - device_event_controller_check_key_event (controller); + spi_device_event_controller_check_key_event (controller); return TRUE; } static void -registry_class_init (RegistryClass *klass) +spi_registry_class_init (SpiRegistryClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Registry__epv *epv = &klass->epv; + POA_Accessibility_SpiRegistry__epv *epv = &klass->epv; - registry_parent_class = g_type_class_ref (LISTENER_TYPE); + spi_registry_parent_class = g_type_class_ref (SPI_LISTENER_TYPE); - object_class->finalize = registry_object_finalize; + object_class->finalize = spi_registry_object_finalize; - epv->registerApplication = impl_accessibility_registry_register_application; - epv->deregisterApplication = impl_accessibility_registry_deregister_application; - epv->registerGlobalEventListener = impl_accessibility_registry_register_global_event_listener; - epv->deregisterGlobalEventListener = impl_accessibility_registry_deregister_global_event_listener; - epv->deregisterGlobalEventListenerAll = impl_accessibility_registry_deregister_global_event_listener_all; - epv->getDeviceEventController = impl_accessibility_registry_get_device_event_controller; - epv->getDesktopCount = impl_accessibility_registry_get_desktop_count; - epv->getDesktop = impl_accessibility_registry_get_desktop; - epv->getDesktopList = impl_accessibility_registry_get_desktop_list; + epv->registerSpiApplication = impl_accessibility_spi_registry_register_application; + epv->deregisterSpiApplication = impl_accessibility_spi_registry_deregister_application; + epv->registerGlobalEventListener = impl_accessibility_spi_registry_register_global_event_listener; + epv->deregisterGlobalEventListener = impl_accessibility_spi_registry_deregister_global_event_listener; + epv->deregisterGlobalEventListenerAll = impl_accessibility_spi_registry_deregister_global_event_spi_listener_all; + epv->getDeviceEventController = impl_accessibility_spi_registry_get_device_event_controller; + epv->getDesktopCount = impl_accessibility_spi_registry_get_spi_desktop_count; + epv->getDesktop = impl_accessibility_spi_registry_get_desktop; + epv->getDesktopList = impl_accessibility_spi_registry_get_spi_desktop_list; - ((ListenerClass *) klass)->epv.notifyEvent = impl_registry_notify_event; + ((SpiListenerClass *) klass)->epv.notifyEvent = impl_spi_registry_notify_event; } static void -registry_init (Registry *registry) +spi_registry_init (SpiRegistry *registry) { registry->object_listeners = NULL; registry->window_listeners = NULL; registry->toolkit_listeners = NULL; registry->applications = NULL; - registry->desktop = desktop_new(); + registry->desktop = spi_desktop_new(); registry->device_event_controller = NULL; - registry->kbd_event_hook = _device_event_controller_hook; + registry->kbd_event_hook = _spi_device_event_controller_hook; } GType -registry_get_type (void) +spi_registry_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (RegistryClass), + sizeof (SpiRegistryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) registry_class_init, + (GClassInitFunc) spi_registry_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Registry), + sizeof (SpiRegistry), 0, /* n preallocs */ - (GInstanceInitFunc) registry_init, + (GInstanceInitFunc) spi_registry_init, NULL /* value table */ }; /* @@ -642,20 +642,20 @@ registry_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_Registry__init, + POA_Accessibility_SpiRegistry__init, NULL, - G_STRUCT_OFFSET (RegistryClass, epv), + G_STRUCT_OFFSET (SpiRegistryClass, epv), &tinfo, - "Registry"); + "SpiRegistry"); } return type; } -Registry * -registry_new (void) +SpiRegistry * +spi_registry_new (void) { - Registry *retval = - REGISTRY (g_object_new (registry_get_type (), NULL)); + SpiRegistry *retval = + SPI_REGISTRY (g_object_new (spi_registry_get_type (), NULL)); return retval; } diff --git a/libspi/registry.h b/libspi/registry.h index ca5a2fe..334b71c 100644 --- a/libspi/registry.h +++ b/libspi/registry.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef REGISTRY_H_ -#define REGISTRY_H_ +#ifndef SPI_REGISTRY_H_ +#define SPI_REGISTRY_H_ #ifdef __cplusplus extern "C" { @@ -33,33 +33,33 @@ extern "C" { #include "desktop.h" #include "deviceeventcontroller.h" -#define REGISTRY_TYPE (registry_get_type ()) -#define REGISTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), REGISTRY_TYPE, Registry)) -#define REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), REGISTRY_TYPE, RegistryClass)) -#define IS_REGISTRY(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), REGISTRY_TYPE)) -#define IS_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), REGISTRY_TYPE)) +#define SPI_REGISTRY_TYPE (spi_registry_get_type ()) +#define SPI_REGISTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_REGISTRY_TYPE, SpiRegistry)) +#define SPI_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_REGISTRY_TYPE, SpiRegistryClass)) +#define IS_SPI_REGISTRY(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_REGISTRY_TYPE)) +#define IS_SPI_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_REGISTRY_TYPE)) typedef struct { - Listener parent; + SpiListener parent; GList *object_listeners; GList *window_listeners; GList *toolkit_listeners; GList *applications; - DeviceEventController *device_event_controller; - Desktop *desktop; + SpiDeviceEventController *device_event_controller; + SpiDesktop *desktop; gboolean (*kbd_event_hook) (gpointer source); -} Registry; +} SpiRegistry; typedef struct { - ListenerClass parent_class; - POA_Accessibility_Registry__epv epv; -} RegistryClass; + SpiListenerClass parent_class; + POA_Accessibility_SpiRegistry__epv epv; +} SpiRegistryClass; -GType registry_get_type (void); -Registry *registry_new (void); +GType spi_registry_get_type (void); +SpiRegistry *spi_registry_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* REGISTRY_H_ */ +#endif /* SPI_REGISTRY_H_ */ diff --git a/libspi/selection.c b/libspi/selection.c index bf33ecf..9298078 100644 --- a/libspi/selection.c +++ b/libspi/selection.c @@ -30,7 +30,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include #include "accessible.h" @@ -45,15 +45,15 @@ */ static void -selection_class_init (SelectionClass *klass); +spi_selection_class_init (SpiSelectionClass *klass); static void -selection_init (Selection *selection); +spi_selection_init (SpiSelection *selection); static void -selection_finalize (GObject *obj); +spi_selection_finalize (GObject *obj); static CORBA_long impl__get_nSelectedChildren (PortableServer_Servant _servant, CORBA_Environment * ev); -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_getSelectedChild (PortableServer_Servant _servant, const CORBA_long selectedChildIndex, CORBA_Environment * ev); @@ -73,28 +73,28 @@ static void impl_selectAll (PortableServer_Servant _servant, CORBA_Environment * ev); static void -impl_clearSelection (PortableServer_Servant _servant, +impl_clearSpiSelection (PortableServer_Servant _servant, CORBA_Environment * ev); static GObjectClass *parent_class; GType -selection_get_type (void) +spi_selection_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (SelectionClass), + sizeof (SpiSelectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) selection_class_init, + (GClassInitFunc) spi_selection_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Selection), + sizeof (SpiSelection), 0, /* n preallocs */ - (GInstanceInitFunc) selection_init, + (GInstanceInitFunc) spi_selection_init, NULL /* value table */ }; @@ -105,24 +105,24 @@ selection_get_type (void) */ type = bonobo_type_unique ( BONOBO_OBJECT_TYPE, - POA_Accessibility_Selection__init, + POA_Accessibility_SpiSelection__init, NULL, - G_STRUCT_OFFSET (SelectionClass, epv), + G_STRUCT_OFFSET (SpiSelectionClass, epv), &tinfo, - "AccessibleSelection"); + "SpiAccessibleSelection"); } return type; } static void -selection_class_init (SelectionClass *klass) +spi_selection_class_init (SpiSelectionClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Selection__epv *epv = &klass->epv; + POA_Accessibility_SpiSelection__epv *epv = &klass->epv; parent_class = g_type_class_peek_parent (klass); - object_class->finalize = selection_finalize; + object_class->finalize = spi_selection_finalize; /* Initialize epv table */ @@ -133,28 +133,28 @@ selection_class_init (SelectionClass *klass) epv->deselectSelectedChild = impl_deselectSelectedChild; epv->isChildSelected = impl_isChildSelected; epv->selectAll = impl_selectAll; - epv->clearSelection = impl_clearSelection; + epv->clearSpiSelection = impl_clearSpiSelection; } static void -selection_init (Selection *selection) +spi_selection_init (SpiSelection *selection) { } static void -selection_finalize (GObject *obj) +spi_selection_finalize (GObject *obj) { - Selection *selection = SELECTION (obj); + SpiSelection *selection = SPI_SELECTION (obj); g_object_unref (selection->atko); selection->atko = NULL; parent_class->finalize (obj); } -Selection * -selection_interface_new (AtkObject *obj) +SpiSelection * +spi_selection_interface_new (AtkObject *obj) { - Selection *new_selection = - SELECTION(g_object_new (SELECTION_TYPE, NULL)); + SpiSelection *new_selection = + SPI_SELECTION(g_object_new (SPI_SELECTION_TYPE, NULL)); new_selection->atko = obj; g_object_ref (obj); return new_selection; @@ -167,33 +167,33 @@ impl__get_nSelectedChildren (PortableServer_Servant _servant, CORBA_Environment * ev) { BonoboObject *obj = bonobo_object_from_servant (_servant); - Selection *selection; + SpiSelection *selection; #ifdef SPI_DEBUG fprintf (stderr, "calling impl__get_nSelectedChildren\n"); #endif - g_return_val_if_fail (IS_SELECTION (obj), 0); - selection = SELECTION (obj); + g_return_val_if_fail (IS_SPI_SELECTION (obj), 0); + selection = SPI_SELECTION (obj); g_return_val_if_fail (ATK_IS_SELECTION (selection->atko), 0); return (CORBA_long) atk_selection_get_selection_count (ATK_SELECTION(selection->atko)); } -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_getSelectedChild (PortableServer_Servant _servant, const CORBA_long selectedChildIndex, CORBA_Environment * ev) { BonoboObject *obj = bonobo_object_from_servant (_servant); - Selection + SpiSelection *selection; AtkObject *atk_object; - Accessibility_Accessible rv; + Accessibility_SpiAccessible rv; #ifdef SPI_DEBUG fprintf (stderr, "calling impl_getSelectedChild\n"); #endif - g_return_val_if_fail (IS_SELECTION (obj), 0); - selection = SELECTION (obj); + g_return_val_if_fail (IS_SPI_SELECTION (obj), 0); + selection = SPI_SELECTION (obj); g_return_val_if_fail (ATK_IS_SELECTION (selection->atko), 0); atk_object = atk_selection_ref_selection (ATK_SELECTION (selection->atko), @@ -202,7 +202,7 @@ impl_getSelectedChild (PortableServer_Servant _servant, #ifdef SPI_DEBUG fprintf (stderr, "child type is %s\n", g_type_name (G_OBJECT_TYPE (atk_object))); #endif - rv = bonobo_object_corba_objref (bonobo_object (accessible_new (atk_object))); + rv = bonobo_object_corba_objref (bonobo_object (spi_accessible_new (atk_object))); g_object_unref (atk_object); return CORBA_Object_duplicate (rv, ev); } @@ -214,7 +214,7 @@ impl_selectChild (PortableServer_Servant _servant, const CORBA_long childIndex, CORBA_Environment * ev) { - Selection *selection = SELECTION (bonobo_object_from_servant (_servant)); + SpiSelection *selection = SPI_SELECTION (bonobo_object_from_servant (_servant)); return (CORBA_boolean) atk_selection_add_selection (ATK_SELECTION(selection->atko), (gint) childIndex); } @@ -227,7 +227,7 @@ impl_deselectSelectedChild (PortableServer_Servant _servant, const CORBA_long selectedChildIndex, CORBA_Environment * ev) { - Selection *selection = SELECTION (bonobo_object_from_servant (_servant)); + SpiSelection *selection = SPI_SELECTION (bonobo_object_from_servant (_servant)); return (CORBA_boolean) atk_selection_remove_selection (ATK_SELECTION(selection->atko), (gint) selectedChildIndex); } @@ -239,7 +239,7 @@ impl_isChildSelected (PortableServer_Servant _servant, const CORBA_long childIndex, CORBA_Environment * ev) { - Selection *selection = SELECTION (bonobo_object_from_servant (_servant)); + SpiSelection *selection = SPI_SELECTION (bonobo_object_from_servant (_servant)); return (CORBA_boolean) atk_selection_is_child_selected (ATK_SELECTION(selection->atko), (gint) childIndex); } @@ -250,17 +250,17 @@ static void impl_selectAll (PortableServer_Servant _servant, CORBA_Environment * ev) { - Selection *selection = SELECTION (bonobo_object_from_servant (_servant)); + SpiSelection *selection = SPI_SELECTION (bonobo_object_from_servant (_servant)); atk_selection_select_all_selection (ATK_SELECTION(selection->atko)); } static void -impl_clearSelection (PortableServer_Servant _servant, +impl_clearSpiSelection (PortableServer_Servant _servant, CORBA_Environment * ev) { - Selection *selection = SELECTION (bonobo_object_from_servant (_servant)); + SpiSelection *selection = SPI_SELECTION (bonobo_object_from_servant (_servant)); atk_selection_clear_selection (ATK_SELECTION(selection->atko)); } diff --git a/libspi/selection.h b/libspi/selection.h index 97cb807..877f220 100644 --- a/libspi/selection.h +++ b/libspi/selection.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef SELECTION_H_ -#define SELECTION_H_ +#ifndef SPI_SELECTION_H_ +#define SPI_SELECTION_H_ #ifdef __cplusplus @@ -29,33 +29,33 @@ extern "C" { #include #include -#define SELECTION_TYPE (selection_get_type ()) -#define SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SELECTION_TYPE, Selection)) -#define SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SELECTION_TYPE, SelectionClass)) -#define IS_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SELECTION_TYPE)) -#define IS_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SELECTION_TYPE)) +#define SPI_SELECTION_TYPE (spi_selection_get_type ()) +#define SPI_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_SELECTION_TYPE, SpiSelection)) +#define SPI_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_SELECTION_TYPE, SpiSelectionClass)) +#define IS_SPI_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPI_SELECTION_TYPE)) +#define IS_SPI_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_SELECTION_TYPE)) -typedef struct _Selection Selection; -typedef struct _SelectionClass SelectionClass; +typedef struct _SpiSelection SpiSelection; +typedef struct _SpiSelectionClass SpiSelectionClass; -struct _Selection { +struct _SpiSelection { BonoboObject parent; AtkObject *atko; }; -struct _SelectionClass { +struct _SpiSelectionClass { BonoboObjectClass parent_class; - POA_Accessibility_Selection__epv epv; + POA_Accessibility_SpiSelection__epv epv; }; GType -selection_get_type (void); +spi_selection_get_type (void); -Selection * -selection_interface_new (AtkObject *obj); +SpiSelection * +spi_selection_interface_new (AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* SELECTION_H_ */ +#endif /* SPI_SELECTION_H_ */ diff --git a/libspi/table.c b/libspi/table.c index 17172a9..46c1dec 100644 --- a/libspi/table.c +++ b/libspi/table.c @@ -30,12 +30,12 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include /* - * This pulls the definition of the Table bonobo object + * This pulls the definition of the SpiTable bonobo object */ #include "table.h" @@ -44,15 +44,15 @@ */ static void -table_class_init (TableClass *klass); +spi_table_class_init (SpiTableClass *klass); static void -table_init (Table *table); +spi_table_init (SpiTable *table); static void -table_finalize (GObject *obj); -static Accessibility_Accessible +spi_table_finalize (GObject *obj); +static Accessibility_SpiAccessible impl__get_caption (PortableServer_Servant _servant, CORBA_Environment * ev); -static Accessibility_Accessible +static Accessibility_SpiAccessible impl__get_summary (PortableServer_Servant _servant, CORBA_Environment * ev); static CORBA_long @@ -64,7 +64,7 @@ impl__get_nRows (PortableServer_Servant _servant, static CORBA_long impl__get_nColumns (PortableServer_Servant _servant, CORBA_Environment * ev); -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_getAccessibleAt (PortableServer_Servant _servant, const CORBA_long row, const CORBA_long column, @@ -99,11 +99,11 @@ impl_getColumnExtentAt (PortableServer_Servant _servant, const CORBA_long row, const CORBA_long column, CORBA_Environment * ev); -static Accessibility_Table +static Accessibility_SpiTable impl_getRowHeader (PortableServer_Servant _servant, const CORBA_long row, CORBA_Environment * ev); -static Accessibility_Table +static Accessibility_SpiTable impl_getColumnHeader (PortableServer_Servant _servant, const CORBA_long column, CORBA_Environment * ev); @@ -131,21 +131,21 @@ impl_isSelected (PortableServer_Servant _servant, static GObjectClass *parent_class; GType -table_get_type (void) +spi_table_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (TableClass), + sizeof (SpiTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) table_class_init, + (GClassInitFunc) spi_table_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Table), + sizeof (SpiTable), 0, /* n preallocs */ - (GInstanceInitFunc) table_init, + (GInstanceInitFunc) spi_table_init, NULL /* value table */ }; @@ -156,24 +156,24 @@ table_get_type (void) */ type = bonobo_type_unique ( BONOBO_OBJECT_TYPE, - POA_Accessibility_Table__init, + POA_Accessibility_SpiTable__init, NULL, - G_STRUCT_OFFSET (TableClass, epv), + G_STRUCT_OFFSET (SpiTableClass, epv), &tinfo, - "AccessibleTable"); + "SpiAccessibleTable"); } return type; } static void -table_class_init (TableClass *klass) +spi_table_class_init (SpiTableClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Table__epv *epv = &klass->epv; + POA_Accessibility_SpiTable__epv *epv = &klass->epv; parent_class = g_type_class_peek_parent (klass); - object_class->finalize = table_finalize; + object_class->finalize = spi_table_finalize; /* Initialize epv table */ @@ -200,24 +200,24 @@ table_class_init (TableClass *klass) } static void -table_init (Table *table) +spi_table_init (SpiTable *table) { } static void -table_finalize (GObject *obj) +spi_table_finalize (GObject *obj) { - Table *table = TABLE (obj); + SpiTable *table = SPI_TABLE (obj); g_object_unref (table->atko); table->atko = NULL; parent_class->finalize (obj); } -Table * -table_interface_new (AtkObject *obj) +SpiTable * +spi_table_interface_new (AtkObject *obj) { - Table *new_table = - TABLE(g_object_new (TABLE_TYPE, NULL)); + SpiTable *new_table = + SPI_TABLE(g_object_new (SPI_TABLE_TYPE, NULL)); new_table->atko = obj; g_object_ref (obj); return new_table; @@ -225,31 +225,31 @@ table_interface_new (AtkObject *obj) -static Accessibility_Accessible +static Accessibility_SpiAccessible impl__get_caption (PortableServer_Servant _servant, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); AtkObject *atk_object; - Accessibility_Accessible rv; + Accessibility_SpiAccessible rv; atk_object = atk_table_get_caption (ATK_TABLE(table-> atko)); - rv = bonobo_object_corba_objref (BONOBO_OBJECT(accessible_new(atk_object))); + rv = bonobo_object_corba_objref (BONOBO_OBJECT(spi_accessible_new(atk_object))); return CORBA_Object_duplicate (rv, ev); } -static Accessibility_Accessible +static Accessibility_SpiAccessible impl__get_summary (PortableServer_Servant _servant, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); AtkObject *atk_object; - Accessibility_Accessible rv; + Accessibility_SpiAccessible rv; atk_object = atk_table_get_summary (ATK_TABLE(table->atko)); - rv = bonobo_object_corba_objref (BONOBO_OBJECT(accessible_new(atk_object))); + rv = bonobo_object_corba_objref (BONOBO_OBJECT(spi_accessible_new(atk_object))); return CORBA_Object_duplicate (rv, ev); } @@ -259,7 +259,7 @@ static CORBA_long impl__get_nRows (PortableServer_Servant _servant, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_long) atk_table_get_n_rows (ATK_TABLE(table->atko) ); } @@ -270,26 +270,26 @@ static CORBA_long impl__get_nColumns (PortableServer_Servant _servant, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_long) atk_table_get_n_columns (ATK_TABLE(table->atko)); } -static Accessibility_Accessible +static Accessibility_SpiAccessible impl_getAccessibleAt (PortableServer_Servant _servant, const CORBA_long row, const CORBA_long column, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); AtkObject *atk_object; - Accessibility_Accessible rv; + Accessibility_SpiAccessible rv; atk_object = atk_table_ref_at (ATK_TABLE(table->atko), (gint) row, (gint) column); - rv = bonobo_object_corba_objref (BONOBO_OBJECT(accessible_new(atk_object))); + rv = bonobo_object_corba_objref (BONOBO_OBJECT(spi_accessible_new(atk_object))); return CORBA_Object_duplicate (rv, ev); } @@ -300,7 +300,7 @@ impl_getIndexAt (PortableServer_Servant _servant, const CORBA_long row, const CORBA_long column, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_long) atk_table_get_index_at (ATK_TABLE(table->atko), (gint) row, (gint) column); @@ -313,7 +313,7 @@ impl_getRowAtIndex (PortableServer_Servant _servant, const CORBA_long index, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_long) atk_table_get_row_at_index (ATK_TABLE(table->atko), (gint) index); } @@ -325,7 +325,7 @@ impl_getColumnAtIndex (PortableServer_Servant _servant, const CORBA_long index, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_long) atk_table_get_column_at_index (ATK_TABLE(table->atko), (gint) index); } @@ -337,7 +337,7 @@ impl_getRowDescription (PortableServer_Servant _servant, const CORBA_long row, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); CORBA_char *rv; rv = atk_table_get_row_description (ATK_TABLE(table->atko), (gint) row); @@ -354,7 +354,7 @@ impl_getColumnDescription (PortableServer_Servant _servant, const CORBA_long column, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); CORBA_char *rv; rv = atk_table_get_column_description (ATK_TABLE(table->atko), (gint) column); @@ -372,7 +372,7 @@ impl_getRowExtentAt (PortableServer_Servant _servant, const CORBA_long column, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_long) atk_table_get_row_extent_at (ATK_TABLE(table->atko), (gint) row, (gint) column); @@ -386,7 +386,7 @@ impl_getColumnExtentAt (PortableServer_Servant _servant, const CORBA_long column, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_long) atk_table_get_column_extent_at (ATK_TABLE(table->atko), (gint) row, (gint) column); @@ -394,33 +394,33 @@ impl_getColumnExtentAt (PortableServer_Servant _servant, -static Accessibility_Table +static Accessibility_SpiTable impl_getRowHeader (PortableServer_Servant _servant, const CORBA_long row, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); AtkObject *header; - Accessibility_Table rv; + Accessibility_SpiTable rv; header = atk_table_get_row_header (ATK_TABLE(table->atko), (gint) row); - rv = bonobo_object_corba_objref (BONOBO_OBJECT(accessible_new(header))); + rv = bonobo_object_corba_objref (BONOBO_OBJECT(spi_accessible_new(header))); return CORBA_Object_duplicate (rv, ev); } -static Accessibility_Table +static Accessibility_SpiTable impl_getColumnHeader (PortableServer_Servant _servant, const CORBA_long column, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); AtkObject *header; - Accessibility_Table rv; + Accessibility_SpiTable rv; header = atk_table_get_column_header (ATK_TABLE(table->atko), (gint) column); - rv = bonobo_object_corba_objref (BONOBO_OBJECT(accessible_new(header))); + rv = bonobo_object_corba_objref (BONOBO_OBJECT(spi_accessible_new(header))); return CORBA_Object_duplicate (rv, ev); } @@ -430,7 +430,7 @@ static Accessibility_LongSeq * impl_getSelectedRows (PortableServer_Servant _servant, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); gint *selectedRows; gint length; Accessibility_LongSeq *retval; @@ -454,7 +454,7 @@ static Accessibility_LongSeq * impl_getSelectedColumns (PortableServer_Servant _servant, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); gint *selectedColumns; gint length; Accessibility_LongSeq *retval; @@ -480,7 +480,7 @@ impl_isRowSelected (PortableServer_Servant _servant, const CORBA_long row, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_boolean) atk_table_is_row_selected (ATK_TABLE(table->atko), (gint) row); } @@ -492,7 +492,7 @@ impl_isColumnSelected (PortableServer_Servant _servant, const CORBA_long column, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_boolean) atk_table_is_column_selected (ATK_TABLE(table->atko), (gint) column); } @@ -505,7 +505,7 @@ impl_isSelected (PortableServer_Servant _servant, const CORBA_long column, CORBA_Environment * ev) { - Table *table = TABLE (bonobo_object_from_servant (_servant)); + SpiTable *table = SPI_TABLE (bonobo_object_from_servant (_servant)); return (CORBA_boolean) atk_table_is_selected (ATK_TABLE(table->atko), (gint) row, (gint) column); diff --git a/libspi/table.h b/libspi/table.h index f245701..de2fade 100644 --- a/libspi/table.h +++ b/libspi/table.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef TABLE_H_ -#define TABLE_H_ +#ifndef SPI_TABLE_H_ +#define SPI_TABLE_H_ #ifdef __cplusplus @@ -29,33 +29,33 @@ extern "C" { #include #include -#define TABLE_TYPE (table_get_type ()) -#define TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TABLE_TYPE, Table)) -#define TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TABLE_TYPE, TableClass)) -#define IS_TABLE(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), TABLE_TYPE)) -#define IS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TABLE_TYPE)) +#define SPI_TABLE_TYPE (spi_table_get_type ()) +#define SPI_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_TABLE_TYPE, SpiTable)) +#define SPI_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_TABLE_TYPE, SpiTableClass)) +#define IS_TABLE(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), SPI_TABLE_TYPE)) +#define IS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_TABLE_TYPE)) -typedef struct _Table Table; -typedef struct _TableClass TableClass; +typedef struct _SpiTable SpiTable; +typedef struct _SpiTableClass SpiTableClass; -struct _Table { +struct _SpiTable { BonoboObject parent; AtkObject *atko; }; -struct _TableClass { +struct _SpiTableClass { BonoboObjectClass parent_class; - POA_Accessibility_Table__epv epv; + POA_Accessibility_SpiTable__epv epv; }; GType -table_get_type (void); +spi_table_get_type (void); -Table * -table_interface_new (AtkObject *obj); +SpiTable * +spi_table_interface_new (AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* TABLE_H_ */ +#endif /* SPI_TABLE_H_ */ diff --git a/libspi/text.c b/libspi/text.c index f7302fc..e85a326 100644 --- a/libspi/text.c +++ b/libspi/text.c @@ -31,12 +31,12 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include /* - * This pulls the definition of the Text bonobo object + * This pulls the definition of the SpiText bonobo object */ #include "text.h" @@ -49,17 +49,17 @@ /* * A pointer to our parent object class */ -static GObjectClass *text_parent_class; +static GObjectClass *spi_text_parent_class; /* * Static function declarations */ static void -accessibility_text_class_init (TextClass *klass); +accessibility_text_class_init (SpiTextClass *klass); static void -accessibility_text_init (Text *text); +accessibility_text_init (SpiText *text); static void accessibility_text_object_finalize (GObject *obj); @@ -130,7 +130,7 @@ impl_getOffsetAtPoint (PortableServer_Servant _servant, CORBA_Environment * ev); static CORBA_long -impl_getNSelections (PortableServer_Servant _servant, +impl_getNSpiSelections (PortableServer_Servant _servant, CORBA_Environment * ev); static void @@ -140,7 +140,7 @@ impl_getSelection (PortableServer_Servant _servant, CORBA_Environment * ev); static CORBA_boolean -impl_addSelection (PortableServer_Servant _servant, +impl_addSpiSelection (PortableServer_Servant _servant, const CORBA_long startOffset, const CORBA_long endOffset, CORBA_Environment * ev); @@ -169,13 +169,13 @@ accessibility_text_get_type (void) if (!type) { static const GTypeInfo tinfo = { - sizeof (TextClass), + sizeof (SpiTextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) accessibility_text_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Text), + sizeof (SpiText), 0, /* n preallocs */ (GInstanceInitFunc) accessibility_text_init, NULL /* value table */ @@ -188,22 +188,22 @@ accessibility_text_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_Text__init, + POA_Accessibility_SpiText__init, NULL, - G_STRUCT_OFFSET (TextClass, epv), + G_STRUCT_OFFSET (SpiTextClass, epv), &tinfo, - "AccessibleText"); + "SpiAccessibleText"); } return type; } static void -accessibility_text_class_init (TextClass *klass) +accessibility_text_class_init (SpiTextClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Text__epv *epv = &klass->epv; - text_parent_class = g_type_class_peek_parent (klass); + POA_Accessibility_SpiText__epv *epv = &klass->epv; + spi_text_parent_class = g_type_class_peek_parent (klass); object_class->finalize = accessibility_text_object_finalize; @@ -219,33 +219,33 @@ accessibility_text_class_init (TextClass *klass) epv->getCharacterExtents = impl_getCharacterExtents; epv->_get_characterCount = impl__get_characterCount; epv->getOffsetAtPoint = impl_getOffsetAtPoint; - epv->getNSelections = impl_getNSelections; + epv->getNSpiSelections = impl_getNSpiSelections; epv->getSelection = impl_getSelection; - epv->addSelection = impl_addSelection; + epv->addSpiSelection = impl_addSpiSelection; epv->removeSelection = impl_removeSelection; epv->setSelection = impl_setSelection; epv->setCaretOffset = impl_setCaretOffset; } static void -accessibility_text_init (Text *text) +accessibility_text_init (SpiText *text) { } static void accessibility_text_object_finalize (GObject *obj) { - Text *text = TEXT (obj); + SpiText *text = SPI_TEXT (obj); g_object_unref (text->atko); text->atko = NULL; - text_parent_class->finalize (obj); + spi_text_parent_class->finalize (obj); } -Text * -text_interface_new (AtkObject *obj) +SpiText * +spi_text_interface_new (AtkObject *obj) { - Text *new_text = - TEXT (g_object_new (accessibility_text_get_type (), NULL)); + SpiText *new_text = + SPI_TEXT (g_object_new (accessibility_text_get_type (), NULL)); new_text->atko = obj; g_object_ref (obj); return new_text; @@ -259,14 +259,14 @@ impl_getText (PortableServer_Servant _servant, const CORBA_long endOffset, CORBA_Environment * ev) { - Text *text; + SpiText *text; gchar *txt; CORBA_string rv; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_char *)""); - text = TEXT (obj); + text = SPI_TEXT (obj); g_return_val_if_fail (ATK_IS_TEXT (text->atko), (CORBA_char *)""); txt = atk_text_get_text (ATK_TEXT(text->atko), @@ -292,7 +292,7 @@ impl_getTextAfterOffset (PortableServer_Servant _servant, CORBA_long * endOffset, CORBA_Environment * ev) { - Text *text; + SpiText *text; gchar *txt; CORBA_char *rv; gint intStartOffset, intEndOffset; @@ -300,7 +300,7 @@ impl_getTextAfterOffset (PortableServer_Servant _servant, obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_char *)""); - text = TEXT (obj); + text = SPI_TEXT (obj); g_return_val_if_fail (ATK_IS_TEXT (text->atko), (CORBA_char *)""); txt = atk_text_get_text_after_offset (ATK_TEXT(text->atko), @@ -329,7 +329,7 @@ impl_getTextAtOffset (PortableServer_Servant _servant, CORBA_long * endOffset, CORBA_Environment * ev) { - Text *text; + SpiText *text; CORBA_char *txt; CORBA_char *rv; gint intStartOffset, intEndOffset; @@ -337,7 +337,7 @@ impl_getTextAtOffset (PortableServer_Servant _servant, obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_char *)""); - text = TEXT (obj); + text = SPI_TEXT (obj); g_return_val_if_fail (ATK_IS_TEXT (text->atko), (CORBA_char *)""); txt = (CORBA_char *) atk_text_get_text_at_offset (ATK_TEXT (text->atko), @@ -363,12 +363,12 @@ impl_getCharacterAtOffset (PortableServer_Servant _servant, const CORBA_long offset, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_unsigned_long)0); - text = TEXT (obj); + text = SPI_TEXT (obj); g_return_val_if_fail (ATK_IS_TEXT (text->atko), (CORBA_unsigned_long)0); return (CORBA_unsigned_long) @@ -385,7 +385,7 @@ impl_getTextBeforeOffset (PortableServer_Servant _servant, CORBA_long * endOffset, CORBA_Environment * ev) { - Text *text; + SpiText *text; gchar *txt; CORBA_char *rv; gint intStartOffset, intEndOffset; @@ -393,7 +393,7 @@ impl_getTextBeforeOffset (PortableServer_Servant _servant, obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_char *)""); - text = TEXT (obj); + text = SPI_TEXT (obj); g_return_val_if_fail (ATK_IS_TEXT (text->atko), (CORBA_char *)""); txt = atk_text_get_text_before_offset (ATK_TEXT(text->atko), @@ -417,12 +417,12 @@ static CORBA_long impl__get_caretOffset (PortableServer_Servant _servant, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_long)-1); - text = TEXT (obj); + text = SPI_TEXT (obj); g_return_val_if_fail (ATK_IS_TEXT (text->atko), (CORBA_long)-1); return (CORBA_long) @@ -438,12 +438,12 @@ impl_getAttributes (PortableServer_Servant _servant, CORBA_long * endOffset, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_char *)""); - text = TEXT (obj); + text = SPI_TEXT (obj); g_return_val_if_fail (ATK_IS_TEXT (text->atko), (CORBA_char *)""); g_print ("getAttributes not yet implemented.\n"); @@ -457,12 +457,12 @@ impl_getCharacterExtents (PortableServer_Servant _servant, const CORBA_short coordType, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_if_fail (IS_TEXT (obj)); - text = TEXT (obj); + text = SPI_TEXT (obj); g_return_if_fail (ATK_IS_TEXT (text->atko)); atk_text_get_character_extents (ATK_TEXT(text->atko), (gint) offset, @@ -476,13 +476,13 @@ static CORBA_long impl__get_characterCount (PortableServer_Servant _servant, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; CORBA_long retval; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_long)0); - text = TEXT (obj); + text = SPI_TEXT (obj); retval = (CORBA_long) atk_text_get_character_count (ATK_TEXT(text->atko)); @@ -498,12 +498,12 @@ impl_getOffsetAtPoint (PortableServer_Servant _servant, const CORBA_short coordType, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_long)-1); - text = TEXT (obj); + text = SPI_TEXT (obj); return (CORBA_long) atk_text_get_offset_at_point (ATK_TEXT(text->atko), @@ -513,15 +513,15 @@ impl_getOffsetAtPoint (PortableServer_Servant _servant, static CORBA_long -impl_getNSelections (PortableServer_Servant _servant, +impl_getNSpiSelections (PortableServer_Servant _servant, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_long)0); - text = TEXT (obj); + text = SPI_TEXT (obj); return (CORBA_long) atk_text_get_n_selections (ATK_TEXT(text->atko)); @@ -535,12 +535,12 @@ impl_getSelection (PortableServer_Servant _servant, CORBA_long * startOffset, CORBA_long * endOffset, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_if_fail (IS_TEXT (obj)); - text = TEXT (obj); + text = SPI_TEXT (obj); atk_text_get_selection (ATK_TEXT(text->atko), (gint) selectionNum, (gint *) startOffset, (gint *) endOffset); @@ -549,17 +549,17 @@ impl_getSelection (PortableServer_Servant _servant, static CORBA_boolean -impl_addSelection (PortableServer_Servant _servant, +impl_addSpiSelection (PortableServer_Servant _servant, const CORBA_long startOffset, const CORBA_long endOffset, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_boolean)FALSE); - text = TEXT (obj); + text = SPI_TEXT (obj); return (CORBA_boolean) atk_text_add_selection (ATK_TEXT(text->atko), @@ -573,12 +573,12 @@ impl_removeSelection (PortableServer_Servant _servant, const CORBA_long selectionNum, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_boolean)FALSE); - text = TEXT (obj); + text = SPI_TEXT (obj); return (CORBA_boolean) atk_text_remove_selection (ATK_TEXT(text->atko), (gint) selectionNum); @@ -593,12 +593,12 @@ impl_setSelection (PortableServer_Servant _servant, const CORBA_long endOffset, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_boolean)FALSE); - text = TEXT (obj); + text = SPI_TEXT (obj); return (CORBA_boolean) atk_text_set_selection (ATK_TEXT(text->atko), @@ -612,12 +612,12 @@ impl_setCaretOffset (PortableServer_Servant _servant, const CORBA_long value, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_val_if_fail (IS_TEXT (obj), (CORBA_boolean)FALSE); - text = TEXT (obj); + text = SPI_TEXT (obj); return (CORBA_boolean) atk_text_set_caret_offset (ATK_TEXT(text->atko), (gint) value); @@ -630,12 +630,12 @@ impl_getRowColAtOffset (PortableServer_Servant _servant, const CORBA_long offset, CORBA_long * row, CORBA_long * column, CORBA_Environment * ev) { - Text *text; + SpiText *text; BonoboObject *obj; obj = (bonobo_object_from_servant (_servant)); g_return_if_fail (IS_TEXT (obj)); - text = TEXT (obj); + text = SPI_TEXT (obj); g_print ("getRowColAtOffset not yet implemented\n"); } diff --git a/libspi/text.h b/libspi/text.h index 4c79eec..9ff1388 100644 --- a/libspi/text.h +++ b/libspi/text.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef TEXT_H_ -#define TEXT_H_ +#ifndef SPI_TEXT_H_ +#define SPI_TEXT_H_ #ifdef __cplusplus @@ -30,33 +30,33 @@ extern "C" { #include #include "accessible.h" -#define TEXT_TYPE (accessibility_text_get_type ()) -#define TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEXT_TYPE, Text)) -#define TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), TEXT_TYPE, TextClass)) -#define IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEXT_TYPE)) -#define IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TEXT_TYPE)) +#define SPI_TEXT_TYPE (accessibility_text_get_type ()) +#define SPI_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_TEXT_TYPE, SpiText)) +#define SPI_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_TEXT_TYPE, SpiTextClass)) +#define IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPI_TEXT_TYPE)) +#define IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_TEXT_TYPE)) -typedef struct _Text Text; -typedef struct _TextClass TextClass; +typedef struct _SpiText SpiText; +typedef struct _SpiTextClass SpiTextClass; -struct _Text { +struct _SpiText { BonoboObject parent; AtkObject *atko; }; -struct _TextClass { +struct _SpiTextClass { BonoboObjectClass parent_class; - POA_Accessibility_Text__epv epv; + POA_Accessibility_SpiText__epv epv; }; GType accessibility_text_get_type (void); -Text * -text_interface_new (AtkObject *obj); +SpiText * +spi_text_interface_new (AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* TEXT_H_ */ +#endif /* SPI_TEXT_H_ */ diff --git a/libspi/value.c b/libspi/value.c index 3549658..38d9866 100644 --- a/libspi/value.c +++ b/libspi/value.c @@ -30,12 +30,12 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include /* - * This pulls the definition of the Value bonobo object + * This pulls the definition of the SpiValue bonobo object */ #include "value.h" @@ -44,16 +44,16 @@ */ static void -value_class_init (ValueClass *klass); +spi_value_class_init (SpiValueClass *klass); static void -value_init (Value *value); +spi_value_init (SpiValue *value); static void -value_finalize (GObject *obj); +spi_value_finalize (GObject *obj); static CORBA_float -impl__get_minimumValue (PortableServer_Servant _servant, +impl__get_minimumSpiValue (PortableServer_Servant _servant, CORBA_Environment * ev); static CORBA_float -impl__get_maximumValue (PortableServer_Servant _servant, +impl__get_maximumSpiValue (PortableServer_Servant _servant, CORBA_Environment * ev); static CORBA_float impl__get_currentValue (PortableServer_Servant _servant, @@ -69,21 +69,21 @@ static GObjectClass *parent_class; GType -value_get_type (void) +spi_value_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (ValueClass), + sizeof (SpiValueClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) value_class_init, + (GClassInitFunc) spi_value_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Value), + sizeof (SpiValue), 0, /* n preallocs */ - (GInstanceInitFunc) value_init, + (GInstanceInitFunc) spi_value_init, NULL /* value table */ }; @@ -94,53 +94,53 @@ value_get_type (void) */ type = bonobo_type_unique ( BONOBO_OBJECT_TYPE, - POA_Accessibility_Value__init, + POA_Accessibility_SpiValue__init, NULL, - G_STRUCT_OFFSET (ValueClass, epv), + G_STRUCT_OFFSET (SpiValueClass, epv), &tinfo, - "AccessibleValue"); + "SpiAccessibleValue"); } return type; } static void -value_class_init (ValueClass *klass) +spi_value_class_init (SpiValueClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Value__epv *epv = &klass->epv; + POA_Accessibility_SpiValue__epv *epv = &klass->epv; parent_class = g_type_class_peek_parent (klass); - object_class->finalize = value_finalize; + object_class->finalize = spi_value_finalize; /* Initialize epv table */ - epv->_get_minimumValue = impl__get_minimumValue; - epv->_get_maximumValue = impl__get_maximumValue; + epv->_get_minimumSpiValue = impl__get_minimumSpiValue; + epv->_get_maximumSpiValue = impl__get_maximumSpiValue; epv->_get_currentValue = impl__get_currentValue; epv->_set_currentValue = impl__set_currentValue; } static void -value_init (Value *value) +spi_value_init (SpiValue *value) { } static void -value_finalize (GObject *obj) +spi_value_finalize (GObject *obj) { - Value *value = VALUE (obj); + SpiValue *value = SPI_VALUE (obj); g_object_unref (value->atko); value->atko = NULL; parent_class->finalize (obj); } -Value * -value_interface_new (AtkObject *obj) +SpiValue * +spi_value_interface_new (AtkObject *obj) { - Value *new_value = - VALUE(g_object_new (VALUE_TYPE, NULL)); + SpiValue *new_value = + SPI_VALUE(g_object_new (SPI_VALUE_TYPE, NULL)); new_value->atko = obj; g_object_ref (obj); return new_value; @@ -149,10 +149,10 @@ value_interface_new (AtkObject *obj) static CORBA_float -impl__get_minimumValue (PortableServer_Servant _servant, +impl__get_minimumSpiValue (PortableServer_Servant _servant, CORBA_Environment * ev) { - Value *value = VALUE (bonobo_object_from_servant (_servant)); + SpiValue *value = SPI_VALUE (bonobo_object_from_servant (_servant)); GValue gvalue = {0, }; g_value_init (&gvalue, G_TYPE_FLOAT); @@ -163,10 +163,10 @@ impl__get_minimumValue (PortableServer_Servant _servant, static CORBA_float -impl__get_maximumValue (PortableServer_Servant _servant, +impl__get_maximumSpiValue (PortableServer_Servant _servant, CORBA_Environment * ev) { - Value *value = VALUE (bonobo_object_from_servant (_servant)); + SpiValue *value = SPI_VALUE (bonobo_object_from_servant (_servant)); GValue gvalue = {0, }; g_value_init (&gvalue, G_TYPE_FLOAT); @@ -180,7 +180,7 @@ static CORBA_float impl__get_currentValue (PortableServer_Servant _servant, CORBA_Environment * ev) { - Value *value = VALUE (bonobo_object_from_servant (_servant)); + SpiValue *value = SPI_VALUE (bonobo_object_from_servant (_servant)); GValue gvalue = {0, }; g_value_init (&gvalue, G_TYPE_FLOAT); @@ -194,7 +194,7 @@ impl__set_currentValue (PortableServer_Servant _servant, const CORBA_float value, CORBA_Environment * ev) { - Value *val = VALUE (bonobo_object_from_servant (_servant)); + SpiValue *val = SPI_VALUE (bonobo_object_from_servant (_servant)); GValue gvalue = {0, }; g_value_init (&gvalue, G_TYPE_FLOAT); diff --git a/libspi/value.h b/libspi/value.h index 2c3755b..1893c3c 100644 --- a/libspi/value.h +++ b/libspi/value.h @@ -17,8 +17,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef VALUE_H_ -#define VALUE_H_ +#ifndef SPI_VALUE_H_ +#define SPI_VALUE_H_ #ifdef __cplusplus @@ -29,33 +29,33 @@ extern "C" { #include #include -#define VALUE_TYPE (value_get_type ()) -#define VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALUE_TYPE, Value)) -#define ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), VALUE_TYPE, ValueClass)) -#define IS_VALUE(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), VALUE_TYPE)) -#define IS_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALUE_TYPE)) +#define SPI_VALUE_TYPE (spi_value_get_type ()) +#define SPI_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_VALUE_TYPE, SpiValue)) +#define SPI_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_VALUE_TYPE, SpiValueClass)) +#define IS_SPI_VALUE(obj) (G_TYPE_CHECK__INSTANCE_TYPE ((obj), SPI_VALUE_TYPE)) +#define IS_SPI_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_VALUE_TYPE)) -typedef struct _Value Value; -typedef struct _ValueClass ValueClass; +typedef struct _SpiValue SpiValue; +typedef struct _SpiValueClass SpiValueClass; -struct _Value { +struct _SpiValue { BonoboObject parent; AtkObject *atko; }; -struct _ValueClass { +struct _SpiValueClass { BonoboObjectClass parent_class; - POA_Accessibility_Value__epv epv; + POA_Accessibility_SpiValue__epv epv; }; GType -value_get_type (void); +spi_value_get_type (void); -Value * -value_interface_new (AtkObject *obj); +SpiValue * +spi_value_interface_new (AtkObject *obj); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* VALUE_H_ */ +#endif /* SPI_VALUE_H_ */ diff --git a/registryd/desktop.c b/registryd/desktop.c index 040e698..82acb44 100644 --- a/registryd/desktop.c +++ b/registryd/desktop.c @@ -21,7 +21,7 @@ */ /* - * desktop.c: implements Desktop.idl + * desktop.c: implements SpiDesktop.idl * */ @@ -31,7 +31,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Accessible" server + * This pulls the CORBA definitions for the "Accessibility::SpiAccessible" server */ #include @@ -43,26 +43,26 @@ /* * Our parent Gtk object type */ -#define PARENT_TYPE ACCESSIBLE_TYPE +#define PARENT_TYPE SPI_ACCESSIBLE_TYPE /* * A pointer to our parent object class */ -static AccessibleClass *parent_class; +static SpiAccessibleClass *parent_class; static void -desktop_init (Desktop *desktop) +spi_desktop_init (SpiDesktop *desktop) { - ACCESSIBLE (desktop)->atko = g_object_new (atk_object_get_type(), NULL); + SPI_ACCESSIBLE (desktop)->atko = g_object_new (atk_object_get_type(), NULL); desktop->applications = NULL; - atk_object_set_name (ATK_OBJECT (ACCESSIBLE (desktop)->atko), "main"); + atk_object_set_name (ATK_OBJECT (SPI_ACCESSIBLE (desktop)->atko), "main"); } static CORBA_long -impl_desktop_get_child_count (PortableServer_Servant servant, +impl_spi_desktop_get_child_count (PortableServer_Servant servant, CORBA_Environment * ev) { - Desktop *desktop = DESKTOP (bonobo_object_from_servant (servant)); + SpiDesktop *desktop = SPI_DESKTOP (bonobo_object_from_servant (servant)); if (desktop->applications) { return g_list_length (desktop->applications); @@ -73,12 +73,12 @@ impl_desktop_get_child_count (PortableServer_Servant servant, } } -static Accessibility_Accessible -impl_desktop_get_child_at_index (PortableServer_Servant servant, +static Accessibility_SpiAccessible +impl_spi_desktop_get_child_at_index (PortableServer_Servant servant, const CORBA_long index, CORBA_Environment * ev) { - Desktop *desktop = DESKTOP (bonobo_object_from_servant (servant)); + SpiDesktop *desktop = SPI_DESKTOP (bonobo_object_from_servant (servant)); CORBA_Object retval; if ((desktop->applications) && (index < g_list_length (desktop->applications))) { @@ -94,37 +94,37 @@ impl_desktop_get_child_at_index (PortableServer_Servant servant, fprintf (stderr, "no %ldth child\n", (long) index); retval = CORBA_OBJECT_NIL; } - return (Accessibility_Accessible) retval; + return (Accessibility_SpiAccessible) retval; } static void -desktop_class_init (DesktopClass *klass) +spi_desktop_class_init (SpiDesktopClass *klass) { - AccessibleClass * accessible_class = (AccessibleClass *) klass; - POA_Accessibility_Accessible__epv *epv = &accessible_class->epv; + SpiAccessibleClass * spi_accessible_class = (SpiAccessibleClass *) klass; + POA_Accessibility_SpiAccessible__epv *epv = &spi_accessible_class->epv; - parent_class = g_type_class_ref (ACCESSIBLE_TYPE); + parent_class = g_type_class_ref (SPI_ACCESSIBLE_TYPE); - epv->_get_childCount = impl_desktop_get_child_count; - epv->getChildAtIndex = impl_desktop_get_child_at_index; + epv->_get_childCount = impl_spi_desktop_get_child_count; + epv->getChildAtIndex = impl_spi_desktop_get_child_at_index; } GType -desktop_get_type (void) +spi_desktop_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (DesktopClass), + sizeof (SpiDesktopClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) desktop_class_init, + (GClassInitFunc) spi_desktop_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Desktop), + sizeof (SpiDesktop), 0, /* n preallocs */ - (GInstanceInitFunc) desktop_init, + (GInstanceInitFunc) spi_desktop_init, NULL /* value table */ }; /* @@ -135,20 +135,20 @@ desktop_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_Desktop__init, + POA_Accessibility_SpiDesktop__init, NULL, - G_STRUCT_OFFSET (DesktopClass, epv), + G_STRUCT_OFFSET (SpiDesktopClass, epv), &tinfo, - "Desktop"); + "SpiDesktop"); } return type; } -Desktop * -desktop_new (void) +SpiDesktop * +spi_desktop_new (void) { - Desktop *retval = - DESKTOP (g_object_new (desktop_get_type (), NULL)); + SpiDesktop *retval = + SPI_DESKTOP (g_object_new (spi_desktop_get_type (), NULL)); return retval; } diff --git a/registryd/desktop.h b/registryd/desktop.h index 87866e7..d3430f6 100644 --- a/registryd/desktop.h +++ b/registryd/desktop.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef DESKTOP_H_ -#define DESKTOP_H_ +#ifndef SPI_DESKTOP_H_ +#define SPI_DESKTOP_H_ #ifdef __cplusplus extern "C" { @@ -33,29 +33,29 @@ extern "C" { #include #include -#define DESKTOP_TYPE (desktop_get_type ()) -#define DESKTOP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DESKTOP_TYPE, Desktop)) -#define DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DESKTOP_TYPE, DesktopClass)) -#define IS_DESKTOP(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), DESKTOP_TYPE)) -#define IS_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DESKTOP_TYPE)) +#define SPI_DESKTOP_TYPE (spi_desktop_get_type ()) +#define SPI_DESKTOP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_DESKTOP_TYPE, SpiDesktop)) +#define SPI_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_DESKTOP_TYPE, SpiDesktopClass)) +#define IS_SPI_DESKTOP(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_DESKTOP_TYPE)) +#define IS_SPI_DESKTOP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_DESKTOP_TYPE)) typedef struct { - Accessible parent; + SpiAccessible parent; GList *applications; /* TODO: maybe change this so it's generated on-demand ? */ -} Desktop; +} SpiDesktop; typedef struct { - AccessibleClass parent_class; - POA_Accessibility_Desktop__epv epv; -} DesktopClass; + SpiAccessibleClass parent_class; + POA_Accessibility_SpiDesktop__epv epv; +} SpiDesktopClass; -GType desktop_get_type (void); -void desktop_add_application (Application *app); -void desktop_remove_application (Application *app); -Desktop *desktop_new (void); +GType spi_desktop_get_type (void); +void spi_desktop_add_application (SpiApplication *app); +void spi_desktop_remove_application (SpiApplication *app); +SpiDesktop *spi_desktop_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* DESKTOP_H_ */ +#endif /* SPI_DESKTOP_H_ */ diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index e3271bc..6098395 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -50,7 +50,7 @@ /* * A pointer to our parent object class */ -static GObjectClass *device_event_controller_parent_class; +static GObjectClass *spi_device_event_controller_parent_class; static gboolean kbd_registered = FALSE; @@ -64,10 +64,10 @@ typedef enum { DEVICE_TYPE_LAST_DEFINED } DeviceTypeCategory; -static gboolean _controller_register_with_devices (DeviceEventController *controller); -static gboolean _controller_grab_keyboard (DeviceEventController *controller); +static gboolean _controller_register_with_devices (SpiDeviceEventController *controller); +static gboolean _controller_grab_keyboard (SpiDeviceEventController *controller); -static void _controller_register_device_listener (DeviceEventController *controller, +static void _controller_register_device_listener (SpiDeviceEventController *controller, const CORBA_Object l, const Accessibility_ControllerEventMask *mask, DeviceTypeCategory type, @@ -105,7 +105,7 @@ _eventmask_compare_value (gconstpointer p1, gconstpointer p2) } static void -_controller_register_device_listener (DeviceEventController *controller, +_controller_register_device_listener (SpiDeviceEventController *controller, const CORBA_Object l, const Accessibility_ControllerEventMask *mask, DeviceTypeCategory type, @@ -150,7 +150,7 @@ _controller_register_device_listener (DeviceEventController *controller, } static void -_controller_deregister_device_listener (DeviceEventController *controller, +_controller_deregister_device_listener (SpiDeviceEventController *controller, const CORBA_Object l, const Accessibility_ControllerEventMask *mask, DeviceTypeCategory type, @@ -189,7 +189,7 @@ _controller_deregister_device_listener (DeviceEventController *controller, } static gboolean -_controller_register_with_devices (DeviceEventController *controller) +_controller_register_with_devices (SpiDeviceEventController *controller) { gboolean retval = FALSE; @@ -212,7 +212,7 @@ _controller_register_with_devices (DeviceEventController *controller) } static gboolean -_check_key_event (DeviceEventController *controller) +_check_key_event (SpiDeviceEventController *controller) { static gboolean initialized = FALSE; static gboolean is_active = FALSE; @@ -289,7 +289,7 @@ _check_key_event (DeviceEventController *controller) } static gboolean -_controller_grab_keyboard (DeviceEventController *controller) +_controller_grab_keyboard (SpiDeviceEventController *controller) { GList *maskList = controller->keymask_list; int i; @@ -336,17 +336,17 @@ _controller_grab_keyboard (DeviceEventController *controller) * Implemented GObject::finalize */ static void -device_event_controller_object_finalize (GObject *object) +spi_device_event_controller_object_finalize (GObject *object) { #ifdef SPI_DEBUG - fprintf(stderr, "device_event_controller_object_finalize called\n"); + fprintf(stderr, "spi_device_event_controller_object_finalize called\n"); #endif - device_event_controller_parent_class->finalize (object); + spi_device_event_controller_parent_class->finalize (object); } /* - * CORBA Accessibility::DeviceEventController::registerKeystrokeListener + * CORBA Accessibility::SpiDeviceEventController::registerKeystrokeListener * method implementation */ static void @@ -358,7 +358,7 @@ impl_register_keystroke_listener (PortableServer_Servant servant, const CORBA_boolean is_synchronous, CORBA_Environment *ev) { - DeviceEventController *controller = DEVICE_EVENT_CONTROLLER ( + SpiDeviceEventController *controller = SPI_DEVICE_EVENT_CONTROLLER ( bonobo_object_from_servant (servant)); #ifdef SPI_DEBUG fprintf (stderr, "registering keystroke listener %p with maskVal %lu\n", @@ -371,7 +371,7 @@ impl_register_keystroke_listener (PortableServer_Servant servant, ; /* register with toolkit instead */ } /* - * CORBA Accessibility::DeviceEventController::deregisterKeystrokeListener + * CORBA Accessibility::SpiDeviceEventController::deregisterKeystrokeListener * method implementation */ static void @@ -383,7 +383,7 @@ impl_deregister_keystroke_listener (PortableServer_Servant servant, const CORBA_boolean is_synchronous, CORBA_Environment *ev) { - DeviceEventController *controller = DEVICE_EVENT_CONTROLLER ( + SpiDeviceEventController *controller = SPI_DEVICE_EVENT_CONTROLLER ( bonobo_object_from_servant (servant)); #ifdef SPI_DEBUG fprintf (stderr, "deregistering keystroke listener %p with maskVal %lu\n", @@ -393,7 +393,7 @@ impl_deregister_keystroke_listener (PortableServer_Servant servant, } /* - * CORBA Accessibility::DeviceEventController::registerMouseListener + * CORBA Accessibility::SpiDeviceEventController::registerMouseListener * method implementation */ /* @@ -402,7 +402,7 @@ impl_register_mouse_listener (PortableServer_Servant servant, const Accessibility_MouseListener *l, CORBA_Environment *ev) { - DeviceEventController *controller = DEVICE_EVENT_CONTROLLER ( + SpiDeviceEventController *controller = SPI_DEVICE_EVENT_CONTROLLER ( bonobo_object_from_servant (servant)); #ifdef SPI_DEBUG fprintf (stderr, "registering mouse listener %p\n", l); @@ -418,7 +418,7 @@ keycode_for_keysym (long keysym) } /* - * CORBA Accessibility::DeviceEventController::registerKeystrokeListener + * CORBA Accessibility::SpiDeviceEventController::registerKeystrokeListener * method implementation */ static void @@ -459,7 +459,7 @@ impl_generate_key_event (PortableServer_Servant servant, } /* - * CORBA Accessibility::DeviceEventController::generateMouseEvent + * CORBA Accessibility::SpiDeviceEventController::generateMouseEvent * method implementation */ static void @@ -475,13 +475,13 @@ impl_generate_mouse_event (PortableServer_Servant servant, } static void -device_event_controller_class_init (DeviceEventControllerClass *klass) +spi_device_event_controller_class_init (SpiDeviceEventControllerClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_DeviceEventController__epv *epv = &klass->epv; - device_event_controller_parent_class = g_type_class_ref (BONOBO_OBJECT_TYPE); + POA_Accessibility_SpiDeviceEventController__epv *epv = &klass->epv; + spi_device_event_controller_parent_class = g_type_class_ref (BONOBO_OBJECT_TYPE); - object_class->finalize = device_event_controller_object_finalize; + object_class->finalize = spi_device_event_controller_object_finalize; epv->registerKeystrokeListener = impl_register_keystroke_listener; epv->deregisterKeystrokeListener = impl_deregister_keystroke_listener; @@ -492,7 +492,7 @@ device_event_controller_class_init (DeviceEventControllerClass *klass) } static void -device_event_controller_init (DeviceEventController *device_event_controller) +spi_device_event_controller_init (SpiDeviceEventController *device_event_controller) { device_event_controller->key_listeners = NULL; device_event_controller->mouse_listeners = NULL; @@ -500,29 +500,29 @@ device_event_controller_init (DeviceEventController *device_event_controller) kbd_registered = _controller_register_with_devices (device_event_controller); } -gboolean device_event_controller_check_key_event (DeviceEventController *controller) +gboolean spi_device_event_controller_check_key_event (SpiDeviceEventController *controller) { - DeviceEventControllerClass *klass = DEVICE_EVENT_CONTROLLER_GET_CLASS (controller); + SpiDeviceEventControllerClass *klass = SPI_DEVICE_EVENT_CONTROLLER_GET_CLASS (controller); if (klass->check_key_event) return (klass->check_key_event) (controller); } GType -device_event_controller_get_type (void) +spi_device_event_controller_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (DeviceEventControllerClass), + sizeof (SpiDeviceEventControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) device_event_controller_class_init, + (GClassInitFunc) spi_device_event_controller_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (DeviceEventController), + sizeof (SpiDeviceEventController), 0, /* n preallocs */ - (GInstanceInitFunc) device_event_controller_init, + (GInstanceInitFunc) spi_device_event_controller_init, NULL /* value table */ }; /* @@ -533,11 +533,11 @@ device_event_controller_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_DeviceEventController__init, + POA_Accessibility_SpiDeviceEventController__init, NULL, - G_STRUCT_OFFSET (DeviceEventControllerClass, epv), + G_STRUCT_OFFSET (SpiDeviceEventControllerClass, epv), &tinfo, - "DeviceEventController"); + "SpiDeviceEventController"); } return type; diff --git a/registryd/deviceeventcontroller.h b/registryd/deviceeventcontroller.h index dd195db..985a36e 100644 --- a/registryd/deviceeventcontroller.h +++ b/registryd/deviceeventcontroller.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef DEVICE_EVENT_CONTROLLER_H_ -#define DEVICE_EVENT_CONTROLLER_H_ +#ifndef SPI_DEVICE_EVENT_CONTROLLER_H_ +#define SPI_DEVICE_EVENT_CONTROLLER_H_ #ifdef __cplusplus extern "C" { @@ -31,27 +31,27 @@ extern "C" { #include #include "keystrokelistener.h" -#define DEVICE_EVENT_CONTROLLER_TYPE (device_event_controller_get_type ()) -#define DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventController)) -#define DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventControllerClass)) -#define IS_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DEVICE_EVENT_CONTROLLER_TYPE)) -#define IS_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DEVICE_EVENT_CONTROLLER_TYPE)) -#define DEVICE_EVENT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEVICE_EVENT_CONTROLLER_TYPE, DeviceEventControllerClass)) +#define SPI_DEVICE_EVENT_CONTROLLER_TYPE (spi_device_event_controller_get_type ()) +#define SPI_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDeviceEventController)) +#define SPI_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDeviceEventControllerClass)) +#define IS_SPI_DEVICE_EVENT_CONTROLLER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SPI_DEVICE_EVENT_CONTROLLER_TYPE)) +#define IS_SPI_DEVICE_EVENT_CONTROLLER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_DEVICE_EVENT_CONTROLLER_TYPE)) +#define SPI_DEVICE_EVENT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPI_DEVICE_EVENT_CONTROLLER_TYPE, SpiDeviceEventControllerClass)) typedef struct { BonoboObject parent; GList *key_listeners; GList *mouse_listeners; GList *keymask_list; -} DeviceEventController; +} SpiDeviceEventController; typedef struct { BonoboObjectClass parent_class; - POA_Accessibility_DeviceEventController__epv epv; - gboolean (*check_key_event) (DeviceEventController *controller); -} DeviceEventControllerClass; + POA_Accessibility_SpiDeviceEventController__epv epv; + gboolean (*check_key_event) (SpiDeviceEventController *controller); +} SpiDeviceEventControllerClass; -GType device_event_controller_get_type (void); +GType spi_device_event_controller_get_type (void); #ifdef __cplusplus } diff --git a/registryd/registry-main.c b/registryd/registry-main.c index ba2c770..509e2aa 100644 --- a/registryd/registry-main.c +++ b/registryd/registry-main.c @@ -32,7 +32,7 @@ int main (int argc, char **argv) { - Registry *registry; + SpiRegistry *registry; GSource *keyevent_source; char *obj_id; @@ -41,23 +41,23 @@ main (int argc, g_error ("Could not initialize oaf / Bonobo"); } - obj_id = "OAFIID:Accessibility_Registry:proto0.1"; + obj_id = "OAFIID:Accessibility_SpiRegistry:proto0.1"; - registry = registry_new (); + registry = spi_registry_new (); bonobo_activation_active_server_register ( obj_id, bonobo_object_corba_objref (bonobo_object (registry))); #ifdef AT_SPI_DEBUG - fprintf (stderr, "Registry Message: Registry daemon is running.\n"); + fprintf (stderr, "SpiRegistry Message: SpiRegistry daemon is running.\n"); #endif gdk_init(&argc, &argv); g_timeout_add_full (G_PRIORITY_HIGH_IDLE, 200, registry->kbd_event_hook, registry, NULL); /* keyevent_source = g_source_new (registry->kbd_event_hook, sizeof (GSourceFunc)); - g_source_attach (keyevent_source, g_main_context_default());*/ + g_source_attach (keyevent_source, g_main_conspi_text_default());*/ bonobo_main (); return 0; diff --git a/registryd/registry.c b/registryd/registry.c index ce196c5..782beaa 100644 --- a/registryd/registry.c +++ b/registryd/registry.c @@ -31,7 +31,7 @@ #include /* - * This pulls the CORBA definitions for the "Accessibility::Registry" server + * This pulls the CORBA definitions for the "Accessibility::SpiRegistry" server */ #include @@ -51,12 +51,12 @@ /* * Our parent GObject type */ -#define PARENT_TYPE LISTENER_TYPE +#define PARENT_TYPE SPI_LISTENER_TYPE /* * A pointer to our parent object class */ -static ListenerClass *registry_parent_class; +static SpiListenerClass *spi_registry_parent_class; typedef enum { ETYPE_FOCUS, @@ -80,45 +80,45 @@ typedef struct { Accessibility_EventListener listener; guint event_type_hash; EventTypeCategory event_type_cat; -} ListenerStruct; +} SpiListenerStruct; /* static function prototypes */ -static void _registry_notify_listeners ( GList *listeners, +static void _spi_registry_notify_listeners ( GList *listeners, const Accessibility_Event *e, CORBA_Environment *ev); static long _get_unique_id(); -static gboolean _device_event_controller_hook (gpointer source); +static gboolean _spi_device_event_controller_hook (gpointer source); /* * Implemented GObject::finalize */ static void -registry_object_finalize (GObject *object) +spi_registry_object_finalize (GObject *object) { -/* Registry *registry = REGISTRY (object); */ +/* SpiRegistry *registry = SPI_REGISTRY (object); */ GObjectClass *object_class = G_OBJECT_GET_CLASS( object); - printf("registry_object_finalize called\n"); + printf("spi_registry_object_finalize called\n"); object_class->finalize (object); } /** - * registerApplication: - * @application: a reference to the requesting @Application + * registerSpiApplication: + * @application: a reference to the requesting @SpiApplication * return values: void * * Register a new application with the accessibility broker. * **/ static void -impl_accessibility_registry_register_application (PortableServer_Servant servant, - const Accessibility_Application application, +impl_accessibility_spi_registry_register_application (PortableServer_Servant servant, + const Accessibility_SpiApplication application, CORBA_Environment * ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); #ifdef SPI_DEBUG fprintf (stderr, "registering app %p\n", application); @@ -127,11 +127,11 @@ impl_accessibility_registry_register_application (PortableServer_Servant servant bonobo_object_dup_ref (application, ev)); /* TODO: create unique string here (with libuuid call ?) and hash ? */ - Accessibility_Application__set_id (application, _get_unique_id(), ev); + Accessibility_SpiApplication__set_id (application, _get_unique_id(), ev); /* * TODO: change the implementation below to a WM-aware one; - * e.g. don't add all apps to the Desktop + * e.g. don't add all apps to the SpiDesktop */ } @@ -151,30 +151,30 @@ compare_corba_objects (gconstpointer p1, gconstpointer p2) } static void -register_with_toolkits (Registry *registry_bonobo_object, EventTypeStruct *etype, CORBA_Environment *ev) +register_with_toolkits (SpiRegistry *spi_registry_bonobo_object, EventTypeStruct *etype, CORBA_Environment *ev) { gint n_desktops; gint n_apps; gint i, j; - Accessibility_Desktop desktop; - Accessibility_Application app; - Accessibility_Registry registry; - registry = BONOBO_OBJREF (registry_bonobo_object); + Accessibility_SpiDesktop desktop; + Accessibility_SpiApplication app; + Accessibility_SpiRegistry registry; + registry = BONOBO_OBJREF (spi_registry_bonobo_object); - /* for each app in each desktop, call ...Application_registerToolkitEventListener */ + /* for each app in each desktop, call ...SpiApplication_registerToolkitEventListener */ - n_desktops = Accessibility_Registry_getDesktopCount (registry, ev); + n_desktops = Accessibility_SpiRegistry_getDesktopCount (registry, ev); for (i=0; ievent_name), @@ -184,16 +184,16 @@ register_with_toolkits (Registry *registry_bonobo_object, EventTypeStruct *etype } static gint -compare_listener_hash (gconstpointer p1, gconstpointer p2) +compare_spi_listener_hash (gconstpointer p1, gconstpointer p2) { - return (((ListenerStruct *)p2)->event_type_hash - ((ListenerStruct *)p1)->event_type_hash); + return (((SpiListenerStruct *)p2)->event_type_hash - ((SpiListenerStruct *)p1)->event_type_hash); } static gint -compare_listener_corbaref (gconstpointer p1, gconstpointer p2) +compare_spi_listener_corbaref (gconstpointer p1, gconstpointer p2) { - return compare_corba_objects (((ListenerStruct *)p2)->listener, - ((ListenerStruct *)p1)->listener); + return compare_corba_objects (((SpiListenerStruct *)p2)->listener, + ((SpiListenerStruct *)p1)->listener); } static void @@ -257,8 +257,8 @@ parse_event_type (EventTypeStruct *etype, char *event_name) } /** - * deregisterApplication: - * @application: a reference to the @Application + * deregisterSpiApplication: + * @application: a reference to the @SpiApplication * to be deregistered. * return values: void * @@ -266,11 +266,11 @@ parse_event_type (EventTypeStruct *etype, char *event_name) * **/ static void -impl_accessibility_registry_deregister_application (PortableServer_Servant servant, - const Accessibility_Application application, +impl_accessibility_spi_registry_deregister_application (PortableServer_Servant servant, + const Accessibility_SpiApplication application, CORBA_Environment * ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); GList *list = g_list_find_custom (registry->desktop->applications, &application, compare_corba_objects); #ifdef SPI_DEBUG @@ -297,17 +297,17 @@ impl_accessibility_registry_deregister_application (PortableServer_Servant serva } /* - * CORBA Accessibility::Registry::registerGlobalEventListener method implementation + * CORBA Accessibility::SpiRegistry::registerGlobalEventListener method implementation */ static void -impl_accessibility_registry_register_global_event_listener ( +impl_accessibility_spi_registry_register_global_event_listener ( PortableServer_Servant servant, Accessibility_EventListener listener, const CORBA_char *event_name, CORBA_Environment *ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); - ListenerStruct *ls = g_malloc (sizeof (ListenerStruct)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); + SpiListenerStruct *ls = g_malloc (sizeof (SpiListenerStruct)); EventTypeStruct etype; gboolean is_toolkit_specific = TRUE; @@ -342,20 +342,20 @@ impl_accessibility_registry_register_global_event_listener ( } /* - * CORBA Accessibility::Registry::deregisterGlobalEventListenerAll method implementation + * CORBA Accessibility::SpiRegistry::deregisterGlobalEventListenerAll method implementation */ static void -impl_accessibility_registry_deregister_global_event_listener_all ( +impl_accessibility_spi_registry_deregister_global_event_spi_listener_all ( PortableServer_Servant servant, Accessibility_EventListener listener, CORBA_Environment *ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); - ListenerStruct *ls = g_malloc (sizeof (ListenerStruct)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); + SpiListenerStruct *ls = g_malloc (sizeof (SpiListenerStruct)); GList *list; ls->listener = listener; list = g_list_find_custom (registry->object_listeners, ls, - compare_listener_corbaref); + compare_spi_listener_corbaref); /* * TODO : de-register with toolkit if the last instance of a listener @@ -366,29 +366,29 @@ impl_accessibility_registry_deregister_global_event_listener_all ( { fprintf (stderr, "deregistering listener\n"); registry->object_listeners = g_list_delete_link (registry->object_listeners, list); - list = g_list_find_custom (registry->object_listeners, ls, compare_listener_corbaref); + list = g_list_find_custom (registry->object_listeners, ls, compare_spi_listener_corbaref); } - list = g_list_find_custom (registry->toolkit_listeners, ls, compare_listener_corbaref); + list = g_list_find_custom (registry->toolkit_listeners, ls, compare_spi_listener_corbaref); while (list) { fprintf (stderr, "deregistering listener\n"); registry->toolkit_listeners = g_list_delete_link (registry->toolkit_listeners, list); - list = g_list_find_custom (registry->toolkit_listeners, ls, compare_listener_corbaref); + list = g_list_find_custom (registry->toolkit_listeners, ls, compare_spi_listener_corbaref); } } /* - * CORBA Accessibility::Registry::deregisterGlobalEventListener method implementation + * CORBA Accessibility::SpiRegistry::deregisterGlobalEventListener method implementation */ static void -impl_accessibility_registry_deregister_global_event_listener ( +impl_accessibility_spi_registry_deregister_global_event_listener ( PortableServer_Servant servant, Accessibility_EventListener listener, const CORBA_char * event_name, CORBA_Environment *ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); - ListenerStruct ls; + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); + SpiListenerStruct ls; EventTypeStruct etype; GList *list; GList **listeners; @@ -412,13 +412,13 @@ impl_accessibility_registry_deregister_global_event_listener ( } ls.event_type_hash = etype.hash; - list = g_list_find_custom (*listeners, &ls, compare_listener_hash); + list = g_list_find_custom (*listeners, &ls, compare_spi_listener_hash); while (list) { fprintf (stderr, "deregistering listener\n"); *listeners = g_list_delete_link (*listeners, list); - list = g_list_find_custom (*listeners, &ls, compare_listener_hash); + list = g_list_find_custom (*listeners, &ls, compare_spi_listener_hash); } } @@ -426,13 +426,13 @@ impl_accessibility_registry_deregister_global_event_listener ( /** * getDesktopCount: * return values: a short integer indicating the current number of - * @Desktops. + * @SpiDesktops. * * Get the current number of desktops. * **/ static short -impl_accessibility_registry_get_desktop_count (PortableServer_Servant servant, +impl_accessibility_spi_registry_get_spi_desktop_count (PortableServer_Servant servant, CORBA_Environment * ev) { /* TODO: implement support for multiple virtual desktops */ @@ -443,63 +443,63 @@ impl_accessibility_registry_get_desktop_count (PortableServer_Servant servant, /** * getDesktop: - * @n: the index of the requested @Desktop. - * return values: a reference to the requested @Desktop. + * @n: the index of the requested @SpiDesktop. + * return values: a reference to the requested @SpiDesktop. * * Get the nth accessible desktop. * **/ -static Accessibility_Desktop -impl_accessibility_registry_get_desktop (PortableServer_Servant servant, +static Accessibility_SpiDesktop +impl_accessibility_spi_registry_get_desktop (PortableServer_Servant servant, const CORBA_short n, CORBA_Environment * ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); /* TODO: implement support for multiple virtual desktops */ if (n == 0) { - return (Accessibility_Desktop) + return (Accessibility_SpiDesktop) CORBA_Object_duplicate (BONOBO_OBJREF (registry->desktop), ev); } else { - return (Accessibility_Desktop) CORBA_OBJECT_NIL; + return (Accessibility_SpiDesktop) CORBA_OBJECT_NIL; } } /** * getDesktopList: * return values: a sequence containing references to - * the @Desktops. + * the @SpiDesktops. * * Get a list of accessible desktops. * **/ -static Accessibility_DesktopSeq * -impl_accessibility_registry_get_desktop_list (PortableServer_Servant servant, +static Accessibility_SpiDesktopSeq * +impl_accessibility_spi_registry_get_spi_desktop_list (PortableServer_Servant servant, CORBA_Environment * ev) { /* TODO: implement support for multiple virtual desktops */ - return (Accessibility_DesktopSeq *) NULL; + return (Accessibility_SpiDesktopSeq *) NULL; } -static Accessibility_DeviceEventController -impl_accessibility_registry_get_device_event_controller (PortableServer_Servant servant, +static Accessibility_SpiDeviceEventController +impl_accessibility_spi_registry_get_device_event_controller (PortableServer_Servant servant, CORBA_Environment * ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); if (!registry->device_event_controller) - registry->device_event_controller = g_object_new (DEVICE_EVENT_CONTROLLER_TYPE, NULL); + registry->device_event_controller = g_object_new (SPI_DEVICE_EVENT_CONTROLLER_TYPE, NULL); return CORBA_Object_duplicate (BONOBO_OBJREF (registry->device_event_controller), ev); } static void -impl_registry_notify_event (PortableServer_Servant servant, +impl_spi_registry_notify_event (PortableServer_Servant servant, const Accessibility_Event *e, CORBA_Environment *ev) { - Registry *registry = REGISTRY (bonobo_object_from_servant (servant)); + SpiRegistry *registry = SPI_REGISTRY (bonobo_object_from_servant (servant)); EventTypeStruct etype; parse_event_type (&etype, e->type); @@ -509,18 +509,18 @@ impl_registry_notify_event (PortableServer_Servant servant, case (ETYPE_OBJECT) : case (ETYPE_PROPERTY) : case (ETYPE_FOCUS) : - _registry_notify_listeners (registry->object_listeners, e, ev); + _spi_registry_notify_listeners (registry->object_listeners, e, ev); break; case (ETYPE_WINDOW) : - _registry_notify_listeners (registry->window_listeners, e, ev); + _spi_registry_notify_listeners (registry->window_listeners, e, ev); break; case (ETYPE_TOOLKIT) : - _registry_notify_listeners (registry->toolkit_listeners, e, ev); + _spi_registry_notify_listeners (registry->toolkit_listeners, e, ev); break; default: break; } - /* Accessibility_Accessible_unref (e->source, ev);*/ /* This should be here! */ + /* Accessibility_SpiAccessible_unref (e->source, ev);*/ /* This should be here! */ } static long @@ -531,13 +531,13 @@ _get_unique_id () } static void -_registry_notify_listeners ( GList *listeners, +_spi_registry_notify_listeners ( GList *listeners, const Accessibility_Event *e, CORBA_Environment *ev) { int n; int len; - ListenerStruct *ls; + SpiListenerStruct *ls; EventTypeStruct etype; guint minor_hash; parse_event_type (&etype, e->type); @@ -546,8 +546,8 @@ _registry_notify_listeners ( GList *listeners, for (n=0; nevent_type_hash, etype.hash, minor_hash); fprintf(stderr, "event name: %s\n", etype.event_name); #endif @@ -555,10 +555,10 @@ _registry_notify_listeners ( GList *listeners, { #ifdef SPI_DEBUG fprintf(stderr, "notifying listener #%d\n", n); - fprintf(stderr, "event source name %s\n", Accessibility_Accessible__get_name(e->source, ev)); + fprintf(stderr, "event source name %s\n", Accessibility_SpiAccessible__get_name(e->source, ev)); #endif e->source = CORBA_Object_duplicate (e->source, ev); - Accessibility_Accessible_ref ( e->source, ev); + Accessibility_SpiAccessible_ref ( e->source, ev); Accessibility_EventListener_notifyEvent ((Accessibility_EventListener) ls->listener, e, ev); @@ -572,66 +572,66 @@ _registry_notify_listeners ( GList *listeners, } } -static gboolean _device_event_controller_hook (gpointer p) +static gboolean _spi_device_event_controller_hook (gpointer p) { - Registry *registry = (Registry *)p; - DeviceEventController *controller = registry->device_event_controller; + SpiRegistry *registry = (SpiRegistry *)p; + SpiDeviceEventController *controller = registry->device_event_controller; if (controller) - device_event_controller_check_key_event (controller); + spi_device_event_controller_check_key_event (controller); return TRUE; } static void -registry_class_init (RegistryClass *klass) +spi_registry_class_init (SpiRegistryClass *klass) { GObjectClass * object_class = (GObjectClass *) klass; - POA_Accessibility_Registry__epv *epv = &klass->epv; + POA_Accessibility_SpiRegistry__epv *epv = &klass->epv; - registry_parent_class = g_type_class_ref (LISTENER_TYPE); + spi_registry_parent_class = g_type_class_ref (SPI_LISTENER_TYPE); - object_class->finalize = registry_object_finalize; + object_class->finalize = spi_registry_object_finalize; - epv->registerApplication = impl_accessibility_registry_register_application; - epv->deregisterApplication = impl_accessibility_registry_deregister_application; - epv->registerGlobalEventListener = impl_accessibility_registry_register_global_event_listener; - epv->deregisterGlobalEventListener = impl_accessibility_registry_deregister_global_event_listener; - epv->deregisterGlobalEventListenerAll = impl_accessibility_registry_deregister_global_event_listener_all; - epv->getDeviceEventController = impl_accessibility_registry_get_device_event_controller; - epv->getDesktopCount = impl_accessibility_registry_get_desktop_count; - epv->getDesktop = impl_accessibility_registry_get_desktop; - epv->getDesktopList = impl_accessibility_registry_get_desktop_list; + epv->registerSpiApplication = impl_accessibility_spi_registry_register_application; + epv->deregisterSpiApplication = impl_accessibility_spi_registry_deregister_application; + epv->registerGlobalEventListener = impl_accessibility_spi_registry_register_global_event_listener; + epv->deregisterGlobalEventListener = impl_accessibility_spi_registry_deregister_global_event_listener; + epv->deregisterGlobalEventListenerAll = impl_accessibility_spi_registry_deregister_global_event_spi_listener_all; + epv->getDeviceEventController = impl_accessibility_spi_registry_get_device_event_controller; + epv->getDesktopCount = impl_accessibility_spi_registry_get_spi_desktop_count; + epv->getDesktop = impl_accessibility_spi_registry_get_desktop; + epv->getDesktopList = impl_accessibility_spi_registry_get_spi_desktop_list; - ((ListenerClass *) klass)->epv.notifyEvent = impl_registry_notify_event; + ((SpiListenerClass *) klass)->epv.notifyEvent = impl_spi_registry_notify_event; } static void -registry_init (Registry *registry) +spi_registry_init (SpiRegistry *registry) { registry->object_listeners = NULL; registry->window_listeners = NULL; registry->toolkit_listeners = NULL; registry->applications = NULL; - registry->desktop = desktop_new(); + registry->desktop = spi_desktop_new(); registry->device_event_controller = NULL; - registry->kbd_event_hook = _device_event_controller_hook; + registry->kbd_event_hook = _spi_device_event_controller_hook; } GType -registry_get_type (void) +spi_registry_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo tinfo = { - sizeof (RegistryClass), + sizeof (SpiRegistryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, - (GClassInitFunc) registry_class_init, + (GClassInitFunc) spi_registry_class_init, (GClassFinalizeFunc) NULL, NULL, /* class data */ - sizeof (Registry), + sizeof (SpiRegistry), 0, /* n preallocs */ - (GInstanceInitFunc) registry_init, + (GInstanceInitFunc) spi_registry_init, NULL /* value table */ }; /* @@ -642,20 +642,20 @@ registry_get_type (void) */ type = bonobo_type_unique ( PARENT_TYPE, - POA_Accessibility_Registry__init, + POA_Accessibility_SpiRegistry__init, NULL, - G_STRUCT_OFFSET (RegistryClass, epv), + G_STRUCT_OFFSET (SpiRegistryClass, epv), &tinfo, - "Registry"); + "SpiRegistry"); } return type; } -Registry * -registry_new (void) +SpiRegistry * +spi_registry_new (void) { - Registry *retval = - REGISTRY (g_object_new (registry_get_type (), NULL)); + SpiRegistry *retval = + SPI_REGISTRY (g_object_new (spi_registry_get_type (), NULL)); return retval; } diff --git a/registryd/registry.h b/registryd/registry.h index ca5a2fe..334b71c 100644 --- a/registryd/registry.h +++ b/registryd/registry.h @@ -20,8 +20,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef REGISTRY_H_ -#define REGISTRY_H_ +#ifndef SPI_REGISTRY_H_ +#define SPI_REGISTRY_H_ #ifdef __cplusplus extern "C" { @@ -33,33 +33,33 @@ extern "C" { #include "desktop.h" #include "deviceeventcontroller.h" -#define REGISTRY_TYPE (registry_get_type ()) -#define REGISTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), REGISTRY_TYPE, Registry)) -#define REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), REGISTRY_TYPE, RegistryClass)) -#define IS_REGISTRY(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), REGISTRY_TYPE)) -#define IS_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), REGISTRY_TYPE)) +#define SPI_REGISTRY_TYPE (spi_registry_get_type ()) +#define SPI_REGISTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_REGISTRY_TYPE, SpiRegistry)) +#define SPI_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SPI_REGISTRY_TYPE, SpiRegistryClass)) +#define IS_SPI_REGISTRY(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_REGISTRY_TYPE)) +#define IS_SPI_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_REGISTRY_TYPE)) typedef struct { - Listener parent; + SpiListener parent; GList *object_listeners; GList *window_listeners; GList *toolkit_listeners; GList *applications; - DeviceEventController *device_event_controller; - Desktop *desktop; + SpiDeviceEventController *device_event_controller; + SpiDesktop *desktop; gboolean (*kbd_event_hook) (gpointer source); -} Registry; +} SpiRegistry; typedef struct { - ListenerClass parent_class; - POA_Accessibility_Registry__epv epv; -} RegistryClass; + SpiListenerClass parent_class; + POA_Accessibility_SpiRegistry__epv epv; +} SpiRegistryClass; -GType registry_get_type (void); -Registry *registry_new (void); +GType spi_registry_get_type (void); +SpiRegistry *spi_registry_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* REGISTRY_H_ */ +#endif /* SPI_REGISTRY_H_ */ diff --git a/registryd/registryd.c b/registryd/registryd.c index ba2c770..509e2aa 100644 --- a/registryd/registryd.c +++ b/registryd/registryd.c @@ -32,7 +32,7 @@ int main (int argc, char **argv) { - Registry *registry; + SpiRegistry *registry; GSource *keyevent_source; char *obj_id; @@ -41,23 +41,23 @@ main (int argc, g_error ("Could not initialize oaf / Bonobo"); } - obj_id = "OAFIID:Accessibility_Registry:proto0.1"; + obj_id = "OAFIID:Accessibility_SpiRegistry:proto0.1"; - registry = registry_new (); + registry = spi_registry_new (); bonobo_activation_active_server_register ( obj_id, bonobo_object_corba_objref (bonobo_object (registry))); #ifdef AT_SPI_DEBUG - fprintf (stderr, "Registry Message: Registry daemon is running.\n"); + fprintf (stderr, "SpiRegistry Message: SpiRegistry daemon is running.\n"); #endif gdk_init(&argc, &argv); g_timeout_add_full (G_PRIORITY_HIGH_IDLE, 200, registry->kbd_event_hook, registry, NULL); /* keyevent_source = g_source_new (registry->kbd_event_hook, sizeof (GSourceFunc)); - g_source_attach (keyevent_source, g_main_context_default());*/ + g_source_attach (keyevent_source, g_main_conspi_text_default());*/ bonobo_main (); return 0; diff --git a/test/app.c b/test/app.c index c4d29f4..8d1ecb7 100644 --- a/test/app.c +++ b/test/app.c @@ -40,10 +40,10 @@ main(int argc, char **argv) char *obj_id; char sbuf[APP_STATIC_BUFF_SZ]; - Accessibility_Registry registry; + Accessibility_SpiRegistry registry; Accessibility_Event e; - Accessible *accessible; - Application *app; + SpiAccessible *accessible; + SpiApplication *app; CORBA_exception_init(&ev); @@ -58,16 +58,16 @@ main(int argc, char **argv) atko = g_object_new (atk_object_get_type(), NULL); atk_object_set_name (atko, sbuf); atk_object_set_description( atko, "test application for accessibility SPI"); - app = application_new(atko); + app = spi_application_new(atko); - /* Create the Accessible 'source' for the event */ - accessible = accessible_new (atko); + /* Create the SpiAccessible 'source' for the event */ + accessible = spi_accessible_new (atko); fprintf(stderr, "accessible created.\n"); e.source = bonobo_object_corba_objref ( bonobo_object (accessible)); e.type = CORBA_string_dup ("focus:"); - obj_id = "OAFIID:Accessibility_Registry:proto0.1"; + obj_id = "OAFIID:Accessibility_SpiRegistry:proto0.1"; oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { @@ -83,14 +83,14 @@ main(int argc, char **argv) g_error ("Could not locate registry"); } - registry = (Accessibility_Registry) oclient; + registry = (Accessibility_SpiRegistry) oclient; - Accessibility_Registry_registerApplication (registry, + Accessibility_SpiRegistry_registerSpiApplication (registry, bonobo_object_corba_objref (bonobo_object (app)), &ev); - fprintf(stderr, "registerApplication has been called.\n"); + fprintf(stderr, "registerSpiApplication has been called.\n"); - Accessibility_Registry_notifyEvent (registry, &e, &ev); + Accessibility_SpiRegistry_notifyEvent (registry, &e, &ev); fprintf (stderr, "notify event has been called.\n"); bonobo_main (); /* needed when app becomes a server ? */ diff --git a/test/at.c b/test/at.c index b4a555e..2e9a6fd 100644 --- a/test/at.c +++ b/test/at.c @@ -50,11 +50,11 @@ main(int argc, char **argv) CORBA_short n_desktops; CORBA_long j; CORBA_long n_apps; - Accessibility_Desktop desktop; - Accessibility_Application app; + Accessibility_SpiDesktop desktop; + Accessibility_SpiApplication app; - Accessibility_Registry registry; - Listener *listener; + Accessibility_SpiRegistry registry; + SpiListener *listener; CORBA_exception_init(&ev); @@ -63,7 +63,7 @@ main(int argc, char **argv) g_error ("Could not initialize Bonobo"); } - obj_id = "OAFIID:Accessibility_Registry:proto0.1"; + obj_id = "OAFIID:Accessibility_SpiRegistry:proto0.1"; oclient = bonobo_activation_activate_from_id (obj_id, 0, NULL, &ev); if (ev._major != CORBA_NO_EXCEPTION) { @@ -81,18 +81,18 @@ main(int argc, char **argv) bonobo_activate (); - listener = listener_new (); + listener = spi_listener_new (); - registry = (Accessibility_Registry) oclient; + registry = (Accessibility_SpiRegistry) oclient; - Accessibility_Registry_registerGlobalEventListener + Accessibility_SpiRegistry_registerGlobalEventListener (registry, (Accessibility_EventListener) bonobo_object_corba_objref (bonobo_object (listener)), "focus:", &ev); check_ev (&ev, "register:focus"); - Accessibility_Registry_registerGlobalEventListener + Accessibility_SpiRegistry_registerGlobalEventListener (registry, (Accessibility_EventListener) bonobo_object_corba_objref (bonobo_object (listener)), @@ -101,23 +101,23 @@ main(int argc, char **argv) check_ev (&ev, "register:button_press"); fprintf (stderr, "AT callback registered.\n"); - n_desktops = Accessibility_Registry_getDesktopCount (registry, &ev); + n_desktops = Accessibility_SpiRegistry_getDesktopCount (registry, &ev); for (i=0; i 1) && (!strncmp(argv[1],"-h",2))) { @@ -73,13 +73,13 @@ main(int argc, char **argv) for (i=0; itype, - Accessible_getName (&ev->source)); + SpiAccessible_getName (&ev->source)); report_focussed_accessible (&ev->source, TRUE); } void report_button_press (void *p) { - AccessibleEvent *ev = (AccessibleEvent *) p; + SpiAccessibleEvent *ev = (SpiAccessibleEvent *) p; fprintf (stderr, "%s event from %s\n", ev->type, - Accessible_getName (&ev->source)); + SpiAccessible_getName (&ev->source)); } void check_property_change (void *p) { - AccessibleEvent *ev = (AccessibleEvent *) p; - AccessibleSelection *selection = Accessible_getSelection (&ev->source); + SpiAccessibleEvent *ev = (SpiAccessibleEvent *) p; + SpiAccessibleSelection *selection = SpiAccessible_getSelection (&ev->source); int n_selections; int i; if (selection) { - n_selections = (int) AccessibleSelection_getNSelectedChildren (selection); + n_selections = (int) SpiAccessibleSelection_getNSelectedChildren (selection); fprintf (stderr, "(Property) %s event from %s, %d selected children\n", ev->type, - Accessible_getName (&ev->source), n_selections); + SpiAccessible_getName (&ev->source), n_selections); /* for now, speak entire selection set */ for (i=0; isource_display,image_root_window, + XQueryPointer(mag_data->source_display,spi_image_root_window, &root_return,&child_return, &mag_data->center.x,&mag_data->center.y, &win_x_return,&win_y_return,&mask_return); @@ -174,7 +174,7 @@ void update_image(MagnifierData *mag_data) old_factor_x = mag_data->factor_x; old_factor_y = mag_data->factor_y; } - get_root_image(image_root_window, + get_root_image(spi_image_root_window, image, x, y, @@ -187,7 +187,7 @@ void expose_event(GtkWidget * w, GdkEventExpose *event, gpointer data){ -/* Image grabbing and convertion routines from gdk-pixbuf-xlib */ +/* SpiImage grabbing and convertion routines from gdk-pixbuf-xlib */ /* convert 1 bits-pixel data no alpha @@ -1188,7 +1188,7 @@ void get_root_image(Window src, GdkPixbuf *dest, int src_x, int src_y, Magnifier int width = mag_data->mag_width/mag_data->factor_x; int height = mag_data->mag_height/mag_data->factor_y; - /* Get Image in ZPixmap format (packed bits). */ + /* Get SpiImage in ZPixmap format (packed bits). */ image = XGetImage (mag_data->source_display, src, src_x, src_y, width, height, AllPlanes, ZPixmap); g_assert(image != NULL); diff --git a/util/mag_image.h b/util/mag_image.h index 624aab0..122f8d3 100644 --- a/util/mag_image.h +++ b/util/mag_image.h @@ -1,5 +1,5 @@ -#ifndef __MAGNIFIER_IMAGE_H__ -#define __MAGNIFIER_IMAGE_H__ +#ifndef __MAGNIFIER_SPI_IMAGE_H__ +#define __MAGNIFIER_SPI_IMAGE_H__ #include #include #include @@ -33,7 +33,7 @@ point center_position; point curpos; /* Position of the magnified cursor */ GdkPixbuf* image; GdkPixbuf* scaled_image; -Window image_root_window; +Window spi_image_root_window; int screen_num; int old_factor_x; int old_factor_y; diff --git a/util/magnifier.c b/util/magnifier.c index 506848f..94a0889 100644 --- a/util/magnifier.c +++ b/util/magnifier.c @@ -182,7 +182,7 @@ int main (int argc, char** argv){ magnifier->mag_data->source_display = XOpenDisplay (global_options.source_display); magnifier->mag_data->target_display = GDK_DISPLAY(); - image_root_window = RootWindow(magnifier->mag_data->source_display, screen_num); + spi_image_root_window = RootWindow(magnifier->mag_data->source_display, screen_num); gdk_pixbuf_xlib_init (magnifier->mag_data->source_display, screen_num); image = gdk_pixbuf_new (GDK_COLORSPACE_RGB,FALSE, 8, DisplayWidth (magnifier->mag_data->source_display,screen_num)/2, -- 2.7.4