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 564880 - it's button-press-event not button_press_event
it's button-press-event not button_press_event
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: docs
1.22.x
Other All
: Normal minor
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2008-12-17 17:19 UTC by Samuel B. Quiring
Modified: 2010-03-02 07:18 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
patch (935 bytes, patch)
2008-12-18 03:30 UTC, Li Yuan
committed Details | Review

Description Samuel B. Quiring 2008-12-17 17:19:17 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.
Comment 1 Samuel B. Quiring 2008-12-17 19:41:43 UTC
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)
Comment 2 Li Yuan 2008-12-18 03:30:34 UTC
Created attachment 124905 [details] [review]
patch
Comment 3 Li Yuan 2008-12-18 03:38:52 UTC
(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.