After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686801 - Support the use of suffixes for signals in atk_add_global_event_listener()
Support the use of suffixes for signals in atk_add_global_event_listener()
Status: RESOLVED FIXED
Product: atk
Classification: Platform
Component: atk
unspecified
Other All
: Normal enhancement
: ---
Assigned To: ATK maintainer(s)
ATK maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-10-24 14:56 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2012-10-26 12:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Extend atk_global_event_listener in order to support details (3.33 KB, patch)
2012-10-24 18:43 UTC, Alejandro Piñeiro Iglesias (IRC: infapi00)
committed Details | Review
cally atkevents example that show the new capabilities (7.98 KB, text/x-csrc)
2012-10-24 18:44 UTC, Alejandro Piñeiro Iglesias (IRC: infapi00)
  Details

Description Joanmarie Diggs (IRC: joanie) 2012-10-24 14:56:29 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
Comment 1 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-24 18:00:14 UTC
(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
Comment 2 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-24 18:03:24 UTC
(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.
Comment 3 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-24 18:43:01 UTC
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.
Comment 4 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-24 18:44:15 UTC
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).
Comment 5 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-26 12:15:20 UTC
(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.