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 guint atk_signal_property_changed;
*/
static guint atk_signal_text_changed;
-static guint atk_signal_child_changed;
+static guint atk_signal_children_changed;
static guint atk_signal_active_descendant_changed;
/* NOT YET USED
static void
spi_atk_bridge_init_event_type_consts ()
{
- atk_signal_child_changed = g_signal_lookup ("child_changed",
+ atk_signal_children_changed = g_signal_lookup ("children_changed",
ATK_TYPE_OBJECT);
atk_signal_text_changed = g_signal_lookup ("text_changed",
ATK_TYPE_TEXT);
detail1 = g_value_get_int (param_values + 1);
spi_init_any_nil (&any);
}
+ else if ((signal_query.signal_id == atk_signal_children_changed) && gobject)
+ {
+ ao = atk_object_ref_accessible_child (ATK_OBJECT (gobject),
+ detail1);
+ if (ao)
+ {
+ s_ao = spi_accessible_new (ao);
+ c_obj = BONOBO_OBJREF (s_ao);
+ spi_init_any_object (&any, &c_obj);
+ g_object_unref (ao);
+ }
+ else
+ {
+ spi_init_any_nil (&any);
+ }
+ }
else
{
if (G_VALUE_TYPE (param_values + 1) == G_TYPE_INT)
detail1+detail2);
spi_init_any_string (&any, &sp);
}
- else if ((signal_query.signal_id == atk_signal_child_changed) && gobject)
- {
- ao = atk_object_ref_accessible_child (ATK_OBJECT (gobject),
- detail1);
- if (ao)
- {
- s_ao = spi_accessible_new (ao);
- c_obj = BONOBO_OBJREF (s_ao);
- spi_init_any_object (&any, &c_obj);
- g_object_unref (ao);
- }
- else
- {
- spi_init_any_nil (&any);
- }
- }
else
{
spi_init_any_nil (&any);
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_children_changed_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);
static AccessibleEventListener *detail1_listener;
static AccessibleEventListener *test_listener;
static AccessibleEventListener *text_listener;
+static AccessibleEventListener *children_changed_listener;
static AccessibleDeviceListener *mouse_device_listener;
static gint n_elements_traversed = 0;
static GTimer *timer;
report_detail_event, NULL);
text_listener = SPI_createAccessibleEventListener (
report_text_event, NULL);
+ children_changed_listener = SPI_createAccessibleEventListener (
+ report_children_changed_event, NULL);
test_listener = SPI_createAccessibleEventListener (
timing_test_event, NULL);
mouse_device_listener = SPI_createAccessibleDeviceListener (
"object:state-changed:focused"); */
SPI_registerGlobalEventListener (generic_listener,
"object:selection-changed");
- SPI_registerGlobalEventListener (generic_listener,
+ SPI_registerGlobalEventListener (children_changed_listener,
"object:children-changed");
-/* SPI_registerGlobalEventListener (specific_listener,
- "object:children-changed:add"); */
SPI_registerGlobalEventListener (generic_listener,
"object:active-descendant");
SPI_registerGlobalEventListener (generic_listener,
char *s = Accessible_getName (event->source);
fprintf (stderr, "(detail) %s %s %d %d\n", event->type, s,
event->detail1, event->detail2);
- if (s) SPI_freeString (s);
+ SPI_freeString (s);
s = AccessibleTextChangedEvent_getChangeString (event);
fprintf (stderr, "context string %s\n", (s) ? s : "<nil>");
SPI_freeString (s);
}
+void
+report_children_changed_event (const AccessibleEvent *event, void *user_data)
+{
+ char *s = Accessible_getName (event->source);
+ char *s1;
+ Accessible *ao;
+
+ ao = AccessibleChildChangedEvent_getChildAccessible (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);
+}
+
SPIBoolean
report_mouse_event (const AccessibleDeviceEvent *event, void *user_data)
{