Re: External event loop for glib?

Kenneth Albanowski wrote:
> On 28 Mar 1999, Owen Taylor wrote:
> Let me add on to Owen's comments by saying that we (or as least I) would
> like to see the Gtk (GLib, really) main loop become the standard
> "universal" main loop. So far everybody has rolled their own, and it makes
> it nearly impossible to blend different systems together (witness the
> current problems :-). If this means fixing all sorts of bugs, and
> borrowing the neat features from every other main loop implementation,
> then so be it.

This might be possible if gtk+/glib would be a standard library
available on every system. Unfortuntatly this is not the case. As
someone who would like to use gtk+ as a GUI toolkit, I'm somewhat
annoyed by the requirement for the runloop.

Eg, I'm using the Objective-C Foundation library which is much like
glib. This library runs on a variety of systems, including Windows and
most Unixes. There are various GUI toolkits written in ObjC that run on
top of the Foundation library and it is IMHO not acceptable to change
the Foundation just for gtk+.

Personally I do not understand what's so difficult about supporting
external eventloops with gtk+ (it's not even about accessing gmainloop
!). There just need to be some entrance functions to setup/teardown gtk+
and some hooks for adding events. Eg. gtk+ could use function callbacks
for doing runloop stuff, those could be reassigned by other runloops.

> Moreover, any comments leading towards a better main loop -- one that can
> take over more resposibilities from other packages, or even one that can
> easily be subsumed by or cooperate with other implementations -- would be
> welcome.

Well, for example the Foundation NSRunLoop class supports so called
modes. Take a look at

MDlink online service center

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