iruka-devel
[Top][All Lists]
Advanced

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

Re: [Iruka-devel] misc


From: Petr Klyushkin
Subject: Re: [Iruka-devel] misc
Date: 23 Aug 2002 10:44:10 +0400
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (bok choi)

Hello, Erwan!

>>>>> "Erwan" == Erwan Loisant writes:

 Erwan> Finally how is going the messages handling ?

When IMCom calls any of its callbacks, that callback will call
function cbHandleXXX(), with listener as first arg, event name as
second arg, and callback's own args.  Listener is a wxEvtHandler
instance.  Event name is a symbolic name for an event (see
irukaev.events.keys()).

cbHandleXXX() clears an event_handled flag which indicates that event
has been handled, then posts a wxWindows event to listener.  An
argument of this event is IrukaEvent instance which stores such
information as symbolic event name and arguments given to original
callback by IMCom.  After posting a wxWindows event cbHandleXXX will
wait till event_handled will be set.  All above is done in IMCom
thread.

Now lets see what's going on in GUI thread.  When a listener receives
a wxWindows event sent by cbHandleXXX(), on_jabber_event() is called
which executes _run_handlers(), which, in turn calls all registered
handlers via fire_event() and then sets event_handled flag, allowing
IMCom thread to continue its execution.

Event handlers are stored in a dict 'events', where symbolic event
names are keys and values are lists of handlers in the order in which
they'll be executed.

-- 
                                                             C'ya, Peter.
       address@hidden://petrk.pochtamt.ru]=--
        --=[ICQ 89449080]=--=[Jabber address@hidden

XMMS: Gates Of Ishtar - Perpetual Dawn





reply via email to

[Prev in Thread] Current Thread [Next in Thread]