Re: Which events does a widget listen for
| From: | Scott Mattocks | Date: | Fri, 11 Jun 2004 20:55:14 +0000 |
| Subject: | Re: Which events does a widget listen for | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4655@lists.php.net to get a copy of this message | ||
Well, sort of. I also want to allow people to add events. Then I need to know if the event is in the event mask. And I also like to make things as generic as possible. I hate having changes in one place effect code in another if I can avoid it.
Steph wrote:
Well in that case surely all you need to know is which events a gtkeventbox will 'see'? attributes.event_mask = gtk_widget_get_events (widget) | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_EXPOSURE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK;-----Original Message----- From: Scott Mattocks [mailto:crisscott@netzero.com] Sent: 11 June 2004 21:41 To: php-gtk-general@lists.php.net Subject: Re: [PHP-GTK] Which events does a widget listen for Steph wrote:You can either trawl through GTK src looking forattributes.event_mask, oryou could steal the bit of PHP-GTK code from the signals/eventschapter inthe manual and play with the widgets to see what you get.Thanks for your help Steph. Trawling source is out for me because I need to know what is being accepted at run time. I am wrapping an event box in another class that will allow me to connect events to some of its methods. I need to check that the event will be accepted before I call the connect method thought. (See http://www.crisscott.com/PHP-Gtk/ScrollingLabel/Docs/ScrollingLabel/ for a better idea of what I am talking about.) Anyways, I will have to play with widgets to try and get the info as I need it. I'll keep the list updated if/when I figure out how to get the info I need. Thanks, Scott Mattocks -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php