From: billh Date: Wed, 12 Dec 2001 18:23:02 +0000 (+0000) Subject: Add namespacing to un-namespaced methods in cspi. X-Git-Tag: AT_SPI2_CORE_0_1_3~1004 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2e4455a1f174f2900ea63b59e9488416e47e32a;p=platform%2Fupstream%2Fat-spi2-core.git Add namespacing to un-namespaced methods in cspi. Add documentation and revise to reflect the API change. Expand the enumerations for AccessibleRole. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@184 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/ChangeLog b/ChangeLog index bee084c..97bc9da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,21 @@ 2001-12-12 Bill Haneman + * cspi/spi.h: + * cspi/spi_registry.c: + * cspi/spi_event.c: + Namespaced all methods that did not begin with an "SPI_" or + "Accessible" prefix to "SPI_". + + * cspi/spi_main.c: + Homogenized internal function namespace to "cspi_" for statics. + + * test/*.c: + Patched tests to use the new CSPI API. + + * docs/reference/cspi/at-spi-cspi-sections.txt: + Updated docs to reflect namespace changes, and added a number of + methods to the documentation. + * registryd/registry.c: Changed use of strings and string hashes in listener event matching and parse_event_string to use GQuark, which is guaranteed diff --git a/cspi/spi.h b/cspi/spi.h index 20ca00d..82131bd 100644 --- a/cspi/spi.h +++ b/cspi/spi.h @@ -137,53 +137,61 @@ int SPI_exit (void); /* Event Listener creation and support. */ -AccessibleEventListener * - createAccessibleEventListener (AccessibleEventListenerCB callback, +AccessibleEventListener * SPI_createAccessibleEventListener ( + AccessibleEventListenerCB callback, void *user_data); -SPIBoolean AccessibleEventListener_addCallback (AccessibleEventListener *listener, +SPIBoolean AccessibleEventListener_addCallback ( + AccessibleEventListener *listener, AccessibleEventListenerCB callback, void *user_data); -SPIBoolean AccessibleEventListener_removeCallback (AccessibleEventListener *listener, +SPIBoolean AccessibleEventListener_removeCallback ( + AccessibleEventListener *listener, AccessibleEventListenerCB callback); -void AccessibleEventListener_unref (AccessibleEventListener *listener); +void AccessibleEventListener_unref ( + AccessibleEventListener *listener); /* Keystroke Listener creation and support. */ -AccessibleKeystrokeListener * - createAccessibleKeystrokeListener (AccessibleKeystrokeListenerCB callback, - void *user_data); -SPIBoolean AccessibleKeystrokeListener_addCallback (AccessibleKeystrokeListener *listener, - AccessibleKeystrokeListenerCB callback, - void *user_data); -SPIBoolean AccessibleKeystrokeListener_removeCallback (AccessibleKeystrokeListener *listener, - AccessibleKeystrokeListenerCB callback); -void AccessibleKeystrokeListener_unref (AccessibleKeystrokeListener *listener); +AccessibleKeystrokeListener * SPI_createAccessibleKeystrokeListener ( + AccessibleKeystrokeListenerCB callback, + void *user_data); +SPIBoolean AccessibleKeystrokeListener_addCallback ( + AccessibleKeystrokeListener *listener, + AccessibleKeystrokeListenerCB callback, + void *user_data); +SPIBoolean AccessibleKeystrokeListener_removeCallback ( + AccessibleKeystrokeListener *listener, + AccessibleKeystrokeListenerCB callback); +void AccessibleKeystrokeListener_unref ( + AccessibleKeystrokeListener *listener); /* Global functions serviced by the registry */ -SPIBoolean registerGlobalEventListener (AccessibleEventListener *listener, - const char *eventType); -SPIBoolean deregisterGlobalEventListener (AccessibleEventListener *listener, - const char *eventType); -SPIBoolean deregisterGlobalEventListenerAll (AccessibleEventListener *listener); - -SPIBoolean registerAccessibleKeystrokeListener ( - AccessibleKeystrokeListener *listener, - AccessibleKeySet *keys, - AccessibleKeyMaskType modmask, - AccessibleKeyEventMask eventmask, - AccessibleKeyListenerSyncType sync_type); -SPIBoolean deregisterAccessibleKeystrokeListener ( - AccessibleKeystrokeListener *listener, - AccessibleKeyMaskType modmask); - -int getDesktopCount (void); -Accessible *getDesktop (int i); -int getDesktopList (Accessible **list); - -SPIBoolean generateKeyEvent (long int keyval, - AccessibleKeySynthType synth_type); -SPIBoolean generateMouseEvent (long int x, long int y, char *name); +SPIBoolean SPI_registerGlobalEventListener ( + AccessibleEventListener *listener, + const char *eventType); +SPIBoolean SPI_deregisterGlobalEventListener ( + AccessibleEventListener *listener, + const char *eventType); +SPIBoolean SPI_deregisterGlobalEventListenerAll ( + AccessibleEventListener *listener); +SPIBoolean SPI_registerAccessibleKeystrokeListener ( + AccessibleKeystrokeListener *listener, + AccessibleKeySet *keys, + AccessibleKeyMaskType modmask, + AccessibleKeyEventMask eventmask, + AccessibleKeyListenerSyncType sync_type); +SPIBoolean SPI_deregisterAccessibleKeystrokeListener ( + AccessibleKeystrokeListener *listener, + AccessibleKeyMaskType modmask); + +int SPI_getDesktopCount (void); +Accessible *SPI_getDesktop (int i); +int SPI_getDesktopList (Accessible **list); + +SPIBoolean SPI_generateKeyEvent (long int keyval, + AccessibleKeySynthType synth_type); +SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name); /* Accessible function prototypes */ diff --git a/cspi/spi_event.c b/cspi/spi_event.c index c1adea8..6fc82c6 100644 --- a/cspi/spi_event.c +++ b/cspi/spi_event.c @@ -23,7 +23,7 @@ #include /** - * createAccessibleEventListener: + * SPI_createAccessibleEventListener: * @callback : an #AccessibleEventListenerCB callback function, or NULL. * @user_data: a pointer to data which will be passed to the callback when invoked. * @@ -33,8 +33,8 @@ * **/ AccessibleEventListener * -createAccessibleEventListener (AccessibleEventListenerCB callback, - void *user_data) +SPI_createAccessibleEventListener (AccessibleEventListenerCB callback, + void *user_data) { AccessibleEventListener *listener = cspi_event_listener_new (); if (callback) @@ -110,8 +110,8 @@ AccessibleEventListener_removeCallback (AccessibleEventListener *listener, * **/ AccessibleKeystrokeListener * -createAccessibleKeystrokeListener (AccessibleKeystrokeListenerCB callback, - void *user_data) +SPI_createAccessibleKeystrokeListener (AccessibleKeystrokeListenerCB callback, + void *user_data) { AccessibleKeystrokeListener *listener = cspi_keystroke_listener_new (); if (callback) diff --git a/cspi/spi_main.c b/cspi/spi_main.c index f5cde18..ad9bd7b 100644 --- a/cspi/spi_main.c +++ b/cspi/spi_main.c @@ -14,7 +14,7 @@ static Accessibility_Registry registry = CORBA_OBJECT_NIL; static GHashTable *live_refs = NULL; static guint -spi_object_hash (gconstpointer key) +cspi_object_hash (gconstpointer key) { CORBA_Object object = (CORBA_Object) key; guint retval; @@ -25,7 +25,7 @@ spi_object_hash (gconstpointer key) } static gboolean -spi_object_equal (gconstpointer a, gconstpointer b) +cspi_object_equal (gconstpointer a, gconstpointer b) { CORBA_Object objecta = (CORBA_Object) a; CORBA_Object objectb = (CORBA_Object) b; @@ -37,7 +37,7 @@ spi_object_equal (gconstpointer a, gconstpointer b) } static void -spi_object_release (gpointer value) +cspi_object_release (gpointer value) { Accessible *a = (Accessible *) value; @@ -91,14 +91,14 @@ cspi_accessible_is_a (Accessible *obj, } static GHashTable * -get_live_refs (void) +cspi_get_live_refs (void) { if (!live_refs) { - live_refs = g_hash_table_new_full (spi_object_hash, - spi_object_equal, + live_refs = g_hash_table_new_full (cspi_object_hash, + cspi_object_equal, NULL, - spi_object_release); + cspi_object_release); } return live_refs; } @@ -149,7 +149,7 @@ cspi_object_add (CORBA_Object corba_object) } else { - if ((ref = g_hash_table_lookup (get_live_refs (), corba_object))) + if ((ref = g_hash_table_lookup (cspi_get_live_refs (), corba_object))) { g_assert (ref->ref_count > 0); ref->ref_count++; @@ -169,7 +169,7 @@ cspi_object_add (CORBA_Object corba_object) ref->objref = corba_object; ref->ref_count = 1; - g_hash_table_insert (get_live_refs (), ref->objref, ref); + g_hash_table_insert (cspi_get_live_refs (), ref->objref, ref); } } @@ -194,7 +194,7 @@ cspi_object_unref (Accessible *accessible) if (--accessible->ref_count == 0) { - g_hash_table_remove (get_live_refs (), accessible->objref); + g_hash_table_remove (cspi_get_live_refs (), accessible->objref); } } diff --git a/cspi/spi_registry.c b/cspi/spi_registry.c index 17b7b36..aae9358 100644 --- a/cspi/spi_registry.c +++ b/cspi/spi_registry.c @@ -25,7 +25,7 @@ #include /** - * registerGlobalEventListener: + * SPI_registerGlobalEventListener: * @listener: the #AccessibleEventListener to be registered against an * event type. * @eventType: a character string indicating the type of events for which @@ -81,8 +81,8 @@ * Returns: #TRUE if successful, otherwise #FALSE. **/ SPIBoolean -registerGlobalEventListener (AccessibleEventListener *listener, - const char *eventType) +SPI_registerGlobalEventListener (AccessibleEventListener *listener, + const char *eventType) { SPIBoolean retval; @@ -102,7 +102,7 @@ registerGlobalEventListener (AccessibleEventListener *listener, } /** - * deregisterGlobalEventListenerAll: + * SPI_deregisterGlobalEventListenerAll: * @listener: the #AccessibleEventListener to be registered against * an event type. * @@ -114,7 +114,7 @@ registerGlobalEventListener (AccessibleEventListener *listener, * Returns: #TRUE if successful, otherwise #FALSE. **/ SPIBoolean -deregisterGlobalEventListenerAll (AccessibleEventListener *listener) +SPI_deregisterGlobalEventListenerAll (AccessibleEventListener *listener) { if (!listener) { @@ -130,7 +130,7 @@ deregisterGlobalEventListenerAll (AccessibleEventListener *listener) } /** - * deregisterGlobalEventListener: + * SPI_deregisterGlobalEventListener: * @listener: the #AccessibleEventListener registered against an event type. * @eventType: a string specifying the event type for which this * listener is to be deregistered. @@ -141,8 +141,8 @@ deregisterGlobalEventListenerAll (AccessibleEventListener *listener) * Returns: #TRUE if successful, otherwise #FALSE. **/ SPIBoolean -deregisterGlobalEventListener (AccessibleEventListener *listener, - const char *eventType) +SPI_deregisterGlobalEventListener (AccessibleEventListener *listener, + const char *eventType) { if (!listener) { @@ -158,7 +158,7 @@ deregisterGlobalEventListener (AccessibleEventListener *listener, } /** - * getDesktopCount: + * SPI_getDesktopCount: * * Get the number of virtual desktops. * NOTE: currently multiple virtual desktops are not implemented, this @@ -167,7 +167,7 @@ deregisterGlobalEventListener (AccessibleEventListener *listener, * Returns: an integer indicating the number of active virtual desktops. **/ int -getDesktopCount () +SPI_getDesktopCount () { int retval; @@ -180,7 +180,7 @@ getDesktopCount () } /** - * getDesktop: + * SPI_getDesktop: * @i: an integer indicating which of the accessible desktops is to be returned. * * Get the virtual desktop indicated by index @i. @@ -190,7 +190,7 @@ getDesktopCount () * Returns: a pointer to the 'i-th' virtual desktop's #Accessible representation. **/ Accessible* -getDesktop (int i) +SPI_getDesktop (int i) { return cspi_object_add ( Accessibility_Registry_getDesktop ( @@ -198,7 +198,7 @@ getDesktop (int i) } /** - * getDesktopList: + * SPI_getDesktopList: * @list: a pointer to an array of #Accessible objects. * * Get the list of virtual desktops. On return, @list will point @@ -213,14 +213,14 @@ getDesktop (int i) * placed in the list pointed to by parameter @list. **/ int -getDesktopList (Accessible **list) +SPI_getDesktopList (Accessible **list) { *list = NULL; return 0; } /** - * registerAccessibleKeystrokeListener: + * SPI_registerAccessibleKeystrokeListener: * @listener: a pointer to the #AccessibleKeystrokeListener for which * keystroke events are requested. * @keys: a pointer to the #AccessibleKeySet indicating which @@ -244,11 +244,11 @@ getDesktopList (Accessible **list) * Returns: #TRUE if successful, otherwise #FALSE. **/ SPIBoolean -registerAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener, - AccessibleKeySet *keys, - AccessibleKeyMaskType modmask, - AccessibleKeyEventMask eventmask, - AccessibleKeyListenerSyncType sync_type) +SPI_registerAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener, + AccessibleKeySet *keys, + AccessibleKeyMaskType modmask, + AccessibleKeyEventMask eventmask, + AccessibleKeyListenerSyncType sync_type) { gint i, mask; Accessibility_KeySet key_set; @@ -328,7 +328,7 @@ registerAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener, } /** - * deregisterAccessibleKeystrokeListener: + * SPI_deregisterAccessibleKeystrokeListener: * @listener: a pointer to the #AccessibleKeystrokeListener for which * keystroke events are requested. * @modmask: the key modifier mask for which this listener is to be @@ -340,8 +340,8 @@ registerAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener, * Returns: #TRUE if successful, otherwise #FALSE. **/ SPIBoolean -deregisterAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener, - AccessibleKeyMaskType modmask) +SPI_deregisterAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener, + AccessibleKeyMaskType modmask) { Accessibility_ControllerEventMask controller_event_mask; Accessibility_KeySet key_set; @@ -382,7 +382,7 @@ deregisterAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener, } /** - * generateKeyEvent: + * SPI_generateKeyEvent: * @keyval: a long integer indicating the keycode or keysym of the key event * being synthesized. * @synth_type: a #AccessibleKeySynthType flag indicating whether @keyval @@ -396,7 +396,7 @@ deregisterAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener, * Returns: #TRUE if successful, otherwise #FALSE. **/ SPIBoolean -generateKeyEvent (long int keyval, AccessibleKeySynthType synth_type) +SPI_generateKeyEvent (long int keyval, AccessibleKeySynthType synth_type) { /* TODO: check current modifier status and * send keycode to alter, if necessary @@ -417,7 +417,7 @@ generateKeyEvent (long int keyval, AccessibleKeySynthType synth_type) } /** - * generateMouseEvent: + * SPI_generateMouseEvent: * @x: a #long indicating the screen x coordinate of the mouse event. * @y: a #long indicating the screen y coordinate of the mouse event. * @name: a string indicating which mouse event to be synthesized @@ -431,7 +431,7 @@ generateKeyEvent (long int keyval, AccessibleKeySynthType synth_type) * Returns: #TRUE if successful, otherwise #FALSE. **/ SPIBoolean -generateMouseEvent (long x, long y, char *name) +SPI_generateMouseEvent (long x, long y, char *name) { return FALSE; } diff --git a/cspi/spi_table.c b/cspi/spi_table.c index 62b4b53..da14c99 100644 --- a/cspi/spi_table.c +++ b/cspi/spi_table.c @@ -398,7 +398,7 @@ AccessibleTable_getNSelectedRows (AccessibleTable *obj) } static long -long_seq_to_array (Accessibility_LongSeq *seq, long int **array) +cspi_long_seq_to_array (Accessibility_LongSeq *seq, long int **array) { long *j, length, i; @@ -444,7 +444,7 @@ AccessibleTable_getSelectedRows (AccessibleTable *obj, rows = Accessibility_Table_getSelectedRows (CSPI_OBJREF (obj), cspi_ev ()); - return long_seq_to_array (rows, selectedRows); + return cspi_long_seq_to_array (rows, selectedRows); } /** @@ -494,7 +494,7 @@ AccessibleTable_getSelectedColumns (AccessibleTable *obj, columns = Accessibility_Table_getSelectedColumns (CSPI_OBJREF (obj), cspi_ev ()); - return long_seq_to_array (columns, selectedColumns); + return cspi_long_seq_to_array (columns, selectedColumns); } /** diff --git a/docs/reference/cspi/at-spi-cspi-sections.txt b/docs/reference/cspi/at-spi-cspi-sections.txt index bac26c6..14300de 100644 --- a/docs/reference/cspi/at-spi-cspi-sections.txt +++ b/docs/reference/cspi/at-spi-cspi-sections.txt @@ -3,6 +3,7 @@ SPI main loop and initialization SPI_init SPI_event_main +SPI_event_quit SPI_eventIsReady SPI_nextEvent SPI_exit @@ -15,7 +16,9 @@ SPI_freeString Event Listener Support AccessibleEvent AccessibleEventListenerCB -createAccessibleEventListener +SPI_createAccessibleEventListener +AccessibleEventListener_ref +AccessibleEventListener_unref AccessibleEventListener_addCallback AccessibleEventListener_removeCallback @@ -24,25 +27,28 @@ AccessibleEventListener_removeCallback spi_registry Registry queries AccessibleKeySynthType -getDesktopCount -getDesktop -getDesktopList +SPI_getDesktopCount +SPI_getDesktop +SPI_getDesktopList AccessibleKeystrokeListenerCB AccessibleKeyEventMask AccessibleKeyMaskType AccessibleKeyEventType AccessibleKeyListenerSyncType -createAccessibleKeystrokeListener -registerGlobalEventListener -deregisterGlobalEventListener -deregisterGlobalEventListenerAll -registerAccessibleKeystrokeListener -deregisterAccessibleKeystrokeListener +AccessibleKeystroke +SPI_createAccessibleKeystrokeListener +SPI_registerGlobalEventListener +SPI_deregisterGlobalEventListener +SPI_deregisterGlobalEventListenerAll +SPI_registerAccessibleKeystrokeListener +SPI_deregisterAccessibleKeystrokeListener +AccessibleKeystrokeListener_ref +AccessibleKeystrokeListener_unref AccessibleKeystrokeListener_removeCallback AccessibleKeystrokeListener_addCallback -generateKeyEvent -generateMouseEvent +SPI_generateKeyEvent +SPI_generateMouseEvent
@@ -58,9 +64,11 @@ Accessible_getChildAtIndex Accessible_getIndexInParent Accessible_getRelationSet Accessible_getRole +Accessible_getRoleName Accessible_getStateSet Accessible_isAction +Accessible_isApplication Accessible_isComponent Accessible_isEditableText Accessible_isHypertext @@ -68,7 +76,9 @@ Accessible_isImage Accessible_isSelection Accessible_isTable Accessible_isText +Accessible_isValue Accessible_getAction +Accessible_getApplication Accessible_getComponent Accessible_getEditableText Accessible_getHypertext @@ -76,6 +86,7 @@ Accessible_getImage Accessible_getSelection Accessible_getTable Accessible_getText +Accessible_getValue Accessible_queryInterface AccessibleRole @@ -110,6 +121,7 @@ AccessibleAction_getDescription spi_component AccessibleComponent Interface AccessibleCoordType +AccessibleComponentLayer AccessibleComponent_ref AccessibleComponent_unref AccessibleComponent_contains @@ -236,6 +248,8 @@ AccessibleValue_setCurrentValue
spi_hyperlink AccessibleHyperlink Interface +AccessibleHyperlink_ref +AccessibleHyperlink_unref AccessibleHyperlink_getNAnchors AccessibleHyperlink_getIndexRange AccessibleHyperlink_getObject @@ -263,6 +277,7 @@ AccessibleStateSet_remove AccessibleRelationType AccessibleRelation_ref AccessibleRelation_unref +AccessibleRelation_getNTargets AccessibleRelation_getTarget AccessibleRelation_getRelationType
diff --git a/docs/reference/cspi/tmpl/spi_accessible.sgml b/docs/reference/cspi/tmpl/spi_accessible.sgml index ad381a3..1fc69f3 100644 --- a/docs/reference/cspi/tmpl/spi_accessible.sgml +++ b/docs/reference/cspi/tmpl/spi_accessible.sgml @@ -107,6 +107,15 @@ Accessible Objects @Returns: + + + + + +@obj: +@Returns: + + @@ -125,6 +134,15 @@ Accessible Objects @Returns: + + + + + +@obj: +@Returns: + + @@ -188,6 +206,15 @@ Accessible Objects @Returns: + + + + + +@obj: +@Returns: + + @@ -197,6 +224,15 @@ Accessible Objects @Returns: + + + + + +@obj: +@Returns: + + @@ -260,6 +296,15 @@ Accessible Objects @Returns: + + + + + +@obj: +@Returns: + + diff --git a/docs/reference/cspi/tmpl/spi_component.sgml b/docs/reference/cspi/tmpl/spi_component.sgml index a8a87fb..b6a1372 100644 --- a/docs/reference/cspi/tmpl/spi_component.sgml +++ b/docs/reference/cspi/tmpl/spi_component.sgml @@ -22,6 +22,20 @@ AccessibleComponent Interface @SPI_COORD_TYPE_SCREEN: @SPI_COORD_TYPE_WINDOW: + + + + + +@SPI_LAYER_INVALID: +@SPI_LAYER_BACKGROUND: +@SPI_LAYER_CANVAS: +@SPI_LAYER_WIDGET: +@SPI_LAYER_MDI: +@SPI_LAYER_POPUP: +@SPI_LAYER_OVERLAY: +@SPI_LAYER_LAST_DEFINED: + diff --git a/docs/reference/cspi/tmpl/spi_event.sgml b/docs/reference/cspi/tmpl/spi_event.sgml index 530b357..e412be5 100644 --- a/docs/reference/cspi/tmpl/spi_event.sgml +++ b/docs/reference/cspi/tmpl/spi_event.sgml @@ -29,7 +29,7 @@ Event Listener Support @user_data: - + @@ -39,6 +39,14 @@ Event Listener Support @Returns: + + + + + +@listener: + + diff --git a/docs/reference/cspi/tmpl/spi_hyperlink.sgml b/docs/reference/cspi/tmpl/spi_hyperlink.sgml index bb2ef9f..8d03b55 100644 --- a/docs/reference/cspi/tmpl/spi_hyperlink.sgml +++ b/docs/reference/cspi/tmpl/spi_hyperlink.sgml @@ -14,6 +14,22 @@ AccessibleHyperlink Interface + + + + + +@obj: + + + + + + + +@obj: + + diff --git a/docs/reference/cspi/tmpl/spi_main.sgml b/docs/reference/cspi/tmpl/spi_main.sgml index 60dadac..f3b7253 100644 --- a/docs/reference/cspi/tmpl/spi_main.sgml +++ b/docs/reference/cspi/tmpl/spi_main.sgml @@ -33,6 +33,13 @@ SPI main loop and initialization @isGNOMEApp: + + + + + + + diff --git a/docs/reference/cspi/tmpl/spi_registry.sgml b/docs/reference/cspi/tmpl/spi_registry.sgml index 4daa02e..3b68712 100644 --- a/docs/reference/cspi/tmpl/spi_registry.sgml +++ b/docs/reference/cspi/tmpl/spi_registry.sgml @@ -24,7 +24,7 @@ Registry queries @SPI_KEY_PRESSRELEASE: @SPI_KEY_SYM: - + @@ -32,7 +32,7 @@ Registry queries @Returns: - + @@ -41,7 +41,7 @@ Registry queries @Returns: - + @@ -90,7 +90,13 @@ Registry queries @SPI_KEYLISTENER_CANCONSUME: @SPI_KEYLISTENER_ALL_WINDOWS: - + + + + + + + @@ -100,7 +106,7 @@ Registry queries @Returns: - + @@ -110,7 +116,7 @@ Registry queries @Returns: - + @@ -120,7 +126,7 @@ Registry queries @Returns: - + @@ -129,7 +135,7 @@ Registry queries @Returns: - + @@ -142,7 +148,7 @@ Registry queries @Returns: - + @@ -152,6 +158,14 @@ Registry queries @Returns: + + + + + +@listener: + + @@ -173,7 +187,7 @@ Registry queries @Returns: - + @@ -183,7 +197,7 @@ Registry queries @Returns: - + diff --git a/docs/reference/cspi/tmpl/spi_relation.sgml b/docs/reference/cspi/tmpl/spi_relation.sgml index f7459e7..fcf6eff 100644 --- a/docs/reference/cspi/tmpl/spi_relation.sgml +++ b/docs/reference/cspi/tmpl/spi_relation.sgml @@ -45,6 +45,15 @@ AccessibleRelations and RelationSets @Returns: + + + + + +@obj: +@Returns: + + diff --git a/test/keysynth-demo.c b/test/keysynth-demo.c index c2df9ca..c6cb1ee 100644 --- a/test/keysynth-demo.c +++ b/test/keysynth-demo.c @@ -280,11 +280,11 @@ toggle_shift_latch (GtkButton *button) static void keysynth_exit (void) { - deregisterAccessibleKeystrokeListener (key_listener, SPI_KEYMASK_ALT); - AccessibleKeystrokeListener_unref (key_listener); + SPI_deregisterAccessibleKeystrokeListener (key_listener, SPI_KEYMASK_ALT); + AccessibleKeystrokeListener_unref (key_listener); - deregisterAccessibleKeystrokeListener (switch_listener, SPI_KEYMASK_UNMODIFIED); - AccessibleKeystrokeListener_unref (switch_listener); + SPI_deregisterAccessibleKeystrokeListener (switch_listener, SPI_KEYMASK_UNMODIFIED); + AccessibleKeystrokeListener_unref (switch_listener); SPI_event_quit (); } @@ -367,13 +367,13 @@ synth_keycode (GtkButton *button, KeyCode *keycode) label_buttons (caps_lock || shift_latched); } if (shift_latched) - generateKeyEvent (shift_keycode, SPI_KEY_PRESS); + SPI_generateKeyEvent (shift_keycode, SPI_KEY_PRESS); - generateKeyEvent ((long) *keycode, SPI_KEY_PRESSRELEASE); + SPI_generateKeyEvent ((long) *keycode, SPI_KEY_PRESSRELEASE); if (shift_latched) { - generateKeyEvent (shift_keycode, SPI_KEY_RELEASE); + SPI_generateKeyEvent (shift_keycode, SPI_KEY_RELEASE); toggle_shift_latch (button); } } @@ -474,13 +474,13 @@ main (int argc, char **argv) SPI_init (); - key_listener = createAccessibleKeystrokeListener (is_command_key, NULL); + key_listener = SPI_createAccessibleKeystrokeListener (is_command_key, NULL); /* will listen only to Alt-key combinations */ - registerAccessibleKeystrokeListener (key_listener, - (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS, - SPI_KEYMASK_ALT, - (unsigned long) ( KeyPress | KeyRelease), - SPI_KEYLISTENER_CANCONSUME | SPI_KEYLISTENER_ALL_WINDOWS); + SPI_registerAccessibleKeystrokeListener (key_listener, + (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS, + SPI_KEYMASK_ALT, + (unsigned long) ( KeyPress | KeyRelease), + SPI_KEYLISTENER_CANCONSUME | SPI_KEYLISTENER_ALL_WINDOWS); create_vkbd (); /* @@ -494,12 +494,12 @@ main (int argc, char **argv) switch_set.len = 1; switch_set.keysyms[0] = (unsigned long) 0; switch_set.keycodes[0] = (unsigned short) 0; - switch_listener = createAccessibleKeystrokeListener (switch_callback, NULL); - registerAccessibleKeystrokeListener (switch_listener, - &switch_set, - SPI_KEYMASK_UNMODIFIED, - (unsigned long) ( KeyPress | KeyRelease), - SPI_KEYLISTENER_CANCONSUME); + switch_listener = SPI_createAccessibleKeystrokeListener (switch_callback, NULL); + SPI_registerAccessibleKeystrokeListener (switch_listener, + &switch_set, + SPI_KEYMASK_UNMODIFIED, + (unsigned long) ( KeyPress | KeyRelease), + SPI_KEYLISTENER_CANCONSUME); SPI_event_main (); diff --git a/test/simple-at.c b/test/simple-at.c index 54ca155..1901e68 100644 --- a/test/simple-at.c +++ b/test/simple-at.c @@ -78,24 +78,24 @@ main (int argc, char **argv) SPI_init (); - focus_listener = createAccessibleEventListener (report_focus_event, NULL); - property_listener = createAccessibleEventListener (check_property_change, NULL); - generic_listener = createAccessibleEventListener (report_generic_event, NULL); - button_listener = createAccessibleEventListener (report_button_press, NULL); - registerGlobalEventListener (focus_listener, "focus:"); - registerGlobalEventListener (property_listener, "object:property-change:accessible-selection"); - registerGlobalEventListener (generic_listener, "object:selection-changed"); - registerGlobalEventListener (generic_listener, "object:children-changed"); - registerGlobalEventListener (generic_listener, "object:visible-data-changed"); - registerGlobalEventListener (generic_listener, "object:text-selection-changed"); - registerGlobalEventListener (generic_listener, "object:text-caret-moved"); - registerGlobalEventListener (generic_listener, "object:text-changed"); - registerGlobalEventListener (button_listener, "Gtk:GtkWidget:button-press-event"); - n_desktops = getDesktopCount (); + focus_listener = SPI_createAccessibleEventListener (report_focus_event, NULL); + property_listener = SPI_createAccessibleEventListener (check_property_change, NULL); + generic_listener = SPI_createAccessibleEventListener (report_generic_event, NULL); + button_listener = SPI_createAccessibleEventListener (report_button_press, NULL); + SPI_registerGlobalEventListener (focus_listener, "focus:"); + SPI_registerGlobalEventListener (property_listener, "object:property-change:accessible-selection"); + SPI_registerGlobalEventListener (generic_listener, "object:selection-changed"); + SPI_registerGlobalEventListener (generic_listener, "object:children-changed"); + SPI_registerGlobalEventListener (generic_listener, "object:visible-data-changed"); + SPI_registerGlobalEventListener (generic_listener, "object:text-selection-changed"); + SPI_registerGlobalEventListener (generic_listener, "object:text-caret-moved"); + SPI_registerGlobalEventListener (generic_listener, "object:text-changed"); + SPI_registerGlobalEventListener (button_listener, "Gtk:GtkWidget:button-press-event"); + n_desktops = SPI_getDesktopCount (); for (i=0; i