Re: GDK + GLib main loop



On Thu, Jul 23, 2009 at 7:34 AM, Mihai Draghicioiu <
mihai draghicioiu gmail com> wrote:

I'd rather avoid the overhead of GTK+. My other choices were SDL and glut
(and maybe others), but none of those offer the features of GDK (and
GLib!).

I have thought about using GTK+, and it's just pointless overhead, because
I'm going to use my own (OpenGL-based) UI library. Besides, it's more fun
this way :)

I see. You like it the hard way ;)


Emmanuel: yes, i know about the examples directory, and I checked there for
a GDK-only example, but didn't find one... Thanks for the code, but it's
not
what I need :P

Try to see if you can register the same callbacks to the GDK objects. Then
you can still use the glib even loop. Instead of doing gtk_main() you will
need to create an event loop your self:

GMainLoop *loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run(loop);

-- 
Emmanuel Rodriguez



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