2001-12-12 Bill Haneman <bill.haneman@sun.com>
+ * 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
/* 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 */
#include <cspi/spi-private.h>
/**
- * 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.
*
*
**/
AccessibleEventListener *
-createAccessibleEventListener (AccessibleEventListenerCB callback,
- void *user_data)
+SPI_createAccessibleEventListener (AccessibleEventListenerCB callback,
+ void *user_data)
{
AccessibleEventListener *listener = cspi_event_listener_new ();
if (callback)
*
**/
AccessibleKeystrokeListener *
-createAccessibleKeystrokeListener (AccessibleKeystrokeListenerCB callback,
- void *user_data)
+SPI_createAccessibleKeystrokeListener (AccessibleKeystrokeListenerCB callback,
+ void *user_data)
{
AccessibleKeystrokeListener *listener = cspi_keystroke_listener_new ();
if (callback)
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;
}
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;
}
static void
-spi_object_release (gpointer value)
+cspi_object_release (gpointer value)
{
Accessible *a = (Accessible *) value;
}
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;
}
}
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++;
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);
}
}
if (--accessible->ref_count == 0)
{
- g_hash_table_remove (get_live_refs (), accessible->objref);
+ g_hash_table_remove (cspi_get_live_refs (), accessible->objref);
}
}
#include <cspi/spi-private.h>
/**
- * registerGlobalEventListener:
+ * SPI_registerGlobalEventListener:
* @listener: the #AccessibleEventListener to be registered against an
* event type.
* @eventType: a character string indicating the type of events for which
* Returns: #TRUE if successful, otherwise #FALSE.
**/
SPIBoolean
-registerGlobalEventListener (AccessibleEventListener *listener,
- const char *eventType)
+SPI_registerGlobalEventListener (AccessibleEventListener *listener,
+ const char *eventType)
{
SPIBoolean retval;
}
/**
- * deregisterGlobalEventListenerAll:
+ * SPI_deregisterGlobalEventListenerAll:
* @listener: the #AccessibleEventListener to be registered against
* an event type.
*
* Returns: #TRUE if successful, otherwise #FALSE.
**/
SPIBoolean
-deregisterGlobalEventListenerAll (AccessibleEventListener *listener)
+SPI_deregisterGlobalEventListenerAll (AccessibleEventListener *listener)
{
if (!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.
* Returns: #TRUE if successful, otherwise #FALSE.
**/
SPIBoolean
-deregisterGlobalEventListener (AccessibleEventListener *listener,
- const char *eventType)
+SPI_deregisterGlobalEventListener (AccessibleEventListener *listener,
+ const char *eventType)
{
if (!listener)
{
}
/**
- * getDesktopCount:
+ * SPI_getDesktopCount:
*
* Get the number of virtual desktops.
* NOTE: currently multiple virtual desktops are not implemented, this
* Returns: an integer indicating the number of active virtual desktops.
**/
int
-getDesktopCount ()
+SPI_getDesktopCount ()
{
int retval;
}
/**
- * getDesktop:
+ * SPI_getDesktop:
* @i: an integer indicating which of the accessible desktops is to be returned.
*
* Get the virtual desktop indicated by index @i.
* 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 (
}
/**
- * getDesktopList:
+ * SPI_getDesktopList:
* @list: a pointer to an array of #Accessible objects.
*
* Get the list of virtual desktops. On return, @list will point
* 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
* 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;
}
/**
- * 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
* 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;
}
/**
- * 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
* 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
}
/**
- * 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
* Returns: #TRUE if successful, otherwise #FALSE.
**/
SPIBoolean
-generateMouseEvent (long x, long y, char *name)
+SPI_generateMouseEvent (long x, long y, char *name)
{
return FALSE;
}
}
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;
rows = Accessibility_Table_getSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
- return long_seq_to_array (rows, selectedRows);
+ return cspi_long_seq_to_array (rows, selectedRows);
}
/**
columns = Accessibility_Table_getSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
- return long_seq_to_array (columns, selectedColumns);
+ return cspi_long_seq_to_array (columns, selectedColumns);
}
/**
<TITLE>SPI main loop and initialization</TITLE>
SPI_init
SPI_event_main
+SPI_event_quit
SPI_eventIsReady
SPI_nextEvent
SPI_exit
<TITLE>Event Listener Support</TITLE>
AccessibleEvent
AccessibleEventListenerCB
-createAccessibleEventListener
+SPI_createAccessibleEventListener
+AccessibleEventListener_ref
+AccessibleEventListener_unref
AccessibleEventListener_addCallback
AccessibleEventListener_removeCallback
</SECTION>
<FILE>spi_registry</FILE>
<TITLE>Registry queries</TITLE>
AccessibleKeySynthType
-getDesktopCount
-getDesktop
-getDesktopList
+SPI_getDesktopCount
+SPI_getDesktop
+SPI_getDesktopList
<SUBSECTION Event Registration>
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
</SECTION>
<SECTION>
Accessible_getIndexInParent
Accessible_getRelationSet
Accessible_getRole
+Accessible_getRoleName
Accessible_getStateSet
<SUBSECTION Interface Queries>
Accessible_isAction
+Accessible_isApplication
Accessible_isComponent
Accessible_isEditableText
Accessible_isHypertext
Accessible_isSelection
Accessible_isTable
Accessible_isText
+Accessible_isValue
Accessible_getAction
+Accessible_getApplication
Accessible_getComponent
Accessible_getEditableText
Accessible_getHypertext
Accessible_getSelection
Accessible_getTable
Accessible_getText
+Accessible_getValue
Accessible_queryInterface
<SUBSECTION Auxiliary types>
AccessibleRole
<FILE>spi_component</FILE>
<TITLE>AccessibleComponent Interface</TITLE>
AccessibleCoordType
+AccessibleComponentLayer
AccessibleComponent_ref
AccessibleComponent_unref
AccessibleComponent_contains
<SECTION>
<FILE>spi_hyperlink</FILE>
<TITLE>AccessibleHyperlink Interface</TITLE>
+AccessibleHyperlink_ref
+AccessibleHyperlink_unref
AccessibleHyperlink_getNAnchors
AccessibleHyperlink_getIndexRange
AccessibleHyperlink_getObject
AccessibleRelationType
AccessibleRelation_ref
AccessibleRelation_unref
+AccessibleRelation_getNTargets
AccessibleRelation_getTarget
AccessibleRelation_getRelationType
</SECTION>
@Returns:
+<!-- ##### FUNCTION Accessible_getRoleName ##### -->
+<para>
+
+</para>
+
+@obj:
+@Returns:
+
+
<!-- ##### FUNCTION Accessible_getStateSet ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION Accessible_isApplication ##### -->
+<para>
+
+</para>
+
+@obj:
+@Returns:
+
+
<!-- ##### FUNCTION Accessible_isComponent ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION Accessible_isValue ##### -->
+<para>
+
+</para>
+
+@obj:
+@Returns:
+
+
<!-- ##### FUNCTION Accessible_getAction ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION Accessible_getApplication ##### -->
+<para>
+
+</para>
+
+@obj:
+@Returns:
+
+
<!-- ##### FUNCTION Accessible_getComponent ##### -->
<para>
@Returns:
+<!-- ##### FUNCTION Accessible_getValue ##### -->
+<para>
+
+</para>
+
+@obj:
+@Returns:
+
+
<!-- ##### FUNCTION Accessible_queryInterface ##### -->
<para>
@SPI_COORD_TYPE_SCREEN:
@SPI_COORD_TYPE_WINDOW:
+<!-- ##### ENUM AccessibleComponentLayer ##### -->
+<para>
+
+</para>
+
+@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:
+
<!-- ##### FUNCTION AccessibleComponent_ref ##### -->
<para>
@user_data:
-<!-- ##### FUNCTION createAccessibleEventListener ##### -->
+<!-- ##### FUNCTION SPI_createAccessibleEventListener ##### -->
<para>
</para>
@Returns:
+<!-- ##### FUNCTION AccessibleEventListener_unref ##### -->
+<para>
+
+</para>
+
+@listener:
+
+
<!-- ##### FUNCTION AccessibleEventListener_addCallback ##### -->
<para>
</para>
+<!-- ##### FUNCTION AccessibleHyperlink_ref ##### -->
+<para>
+
+</para>
+
+@obj:
+
+
+<!-- ##### FUNCTION AccessibleHyperlink_unref ##### -->
+<para>
+
+</para>
+
+@obj:
+
+
<!-- ##### FUNCTION AccessibleHyperlink_getNAnchors ##### -->
<para>
@isGNOMEApp:
+<!-- ##### FUNCTION SPI_event_quit ##### -->
+<para>
+
+</para>
+
+
+
<!-- ##### FUNCTION SPI_eventIsReady ##### -->
<para>
@SPI_KEY_PRESSRELEASE:
@SPI_KEY_SYM:
-<!-- ##### FUNCTION getDesktopCount ##### -->
+<!-- ##### FUNCTION SPI_getDesktopCount ##### -->
<para>
</para>
@Returns:
-<!-- ##### FUNCTION getDesktop ##### -->
+<!-- ##### FUNCTION SPI_getDesktop ##### -->
<para>
</para>
@Returns:
-<!-- ##### FUNCTION getDesktopList ##### -->
+<!-- ##### FUNCTION SPI_getDesktopList ##### -->
<para>
</para>
@SPI_KEYLISTENER_CANCONSUME:
@SPI_KEYLISTENER_ALL_WINDOWS:
-<!-- ##### FUNCTION createAccessibleKeystrokeListener ##### -->
+<!-- ##### TYPEDEF AccessibleKeystroke ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION SPI_createAccessibleKeystrokeListener ##### -->
<para>
</para>
@Returns:
-<!-- ##### FUNCTION registerGlobalEventListener ##### -->
+<!-- ##### FUNCTION SPI_registerGlobalEventListener ##### -->
<para>
</para>
@Returns:
-<!-- ##### FUNCTION deregisterGlobalEventListener ##### -->
+<!-- ##### FUNCTION SPI_deregisterGlobalEventListener ##### -->
<para>
</para>
@Returns:
-<!-- ##### FUNCTION deregisterGlobalEventListenerAll ##### -->
+<!-- ##### FUNCTION SPI_deregisterGlobalEventListenerAll ##### -->
<para>
</para>
@Returns:
-<!-- ##### FUNCTION registerAccessibleKeystrokeListener ##### -->
+<!-- ##### FUNCTION SPI_registerAccessibleKeystrokeListener ##### -->
<para>
</para>
@Returns:
-<!-- ##### FUNCTION deregisterAccessibleKeystrokeListener ##### -->
+<!-- ##### FUNCTION SPI_deregisterAccessibleKeystrokeListener ##### -->
<para>
</para>
@Returns:
+<!-- ##### FUNCTION AccessibleKeystrokeListener_unref ##### -->
+<para>
+
+</para>
+
+@listener:
+
+
<!-- ##### FUNCTION AccessibleKeystrokeListener_removeCallback ##### -->
<para>
@Returns:
-<!-- ##### FUNCTION generateKeyEvent ##### -->
+<!-- ##### FUNCTION SPI_generateKeyEvent ##### -->
<para>
</para>
@Returns:
-<!-- ##### FUNCTION generateMouseEvent ##### -->
+<!-- ##### FUNCTION SPI_generateMouseEvent ##### -->
<para>
</para>
@Returns:
+<!-- ##### FUNCTION AccessibleRelation_getNTargets ##### -->
+<para>
+
+</para>
+
+@obj:
+@Returns:
+
+
<!-- ##### FUNCTION AccessibleRelation_getTarget ##### -->
<para>
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 ();
}
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);
}
}
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 ();
/*
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 ();
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<n_desktops; ++i)
{
- desktop = getDesktop (i);
+ desktop = SPI_getDesktop (i);
s = Accessible_getName (desktop);
fprintf (stderr, "desktop %d name: %s\n", i, s);
SPI_freeString (s);
}
/* prepare the keyboard snoopers */
- command_key_listener = createAccessibleKeystrokeListener (report_command_key_event, NULL);
- ordinary_key_listener = createAccessibleKeystrokeListener (report_ordinary_key_event, NULL);
+ command_key_listener = SPI_createAccessibleKeystrokeListener (report_command_key_event, NULL);
+ ordinary_key_listener = SPI_createAccessibleKeystrokeListener (report_ordinary_key_event, NULL);
/* will listen only to Alt-key combinations, and only to KeyPress events */
- registerAccessibleKeystrokeListener(command_key_listener,
- (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
- SPI_KEYMASK_ALT,
- (unsigned long) ( KeyPress ),
- SPI_KEYLISTENER_ALL_WINDOWS);
+ SPI_registerAccessibleKeystrokeListener(command_key_listener,
+ (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
+ SPI_KEYMASK_ALT,
+ (unsigned long) ( KeyPress ),
+ SPI_KEYLISTENER_ALL_WINDOWS);
/* will listen only to unshifted key events, both press and release */
- registerAccessibleKeystrokeListener(ordinary_key_listener,
- (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
- SPI_KEYMASK_UNMODIFIED,
- (unsigned long) ( KeyPress | KeyRelease),
- SPI_KEYLISTENER_NOSYNC);
+ SPI_registerAccessibleKeystrokeListener(ordinary_key_listener,
+ (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
+ SPI_KEYMASK_UNMODIFIED,
+ (unsigned long) ( KeyPress | KeyRelease),
+ SPI_KEYLISTENER_NOSYNC);
/* will listen only to shifted key events, both press and release */
- registerAccessibleKeystrokeListener(ordinary_key_listener,
- (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
- SPI_KEYMASK_SHIFT,
- (unsigned long) ( KeyPress | KeyRelease),
- SPI_KEYLISTENER_NOSYNC);
-
+ SPI_registerAccessibleKeystrokeListener(ordinary_key_listener,
+ (AccessibleKeySet *) SPI_KEYSET_ALL_KEYS,
+ SPI_KEYMASK_SHIFT,
+ (unsigned long) ( KeyPress | KeyRelease),
+ SPI_KEYLISTENER_NOSYNC);
+
get_environment_vars ();
SPI_event_main ();
static void
simple_at_exit ()
{
- deregisterGlobalEventListenerAll (focus_listener);
- AccessibleEventListener_unref (focus_listener);
+ SPI_deregisterGlobalEventListenerAll (focus_listener);
+ AccessibleEventListener_unref (focus_listener);
- deregisterGlobalEventListenerAll (property_listener);
- AccessibleEventListener_unref (property_listener);
+ SPI_deregisterGlobalEventListenerAll (property_listener);
+ AccessibleEventListener_unref (property_listener);
- deregisterGlobalEventListenerAll (generic_listener);
- AccessibleEventListener_unref (generic_listener);
+ SPI_deregisterGlobalEventListenerAll (generic_listener);
+ AccessibleEventListener_unref (generic_listener);
- deregisterGlobalEventListenerAll (button_listener);
- AccessibleEventListener_unref (button_listener);
+ SPI_deregisterGlobalEventListenerAll (button_listener);
+ AccessibleEventListener_unref (button_listener);
- deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT);
- AccessibleKeystrokeListener_unref (command_key_listener);
+ SPI_deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT);
+ AccessibleKeystrokeListener_unref (command_key_listener);
- deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_UNMODIFIED);
- deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_SHIFT);
- AccessibleKeystrokeListener_unref (ordinary_key_listener);
+ SPI_deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_UNMODIFIED);
+ SPI_deregisterAccessibleKeystrokeListener (ordinary_key_listener, SPI_KEYMASK_SHIFT);
+ AccessibleKeystrokeListener_unref (ordinary_key_listener);
SPI_event_quit ();
}
fprintf (stderr, "Testing desktop...\n");
- g_assert (getDesktop (-1) == NULL);
- desktop = getDesktop (0);
+ g_assert (SPI_getDesktop (-1) == NULL);
+ desktop = SPI_getDesktop (0);
g_assert (desktop != NULL);
validate_accessible (desktop, FALSE, FALSE);
fprintf (stderr, "Fielded focus event ...\n");
if (!do_poke) {
- desktop = getDesktop (0);
+ desktop = SPI_getDesktop (0);
application = Accessible_getChildAtIndex (desktop, 0);
g_assert (application != NULL);
Accessible_unref (desktop);
g_assert (!SPI_init ());
g_assert (SPI_init ());
- g_assert (getDesktopCount () == 1);
+ g_assert (SPI_getDesktopCount () == 1);
test_roles ();
test_misc ();
win = create_test_window ();
- global_listener = createAccessibleEventListener (global_listener_cb, win);
- g_assert (registerGlobalEventListener (global_listener, "focus:"));
+ global_listener = SPI_createAccessibleEventListener (global_listener_cb, win);
+ g_assert (SPI_registerGlobalEventListener (global_listener, "focus:"));
fprintf (stderr, "Waiting for focus event ...\n");
gtk_main ();
- g_assert (deregisterGlobalEventListenerAll (global_listener));
+ g_assert (SPI_deregisterGlobalEventListenerAll (global_listener));
AccessibleEventListener_unref (global_listener);
test_window_destroy (win);