GNOME Bugzilla – Bug 564880
it's button-press-event not button_press_event
Last modified: 2010-03-02 07:18:48 UTC
Documentation Section: http://library.gnome.org/devel/at-spi-cspi/stable/at-spi-cspi-Registry-queries.html#SPI-registerGlobalEventListener ...Examples: "focus:", "Gtk:GtkWidget:button_press_event" Correct version: ...Examples: "focus:", "Gtk:GtkWidget:button-press-event" Other information: It would be really helpful if the documentation would explain where these event names come from and what is and what is not allowed. For example, is there a way to register a listener for the Gtk:GtkButton:clicked event? If so, I have not been able to figure out how.
The docs say: eventType : a character string indicating the type of events for which notification is requested. Format is EventClass:major_type:minor_type:detail where all subfields other than EventClass are optional. EventClasses include "object", "window", "mouse", and toolkit events (e.g. "Gtk", "AWT"). Examples: "focus:", "Gtk:GtkWidget:button_press_event". I have successfully registered a listener for Gtk:GtkWidget:button-press-event. When I tried "Gtk:GtkWidget", "Gtk:GtkWidget:" and "Gtk:" I get "Warning **: Invalid signal type". So it appears to me that the phrase "all subfields other than EventClass are optional" is not true. Or is that a bug in the implemenation? Also, there are many web pages talking about Firefox and Java writing their own interface to at-spi (e.g., http://accessibility.kde.org/developer/atk.php). There should be some detail added to this page about the events delivered by those systems. Are they all prefixed with Gtk:? If not, what are a few examples? The documentation should explain how someone can figure out what at-spi events are generated by these applications. I have no idea how to go about this. I originally tried to register a handler for Gtk:GtkWidget:button_press_event, but of course that got an error. So I figured the stuff didn't work and gave up on it. It was only weeks later that I stumbled across a web page where the correct signal name was mentioned (http://archive.netbsd.se/?ml=mozilla-dev-accessibility&a=2008-05&t=7363495)
Created attachment 124905 [details] [review] patch
(In reply to comment #1) > The docs say: > > eventType : > a character string indicating the type of events for which notification is > requested. Format is EventClass:major_type:minor_type:detail where all > subfields other than EventClass are optional. EventClasses include > "object", "window", "mouse", and toolkit events (e.g. "Gtk", "AWT"). > Examples: "focus:", "Gtk:GtkWidget:button_press_event". > > I have successfully registered a listener for Gtk:GtkWidget:button-press-event. > When I tried "Gtk:GtkWidget", "Gtk:GtkWidget:" and "Gtk:" I get "Warning **: > Invalid signal type". So it appears to me that the phrase "all subfields other > than EventClass are optional" is not true. Or is that a bug in the > implemenation? This doesn't support in code. I think "optional" means events except toolkit events. > > Also, there are many web pages talking about Firefox and Java writing their own > interface to at-spi (e.g., http://accessibility.kde.org/developer/atk.php). > There should be some detail added to this page about the events delivered by > those systems. Are they all prefixed with Gtk:? If should be started with the toolkit name. If not, what are a few > examples? The documentation should explain how someone can figure out what > at-spi events are generated by these applications. I have no idea how to go > about this. This depends on the toolkit. You can read the toolkit's doc. > > I originally tried to register a handler for Gtk:GtkWidget:button_press_event, > but of course that got an error. So I figured the stuff didn't work and gave > up on it. It was only weeks later that I stumbled across a web page where the > correct signal name was mentioned > (http://archive.netbsd.se/?ml=mozilla-dev-accessibility&a=2008-05&t=7363495) > Thanks for the report. I noticed you mentioned listener for Gtk:GtkButton:clicked doesn't work? If so I can look at why. It would be very helpful if you can share your listener program.