RE: [PHP-GTK] Which events does a widget listen for
| From: | Steph | Date: | Fri, 11 Jun 2004 20:58:47 +0000 |
| Subject: | RE: [PHP-GTK] Which events does a widget listen for | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4656@lists.php.net to get a copy of this message | ||
can't you keep the added events in a php array somewhere for reference? I
know it's a klutzy workaround, but if there's no way currently to
interrogate gtk it seems sane to mirror the info in php..
> -----Original Message-----
> From: Scott Mattocks [mailto:crisscott@netzero.com]
> Sent: 11 June 2004 21:55
> To: php-gtk-general@lists.php.net
> Subject: Re: [PHP-GTK] Which events does a widget listen for
>
>
> 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 for
> >>
> >>attributes.event_mask, or
> >>
> >>>you could steal the bit of PHP-GTK code from the signals/events
> >>
> >>chapter in
> >>
> >>>the 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
> >>
> >
> >
> >
> >
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>