I think the GTK_WIDGET_VISIBLE() macro should do the trick.
eg.
Code: (Plaintext)
1 2 3 4 5
gboolean visible;
GtkWidget *widget;
visible = GTK_WIDGET_VISIBLE(widget);
To find functions look at the GTK API or the lower level API's (say GDK if you are doing drawings).
For common problems like this one you can be assured there is a function in the API for them.
A link to the API is here: http://www.gtk.org/api/
Then click on the GTK api. Note: You can also download the tarball to have an offline reference.
Start at the point where you think the function should be then work your way up the object hierarchy (say if I wanted to make a button inactive I would start at GtkButton. When I can't find an appropriate function there I work back to GtkWidget and find: gtk_widget_set_sensitive() which does the trick).
Joined: 12 Jan 2007 Posts: 9 Location: Indiana, USA
Posted: Fri Oct 12, 2007 6:36 pm Post subject: GtkWidget signal may help
The GtkWidget parent class also has two signals that I find useful.
The ::hide signal
The ::show signal
They are driven whenever the window changes state between visible and not-visible. I have two callback routines that manage a instance/global variable.