Re: How to know which signals go with which widgets



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tristan Van Berkom wrote:
| On Sun, Mar 30, 2008 at 7:51 AM, Gregory Hosler <ghosler redhat com> wrote:
|> -----BEGIN PGP SIGNED MESSAGE-----
|>  Hash: SHA1
|>
|>  HI all,
|>
|>  if I look up the documentation on a particular widget, at the bottom of the devhelp page
|>  there is documentation on which signals it supports.
|>
|>  I'm looking for the inverse.
|>
|>  I have a UI and i need a "leave-notify-event", so I wish to know which widgets can I
|>  attach this particular signal to.
|>
|
| Hi, in the documentation you can find the object heirarchy and what objects that
| every object derive from, and what interfaces it implements.
|
| All signals of implemented interfaces and derived objects are valid for the
| given object.
|
| The "*-event" signals that originate from the base widget class (GtkWidgetClass)
| are ofcourse then, available for all widgets.

Well... That's what I would have thought, but my experience has shown me differently.

| The event signals are particular in the sense that they represent
| events that come
| from the Gdk backend - you must ensure that the widget has the proper
| event masks

I have an embedded object (object within a container, within a container, etc.); I set the
notify masks on the object, and yet my callback doesn't get called.

However, when I surround the widget with an eventbox, and do the same to the eventbox (set
notify masks), THEN my callback's get called.

Hence my original post...

:)

| in order to receive the coresponding event signals.

I enable my event masks as follows:

        gtk_widget_add_events(preview_image_ebox,
                GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);

This works if the widget is an event box, but doesn't work if the widget is, e.g. a gtk_image.

?

best rgds,

- -Greg

| Cheers,
|                    -Tristan


- --
+---------------------------------------------------------------------+

Please also check the log file at "/dev/null" for additional information.
                (from /var/log/Xorg.setup.log)

| Greg Hosler                                   ghosler redhat com    |
+---------------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFH8Dt3404fl/0CV/QRAnnJAKDNnsYk+1HXrf31eTq6904n2APKOQCgnx5I
EQbz5gWb3wiKnzlf4lR73Vs=
=81TG
-----END PGP SIGNATURE-----



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]