From: Eric P. <al...@gm...> - 2007-03-20 03:58:03
|
i'm trying to get a good handle on how the event handling works with gaim-text. i've done quite a bit of event handling with Java, but not much with Gtk+.style events. so a few questions follow: 1. where do the events get mapped to their callback functions? the only place i've seen anything is gntui.c::gnu_ui_init where the actions get mapped. so I see how those are mapped to the wm. but how are the events triggered? how does the gtk thread know to send "Accounts" when I select that option in the menu? 2. all the special hotkeys that are mapped to move windows around and whatnot...where are those events caught? 3. when libgnt/gntmain.c::g_main_loop_run starts, where does control transfer to? i'm tempted to think that it just goes into a wait state waiting for events to trigger callbacks, but there are several things i think that remain to be initialized still. 4. lastly, when does libgnt/gntwm.c::gnt_wm_init get called? as i was writing this i came across g_signal_connect and think that might answer some of these questions. but if you have something to add, i would muchly appreciate it. i know it sounds like i've never worked with event driven before, i assure you, i know the concept, i'm just a little new to Gtk+ style event handling, and am excited about learning how it works so i can get on to the more important things involved in working with gaim-text. some of which involve improving the wm. On 3/19/07, Adil <ad...@ya...> wrote: > > --- Eric Polino <al...@gm...> wrote: > > > i'm doing some research here and get caught up with the > > gm_main_loop_run() calls in gnt_main() in libgnt/gntmain.c i can't > > find those funtions anywhere in all the source. i'm guessing it's a > > g_main_loop_run starts the main event-loop in GLib, which manages the > events, signals, timeouts and the whole lot. The documentation for that is > at > http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html > > Sadrul > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- "Every man dies, not every man really lives." --- William Wallace |