[g-a-devel]Extended events
- From: "Padraig O'Briain" <Padraig Obriain Sun COM>
- To: gnome-accessibility-devel gnome org
- Subject: [g-a-devel]Extended events
- Date: Tue, 11 Mar 2003 10:29:04 +0000 (GMT)
The attached poatch completes the implementation of extended event support in
at-spi.
Is this OK to commit?
Padraig
? at-spi-1.1.8
? at-spi-1.1.8.tar
? at-spi.diff
? autom4te.cache
? configure.in.SAVE
? atk-bridge/bridge.c.NEW
? atk-bridge/bridge.c.TEST
? cspi/spi_accessible.c.NOWARN
? cspi/spi_event.c.SAVE
? cspi/spi_registry.c.TEST
? cspi/bonobo/cspi-bonobo-listener.c.NOWARN
? cspi/bonobo/cspi-bonobo-listener.c.TEST
? docs/reference/cspi/tmpl/at-spi-cspi-unused.sgml
? docs/reference/cspi/tmpl/spi_streamable_content.sgml
? libspi/Makefile.am.NEW
? libspi/application.c.TEST
? libspi/relation.c.NOWARN
? registryd/cpp.sh
? registryd/deviceeventcontroller.c.NEW
? registryd/deviceeventcontroller.c.NOWARN
? registryd/deviceeventcontroller.c.TEST
? test/event-listener-test
? test/event-listener-test.c.SAVE
? test/screen-review-test
? test/stress-test
? test/test-simple.c.TEST
? test/test-simple.errs
? test/visual-bell
Index: atk-bridge/bridge.c
===================================================================
RCS file: /cvs/gnome/at-spi/atk-bridge/bridge.c,v
retrieving revision 1.59
diff -u -p -r1.59 bridge.c
--- atk-bridge/bridge.c 7 Mar 2003 15:34:37 -0000 1.59
+++ atk-bridge/bridge.c 11 Mar 2003 10:31:06 -0000
@@ -21,6 +21,7 @@
* Boston, MA 02111-1307, USA.
*/
+#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@@ -48,23 +49,14 @@ static SpiApplication *this_app = NULL;
static gboolean registry_died = FALSE;
static gboolean atk_listeners_registered = FALSE;
static guint toplevel_handler;
-
-/* NOT YET USED
- static GQuark atk_quark_property_changed_name;
- static GQuark atk_quark_property_changed_description;
- static GQuark atk_quark_property_changed_parent;
- static GQuark atk_quark_property_changed_role;
- static GQuark atk_quark_property_changed_table_caption;
- static GQuark atk_quark_property_changed_table_column_description;
- static GQuark atk_quark_property_changed_table_row_description;
-*/
+static gint max_selection_string = 255;
static guint atk_signal_text_changed;
static guint atk_signal_children_changed;
static guint atk_signal_active_descendant_changed;
+static guint atk_signal_text_selection_changed;
/* NOT YET USED
- static guint atk_signal_text_selection_changed;
static guint atk_signal_row_reordered;
static guint atk_signal_row_inserted;
static guint atk_signal_row_deleted;
@@ -134,6 +126,8 @@ spi_atk_bridge_init_event_type_consts ()
ATK_TYPE_OBJECT);
atk_signal_link_selected = g_signal_lookup ("link_selected",
ATK_TYPE_HYPERTEXT);
+ atk_signal_text_selection_changed = g_signal_lookup ("text_selection_changed",
+ ATK_TYPE_TEXT);
}
static int
@@ -565,6 +559,13 @@ spi_atk_bridge_property_event_listener (
{
AtkPropertyValues *values;
GObject *gobject;
+ const gchar *prop_name;
+ CORBA_any any;
+ const gchar *sp = NULL;
+ AtkObject *ao;
+ SpiAccessible *s_ao = NULL;
+ CORBA_Object c_obj;
+ gint i;
#ifdef SPI_BRIDGE_DEBUG
GSignalQuery signal_query;
@@ -585,8 +586,101 @@ spi_atk_bridge_property_event_listener (
gobject = g_value_get_object (param_values + 0);
values = (AtkPropertyValues*) g_value_get_pointer (param_values + 1);
- spi_atk_emit_eventv (gobject, 0, 0, NULL,
- "object:property-change:%s", values->property_name);
+ prop_name = values->property_name;
+ if (strcmp (prop_name, "accessible-name") == 0)
+ {
+ sp = atk_object_get_name (ATK_OBJECT (gobject));
+ spi_init_any_string (&any, (gchar **)&sp);
+ }
+ else if (strcmp (prop_name, "accessible-description") == 0)
+ {
+ sp = atk_object_get_description (ATK_OBJECT (gobject));
+ spi_init_any_string (&any, (gchar **)&sp);
+ }
+ else if (strcmp (prop_name, "accessible-parent") == 0)
+ {
+ ao = atk_object_get_parent (ATK_OBJECT (gobject));
+ if (ao)
+ {
+ s_ao = spi_accessible_new (ao);
+ c_obj = BONOBO_OBJREF (s_ao);
+ spi_init_any_object (&any, &c_obj);
+ }
+ else
+ {
+ spi_init_any_nil (&any);
+ }
+ }
+ else if (strcmp (prop_name, "accessible-table-summary") == 0)
+ {
+ ao = atk_table_get_summary (ATK_TABLE (gobject));
+ if (ao)
+ {
+ s_ao = spi_accessible_new (ao);
+ c_obj = BONOBO_OBJREF (s_ao);
+ spi_init_any_object (&any, &c_obj);
+ }
+ else
+ {
+ spi_init_any_nil (&any);
+ }
+ }
+ else if (strcmp (prop_name, "accessible-table-column-header") == 0)
+ {
+ i = g_value_get_int (&(values->new_value));
+ ao = atk_table_get_column_header (ATK_TABLE (gobject), i);
+ if (ao)
+ {
+ s_ao = spi_accessible_new (ao);
+ c_obj = BONOBO_OBJREF (s_ao);
+ spi_init_any_object (&any, &c_obj);
+ }
+ else
+ {
+ spi_init_any_nil (&any);
+ }
+ }
+ else if (strcmp (prop_name, "accessible-table-row-header") == 0)
+ {
+ i = g_value_get_int (&(values->new_value));
+ ao = atk_table_get_row_header (ATK_TABLE (gobject), i);
+ if (ao)
+ {
+ s_ao = spi_accessible_new (ao);
+ c_obj = BONOBO_OBJREF (s_ao);
+ spi_init_any_object (&any, &c_obj);
+ }
+ else
+ {
+ spi_init_any_nil (&any);
+ }
+ }
+ else if (strcmp (prop_name, "accessible-table-row-description") == 0)
+ {
+ i = g_value_get_int (&(values->new_value));
+ sp = atk_table_get_row_description (ATK_TABLE (gobject), i);
+ spi_init_any_string (&any, (gchar **)&sp);
+ }
+ else if (strcmp (prop_name, "accessible-table-column-description") == 0)
+ {
+ i = g_value_get_int (&(values->new_value));
+ sp = atk_table_get_column_description (ATK_TABLE (gobject), i);
+ spi_init_any_string (&any, (gchar **)&sp);
+ }
+ else if (strcmp (prop_name, "accessible-table-caption-object") == 0)
+ {
+ ao = atk_table_get_caption (ATK_TABLE (gobject));
+ sp = atk_object_get_name (ao);
+ spi_init_any_string (&any, (gchar **)&sp);
+ }
+ else
+ {
+ spi_init_any_nil (&any);
+ }
+
+ spi_atk_emit_eventv (gobject, 0, 0, &any,
+ "object:property-change:%s", prop_name);
+
return TRUE;
}
@@ -708,6 +802,7 @@ spi_atk_bridge_signal_listener (GSignalI
CORBA_Object c_obj;
char *sp = NULL;
AtkObject *ao;
+ AtkText *text;
gint detail1 = 0, detail2 = 0;
SpiAccessible *s_ao = NULL;
#ifdef SPI_BRIDGE_DEBUG
@@ -780,6 +875,27 @@ spi_atk_bridge_signal_listener (GSignalI
detail1,
detail1+detail2);
spi_init_any_string (&any, &sp);
+ }
+ else if (signal_query.signal_id == atk_signal_text_selection_changed)
+ {
+ text = ATK_TEXT (gobject);
+
+ if (atk_text_get_n_selections (text) == 1)
+ {
+ sp = atk_text_get_selection (text, 0, &detail1, &detail2);
+ if (abs (detail2 - detail1) < max_selection_string)
+ {
+ spi_init_any_string (&any, &sp);
+ }
+ else
+ {
+ spi_init_any_nil (&any);
+ }
+ }
+ else
+ {
+ spi_init_any_nil (&any);
+ }
}
else
{
Index: cspi/spi_event.c
===================================================================
RCS file: /cvs/gnome/at-spi/cspi/spi_event.c,v
retrieving revision 1.31
diff -u -p -r1.31 spi_event.c
--- cspi/spi_event.c 5 Mar 2003 17:24:58 -0000 1.31
+++ cspi/spi_event.c 11 Mar 2003 10:31:06 -0000
@@ -443,7 +443,7 @@ AccessibleChildChangedEvent_getChildAcce
* AccessibleParentChangedEvent_getParentAccessible:
* @event: a pointer to the #AccessibleEvent being queried.
*
- * Queries an #AccessibleEvent of type "object:parent_changed"
+ * Queries an #AccessibleEvent of type "object:property-change:accessible-parent"
* to get a reference to the changed #Accessible.
* Note that context #Accessibles are not guaranteed to outlive
* event delivery, in which case this call may return %NULL
@@ -458,8 +458,18 @@ AccessibleParentChangedEvent_getParentAc
return (Accessible *) cspi_internal_event_get_object (foo);
}
-/** NEED TO DOCUMENT THESE **/
-
+/**
+ * AccessibleActiveDescendantChangedEvent_getActiveDescendant:
+ * @event: a pointer to the #AccessibleEvent being queried.
+ *
+ * Queries an #AccessibleEvent of type "object:active-descendant-changed"
+ * to get a reference to the changed #Accessible.
+ * Note that context #Accessibles are not guaranteed to outlive
+ * event delivery, in which case this call may return %NULL
+ * even if the object existed at the time of dispatch.
+ *
+ * Returns: an #Accessible pointer representing the new parent object.
+ **/
Accessible *
AccessibleActiveDescendantChangedEvent_getActiveDescendant (const AccessibleEvent *e)
{
@@ -467,6 +477,18 @@ AccessibleActiveDescendantChangedEvent_g
return (Accessible *) cspi_internal_event_get_object (foo);
}
+/**
+ * AccessibleTableSummaryChangedEvent_getSummaryAccessible:
+ * @event: a pointer to the #AccessibleEvent being queried.
+ *
+ * Queries an #AccessibleEvent of type "object:property-changed:accessible-table-summary"
+ * to get a reference to the changed #Accessible.
+ * Note that context #Accessibles are not guaranteed to outlive
+ * event delivery, in which case this call may return %NULL
+ * even if the object existed at the time of dispatch.
+ *
+ * Returns: an #Accessible pointer representing the new parent object.
+ **/
Accessible *
AccessibleTableSummaryChangedEvent_getSummaryAccessible (const AccessibleEvent *e)
{
@@ -474,35 +496,101 @@ AccessibleTableSummaryChangedEvent_getSu
return (Accessible *) cspi_internal_event_get_object (foo);
}
+/**
+ * AccessibleTableSummaryChangedEvent_getSummaryAccessible:
+ * @event: a pointer to the #AccessibleEvent being queried.
+ *
+ * Queries an #AccessibleEvent of type
+ * "object:property-changed:accessible-table-row-header" or
+ * "object:property-changed:accessible-table-column-header"
+ * to get a reference to the changed #Accessible.
+ * Note that context #Accessibles are not guaranteed to outlive
+ * event delivery, in which case this call may return %NULL
+ * even if the object existed at the time of dispatch.
+ *
+ * Returns: an #Accessible pointer representing the new parent object.
+ **/
Accessible *
AccessibleTableHeaderChangedEvent_getHeaderAccessible (const AccessibleEvent *e)
{
- return NULL;
+ const InternalEvent *foo = (InternalEvent *) e;
+ return (Accessible *) cspi_internal_event_get_object (foo);
}
+/**
+ * AccessibleTableCaptionChangedEvent_getCaptionString:
+ * @e: a pointer to the #AccessibleEvent being queried.
+ *
+ * Queries an #AccessibleEvent of type
+ * "object:property-changed:accessible-table-caption-object"
+ * returning the text in the caption, if present.
+ *
+ * Returns: a UTF-8 text string indicating the text in the caption.
+ **/
char *
AccessibleTableCaptionChangedEvent_getCaptionString (const AccessibleEvent *e)
{
- return NULL;
+ const InternalEvent *foo = (InternalEvent *) e;
+ /* TODO: check the event type? expensive... */
+ return cspi_internal_event_get_text (foo);
}
+/**
+ * AccessibleTableRowDescriptionEvent_getDescriptionString:
+ * @event: a pointer to the #AccessibleEvent being queried.
+ *
+ * Queries an #AccessibleEvent of type
+ * "object:property-changed:accessible-table-row-description"
+ * returning the new table row description.
+ *
+ * Returns: a UTF-8 text string representing the recently changed
+ * table row description
+ **/
char *
AccessibleTableRowDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e)
{
- return NULL;
+ const InternalEvent *foo = (InternalEvent *) e;
+ /* TODO: check the event type? expensive... */
+ return cspi_internal_event_get_text (foo);
}
+/**
+ * AccessibleTableColumnDescriptionEvent_getDescriptionString:
+ * @event: a pointer to the #AccessibleEvent being queried.
+ *
+ * Queries an #AccessibleEvent of type
+ * "object:property-changed:accessible-table-column-description"
+ * returning the new table column description.
+ *
+ * Returns: a UTF-8 text string representing the recently changed
+ * table column description
+ **/
char *
AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e)
{
- return NULL;
+ const InternalEvent *foo = (InternalEvent *) e;
+ /* TODO: check the event type? expensive... */
+ return cspi_internal_event_get_text (foo);
}
+/**
+ * AccessibleDescriptionEvent_getDescriptionString:
+ * @event: a pointer to the #AccessibleEvent being queried.
+ *
+ * Queries an #AccessibleEvent of type
+ * "object:property-changed:accessible-description"
+ * returning the new description.
+ *
+ * Returns: a UTF-8 text string representing the recently changed
+ * description
+ **/
char *
AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e)
{
- return NULL;
+ const InternalEvent *foo = (InternalEvent *) e;
+ /* TODO: check the event type? expensive... */
+ return cspi_internal_event_get_text (foo);
}
static gint
@@ -548,10 +636,21 @@ cspi_internal_event_remove (const Intern
_cspi_event_queue = g_slist_remove_link (_cspi_event_queue, link);
}
+/**
+ * AccessibleNameChangedEvent_getNametring:
+ * @event: a pointer to the #AccessibleEvent being queried.
+ *
+ * Queries an #AccessibleEvent of type "object:property-change:accessible_name:",
+ * returning the name.
+ *
+ * Returns: a UTF-8 text string representing the name of the
+ * object which recently changed.
+ **/
char *
AccessibleNameChangedEvent_getNameString (const AccessibleEvent *e)
{
- return NULL;
+ const InternalEvent *foo = (InternalEvent *) e;
+ return cspi_internal_event_get_text (foo);
}
SPIBoolean
Index: test/event-listener-test.c
===================================================================
RCS file: /cvs/gnome/at-spi/test/event-listener-test.c,v
retrieving revision 1.17
diff -u -p -r1.17 event-listener-test.c
--- test/event-listener-test.c 7 Mar 2003 15:34:38 -0000 1.17
+++ test/event-listener-test.c 11 Mar 2003 10:31:06 -0000
@@ -31,7 +31,18 @@ static void report_event (const Accessi
static void report_detail_event (const AccessibleEvent *event, void *user_data);
static void report_detail1_event (const AccessibleEvent *event, void *user_data);
static void report_text_event (const AccessibleEvent *event, void *user_data);
+static void report_text_selection_event (const AccessibleEvent *event, void *user_data);
+static void report_active_descendant_event (const AccessibleEvent *event, void *user_data);
static void report_children_changed_event (const AccessibleEvent *event, void *user_data);
+static void report_name_changed_event (const AccessibleEvent *event, void *user_data);
+static void report_description_changed_event (const AccessibleEvent *event, void *user_data);
+static void report_parent_changed_event (const AccessibleEvent *event, void *user_data);
+static void report_window_event (const AccessibleEvent *event, void *user_data);
+static void report_table_summary_event (const AccessibleEvent *event, void *user_data);
+static void report_table_header_event (const AccessibleEvent *event, void *user_data);
+static void report_table_caption_event (const AccessibleEvent *event, void *user_data);
+static void report_table_row_description_event (const AccessibleEvent *event, void *user_data);
+static void report_table_column_description_event (const AccessibleEvent *event, void *user_data);
static void timing_test_event (const AccessibleEvent *event, void *user_data);
static SPIBoolean report_mouse_event (const AccessibleDeviceEvent *event, void *user_data);
@@ -40,7 +51,18 @@ static AccessibleEventListener *specific
static AccessibleEventListener *detail1_listener;
static AccessibleEventListener *test_listener;
static AccessibleEventListener *text_listener;
+static AccessibleEventListener *text_selection_listener;
+static AccessibleEventListener *active_descendant_listener;
static AccessibleEventListener *children_changed_listener;
+static AccessibleEventListener *name_changed_listener;
+static AccessibleEventListener *description_changed_listener;
+static AccessibleEventListener *parent_changed_listener;
+static AccessibleEventListener *window_listener;
+static AccessibleEventListener *table_summary_listener;
+static AccessibleEventListener *table_header_listener;
+static AccessibleEventListener *table_caption_listener;
+static AccessibleEventListener *table_row_description_listener;
+static AccessibleEventListener *table_column_description_listener;
static AccessibleDeviceListener *mouse_device_listener;
static gint n_elements_traversed = 0;
static GTimer *timer;
@@ -96,8 +118,30 @@ main (int argc, char **argv)
report_detail_event, NULL);
text_listener = SPI_createAccessibleEventListener (
report_text_event, NULL);
+ text_selection_listener = SPI_createAccessibleEventListener (
+ report_text_selection_event, NULL);
+ active_descendant_listener = SPI_createAccessibleEventListener (
+ report_active_descendant_event, NULL);
children_changed_listener = SPI_createAccessibleEventListener (
report_children_changed_event, NULL);
+ name_changed_listener = SPI_createAccessibleEventListener (
+ report_name_changed_event, NULL);
+ description_changed_listener = SPI_createAccessibleEventListener (
+ report_description_changed_event, NULL);
+ parent_changed_listener = SPI_createAccessibleEventListener (
+ report_parent_changed_event, NULL);
+ window_listener = SPI_createAccessibleEventListener (
+ report_window_event, NULL);
+ table_summary_listener = SPI_createAccessibleEventListener (
+ report_table_summary_event, NULL);
+ table_header_listener = SPI_createAccessibleEventListener (
+ report_table_header_event, NULL);
+ table_caption_listener = SPI_createAccessibleEventListener (
+ report_table_caption_event, NULL);
+ table_row_description_listener = SPI_createAccessibleEventListener (
+ report_table_row_description_event, NULL);
+ table_column_description_listener = SPI_createAccessibleEventListener (
+ report_table_column_description_event, NULL);
test_listener = SPI_createAccessibleEventListener (
timing_test_event, NULL);
mouse_device_listener = SPI_createAccessibleDeviceListener (
@@ -122,8 +166,12 @@ main (int argc, char **argv)
"keyboard:modifiers");
SPI_registerGlobalEventListener (generic_listener,
"object:property-change");
-/* SPI_registerGlobalEventListener (specific_listener,
- "object:property-change:accessible-name");*/
+ SPI_registerGlobalEventListener (name_changed_listener,
+ "object:property-change:accessible-name");
+ SPI_registerGlobalEventListener (description_changed_listener,
+ "object:property-change:accessible-description");
+ SPI_registerGlobalEventListener (parent_changed_listener,
+ "object:property-change:accessible-parent");
SPI_registerGlobalEventListener (generic_listener,
"object:state-changed");
/* SPI_registerGlobalEventListener (specific_listener,
@@ -132,11 +180,11 @@ main (int argc, char **argv)
"object:selection-changed");
SPI_registerGlobalEventListener (children_changed_listener,
"object:children-changed");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (active_descendant_listener,
"object:active-descendant");
SPI_registerGlobalEventListener (generic_listener,
"object:visible-data-changed");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (text_selection_listener,
"object:text-selection-changed");
SPI_registerGlobalEventListener (generic_listener,
@@ -159,28 +207,40 @@ main (int argc, char **argv)
"object:model-changed");
SPI_registerGlobalEventListener (detail1_listener,
"object:link-selected");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:minimize");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:maximize");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:restore");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:activate");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:deactivate");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:close");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:lower");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:raise");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:resize");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:shade");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (window_listener,
"window:unshade");
+ SPI_registerGlobalEventListener (table_summary_listener,
+ "object:property-change:accessible-table-summary");
+ SPI_registerGlobalEventListener (table_header_listener,
+ "object:property-change:accessible-table-row-header");
+ SPI_registerGlobalEventListener (table_header_listener,
+ "object:property-change:accessible-table-column-header");
+ SPI_registerGlobalEventListener (table_summary_listener,
+ "object:property-change:accessible-table-summary");
+ SPI_registerGlobalEventListener (table_row_description_listener,
+ "object:property-change:accessible-table-row-description");
+ SPI_registerGlobalEventListener (table_column_description_listener,
+ "object:property-change:accessible-table-column-description");
SPI_registerGlobalEventListener (test_listener,
"object:test");
#ifdef NOT_YET_IMPLEMENTED
@@ -298,6 +358,34 @@ report_text_event (const AccessibleEvent
}
void
+report_text_selection_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ fprintf (stderr, "(detail) %s %s %d %d\n", event->type, s,
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ s = AccessibleTextSelectionChangedEvent_getSelectionString (event);
+ fprintf (stderr, "context string %s\n", (s) ? s : "<nil>");
+ SPI_freeString (s);
+}
+
+void
+report_active_descendant_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ char *s1;
+ Accessible *ao;
+
+ ao = AccessibleActiveDescendantChangedEvent_getActiveDescendant (event);
+ s1 = Accessible_getName (ao);
+ fprintf (stderr, "(detail) %s parent: %s child: %s %d %d\n", event->type,
+ s ? s : "<null>", s1 ? s1 : "<null>",
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ SPI_freeString (s1);
+ Accessible_unref (ao);
+}
+void
report_children_changed_event (const AccessibleEvent *event, void *user_data)
{
char *s = Accessible_getName (event->source);
@@ -312,6 +400,129 @@ report_children_changed_event (const Acc
SPI_freeString (s);
SPI_freeString (s1);
Accessible_unref (ao);
+}
+
+void
+report_name_changed_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ fprintf (stderr, "(detail) %s %s %d %d\n", event->type, s,
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ s = AccessibleNameChangedEvent_getNameString (event);
+ fprintf (stderr, "context string %s\n", (s) ? s : "<nil>");
+ SPI_freeString (s);
+}
+
+void
+report_description_changed_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ fprintf (stderr, "(detail) %s %s %d %d\n", event->type, s,
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ s = AccessibleDescriptionChangedEvent_getDescriptionString (event);
+ fprintf (stderr, "context string %s\n", (s) ? s : "<nil>");
+ SPI_freeString (s);
+}
+
+void
+report_parent_changed_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ char *s1;
+ Accessible *ao;
+
+ ao = AccessibleParentChangedEvent_getParentAccessible (event);
+ s1 = Accessible_getName (ao);
+ fprintf (stderr, "(detail) %s parent: %s child: %s %d %d\n", event->type,
+ s ? s : "<null>", s1 ? s1 : "<null>",
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ SPI_freeString (s1);
+ Accessible_unref (ao);
+}
+
+void
+report_window_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ fprintf (stderr, "(detail) %s %s %d %d\n", event->type, s,
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ s = AccessibleWindowEvent_getTitleString (event);
+ fprintf (stderr, "context string %s\n", (s) ? s : "<nil>");
+ SPI_freeString (s);
+}
+
+void
+report_table_summary_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ char *s1;
+ Accessible *ao;
+
+ ao = AccessibleTableSummaryChangedEvent_getSummaryAccessible (event);
+ s1 = Accessible_getName (ao);
+ fprintf (stderr, "(detail) %s parent: %s child: %s %d %d\n", event->type,
+ s ? s : "<null>", s1 ? s1 : "<null>",
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ SPI_freeString (s1);
+ Accessible_unref (ao);
+}
+
+void
+report_table_header_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ char *s1;
+ Accessible *ao;
+
+ ao = AccessibleTableHeaderChangedEvent_getHeaderAccessible (event);
+ s1 = Accessible_getName (ao);
+ fprintf (stderr, "(detail) %s parent: %s child: %s %d %d\n", event->type,
+ s ? s : "<null>", s1 ? s1 : "<null>",
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ SPI_freeString (s1);
+ Accessible_unref (ao);
+}
+
+void
+report_table_caption_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ fprintf (stderr, "(detail) %s %s %d %d\n", event->type, s,
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ s = AccessibleTableCaptionChangedEvent_getCaptionString (event);
+ fprintf (stderr, "context string %s\n", (s) ? s : "<nil>");
+ SPI_freeString (s);
+}
+
+void
+report_table_row_description_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ fprintf (stderr, "(detail) %s %s %d %d\n", event->type, s,
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ s = AccessibleTableRowDescriptionChangedEvent_getDescriptionString (event);
+ fprintf (stderr, "context string %s\n", (s) ? s : "<nil>");
+ SPI_freeString (s);
+}
+
+void
+report_table_column_description_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ fprintf (stderr, "(detail) %s %s %d %d\n", event->type, s,
+ event->detail1, event->detail2);
+ SPI_freeString (s);
+ s = AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (event);
+ fprintf (stderr, "context string %s\n", (s) ? s : "<nil>");
+ SPI_freeString (s);
}
SPIBoolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]