GNOME Bugzilla – Bug 686801
Support the use of suffixes for signals in atk_add_global_event_listener()
Last modified: 2012-10-26 12:15:20 UTC
Currently atk_add_global_event_listener() only pays attention to 3 tokens [1]. As a result you cannot register for events with the suffixes, such as the "system" suffix described in bug 639466. The good news (for ATs) is that the system suffix gets passed along by AT-SPI2. Thus ATK implementors can still use it. So this doesn't seem to be a BigDeal(tm). The bad news (for implementors) is that they cannot specify this suffix, for instance in writing regression tests that are independent of AT-SPI2. [1] http://git.gnome.org/browse/atk/tree/atk/atkutil.c#n251
(In reply to comment #0) > Currently atk_add_global_event_listener() only pays attention to 3 tokens [1]. > As a result you cannot register for events with the suffixes, such as the > "system" suffix described in bug 639466. I made a brief look to the code. atk_add_global_event_listener is based on g_signal_add_emission_hook [1]. That method supports details (second parameter). Right now at the implementation of atk_add_global_event_listener it uses NULL. So this seems achievable. I will try to be extend atk_add_global_event_listener to support 4 tokens, being the last one the detail. [1] http://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-add-emission-hook
(In reply to comment #0) > The bad news (for implementors) is that they cannot specify this > suffix, for instance in writing regression tests that are independent of > AT-SPI2. BTW, although the plan is to add the support, just to mention that this can be also achieved without extend this method, it is just that the filtering would be required to be done at the listener.
Created attachment 227188 [details] [review] Extend atk_global_event_listener in order to support details Now 4 tokes is a valid number of elements. I tested a little this patch (a test will come soon), and seems to work. Probably I would require a new review just in case, and the documentation, as I made that quickly.
Created attachment 227189 [details] cally atkevents example that show the new capabilities Just in case someone one to test. This file doesn't compile alone, you would require clutter anyway, but it is enough to test, and more quick that wait for any update on clutter (if I do so).
(In reply to comment #3) > Created an attachment (id=227188) [details] [review] > Extend atk_global_event_listener in order to support details > Patch committed with some updates at the documentation. Closing bug.