Re: show/hide widgets

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

 



>I use the GTK runtime 2.4.9
>
>The codesample is a bit complicated, 'cause it's part of a much bigger
>program.
>
>I tried to reduce it down to the interesting parts of the code ...
>
>First comes the beginning point. It's cycle-method is called from
>somewhere else once each turn. Beneath comes the intersting part of the
>code. There, the label and the slider are created.

IMHO, this is completely the wrong way to write a GUI. In particular:

>~  while(showWindow) {
>~    pthread_mutex_lock(&drawing);
>~    if(showWindow) {
>~      gtk_main_iteration_do(FALSE);
>~    }
>~    pthread_mutex_unlock(&drawing);
>~    usleep(10000);
>~  }

that is an unacceptable main event loop. A GUI is an event loop that
needs to be driven by arriving events from the input devices and the
display. it is not a programmatic loop run according to internal
program logic.

--p
_______________________________________________

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