Re: Re[2]: How do i find out if a widget is shown or hidden?

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

 



On 10 May 2010 11:22, Lothar Scholz <llothar@xxxxxx> wrote:
> And what does "mapped" mean?

Here's my understanding of what happens when you show a window. I'm
sure I've made some errors and reality is far more complex :(

1) You build the contents with gtk_label_new() and friends. A
window/widget in this state is !_get_visible(). When you want to show
it, you call gtk_widget_show(). After calling _show(), _get_visible()
will start returning TRUE (I think this is correct?), but your window
is a long way from actually being visible to the user.

Most of the rest of the process happens asynchronously (except for
resource allocation, I think) over the next few milliseconds with a
lot of chit-chat back and forth between your program and the
underlying window system.

2) First your window and widget are realized. This is the process of
allocating real window system resources (eg. windows, pixmaps,
colourmaps and so on) to the components of the window. You can
implement a _realize method if you want to be part of this process.

3) Next everything is configured. This is computing the layout of
widgets within your window. You can implement a _configure_event
method to be part of this process. Erm, I think this happens here,
perhaps it's actually after map.

4) Now things are mapped. This is the process of asking the window
system to display the windows on the screen. map/unmap are a good pair
of events to look for if you want to be aware of window or widget
visibility at the lowest level.

5) Finally expose events come in from the window system, are routed to
your widgets, and cause drawing of the screen to take place. This can
be a long time (many milliseconds) after your original _show() call.

John
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux