Web lists-archives.com

Re: GTK with libdispatch (GCD) on Linux and X11




On 05/03/2016 03:26 PM, Integratron wrote:

This is great feedback! My application is very simple - it will only
have buttons, checkboxes and a graphics area for showing monitoring
information from a running application. There will be no file chooser,
or modal dialogs. (It is easy to imagine these types of widgets creeping
in.)

GTK almost certainly uses timeouts internally. For example, GTK button has a 200ms timeout before painting itself depressed, for a more appealing appearance. Menus have timeouts. It is my understanding that GTK 3 has more support for various animations, which are on the event loop level almost certainly implemented in terms of timeouts.

I wonder, however, if there might be a "Simple GTK Subset" that is
safe to use in the manner I outlined. What do you think? Would it be a
useful subset?

Even if such a subset existed at this point, it would not be safe against trivial changes in the implementation.

The separate-thread-event-loop approach, on the other hand, should be robust and straightforward to implement.

Fundamentally, GTK is based on an event-loop waiting on a poll, and
libdispatch unravels the poll into individual callbacks for each
event source.  It may turn out to be that these two aren't very
compatible.

If they are polling on different things, you shouldn't care. GTK will take care of the X11 socket and its own timeouts and queue of idle callbacks, and libdispatch will take care of everything else.

Hrvoje

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