Mercurial > MadButterfly
annotate dox/event_dispatching.h @ 274:96aae15527c8
Port all basic scene editor from pyGtk to the firefox
author | wycc |
---|---|
date | Thu, 29 Jan 2009 22:30:46 +0800 |
parents | 18f8c3126cdb |
children |
rev | line source |
---|---|
191
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 /*! \page event_dispatching Event Dispatching Mechanism in MadButterfly |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
2 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 * by wycc |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
4 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
5 * \section evt_intro Introduction |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
6 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
7 * Event dispatching is an important job for the GUI system. Usually, |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
8 * we need to handle the following events in the GUI |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
9 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
10 * - Mouse/pointer events |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
11 * - Key event |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
12 * - timer event |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
13 * - IO event |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
14 * - Repaint event |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
15 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
16 * In the rest of this article, I will discuss the event mechanism of |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
17 * the MadButterfly and provide a design of event API. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
18 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
19 * First thing go first. We will start from the most important event - |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
20 * mouse evnets. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
21 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
22 * \section evt_mouse Mouse/point events |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
23 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
24 * MadButterfly use observer design pattern to implement the event |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
25 * dispatching. In this pattern, observer and subject are used to |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
26 * handle events. The subject is a specific type of events. For |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
27 * example, mouse events or keyboard events. Each subject can have zero |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
28 * or more observers. When the system send events related to the subject, |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
29 * it will call the subject_notify function of the subject, which will |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
30 * notify every registered observers. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
31 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
32 * In this way, we can decouple the components which send the events and |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
33 * the components which need the events. For example, if we implement the |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
34 * X and GTK backend, both of them will call subject_notify when it |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
35 * receive the mouse events from the X or GTK. The observers don't |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
36 * care whether the notification coming from X or GTK. The X and GTK |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
37 * backend are responsible to translate the X or GTK mouse events into |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
38 * the mouse subject. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
39 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
40 * Therefore, we can use the subject as the astraction layer between |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
41 * MadButterfly clients and the backend. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
42 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
43 * To be more specific, in the current X backend. When it receive a |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
44 * MotionNotify mouse event from the X server, it will send an mouse |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
45 * event to the mouse event subject ob type OBJT_GEO. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
46 * \code |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
47 * mouse_event.event.type = etype; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
48 * mouse_event.x = x; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
49 * mouse_event.y = y; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
50 * mouse_event.but_state = state; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
51 * mouse_event.button = button; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
52 * subject = sh_get_mouse_event_subject(shape); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
53 * factory = rdman_get_ob_factory(rdman); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
54 * subject_notify(factory, subject, (event_t *)&mouse_event); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
55 * \endcode |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
56 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
57 * The shape above is determined by the mouse position and the etype |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
58 * is determined the shape under the mouse and the last shape which |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
59 * receive mouse event. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
60 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
61 * - If the mouse is on any shape, |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
62 * - If the new shape is the same as the last shape, we will send the |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
63 * EVT_MOUSE_MOVE events to it to notify it the mouse is moving inside it. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
64 * - If the new shape is not the same as the last shape, we will send the |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
65 * EVT_MOUSE_OVER to notify it the mouse is just touch it. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
66 * - If the current shape is not the same as the last shape, send the |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
67 * EVT_MOUSE_OUT to the last shape to tell it the mouse have left it. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
68 * \code |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
69 * mevt = (XMotionEvent *)&evt; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
70 * x = mevt->x; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
71 * y = mevt->y; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
72 * state = get_button_state(mevt->state); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
73 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
74 * shape = find_shape_at_pos(rdman, x, y, |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
75 * &in_stroke); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
76 * if(shape != NULL) { |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
77 * if(rt->last != shape) { |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
78 * if(rt->last) |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
79 * notify_shapes(rdman, rt->last, x, y, |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
80 * EVT_MOUSE_OUT, state, 0); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
81 * notify_shapes(rdman, shape, x, y, |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
82 * EVT_MOUSE_OVER, state, 0); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
83 * rt->last = shape; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
84 * } else |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
85 * notify_shapes(rdman, shape, x, y, |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
86 * EVT_MOUSE_MOVE, state, 0); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
87 * } else { |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
88 * if(rt->last) { |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
89 * notify_shapes(rdman, rt->last, x, y, |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
90 * EVT_MOUSE_OUT, state, 0); |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
91 * rt->last = NULL; |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
92 * } |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
93 * } |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
94 * \endcode |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
95 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
96 * Please remember that the subject will relay the the events to all of |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
97 * its parents. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
98 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
99 * PS. Currently, the MadButterfly does not have mechanism to stop |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
100 * propogation based on the result of the observer. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
101 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
102 * \section evt_key Key event |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
103 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
104 * The key events is send as subject type OBJT_KB. Each key object has |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
105 * the following fields code: The original raw keycode. sym: The symbol ID |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
106 * of the raw keycode. * event.type: EVT_KB_PRESS or EVT_KB_RELEASE |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
107 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
108 * \section evt_timer Timer event |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
109 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
110 * The timer use different mechanism. It does not use the observer pattern. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
111 * Instead, it is registered as separate timer queue. Do we want to change |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
112 * the implementation? |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
113 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
114 * \section evt_io IO event |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
115 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
116 * Currently, no IO events is available in the MadButterfly yet. W should |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
117 * add the following IO subjects. OBJT_FD: We need to provide some function |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
118 * to generate subject for file description. It will send events when teh |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
119 * file descriptor become available for read/write or error. OBJT_XMLIO: |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
120 * Provides functions similiar to the XMLSocket in actionscript. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
121 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
122 * \section evt_repaint Repaint |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
123 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
124 * The repaint event is not sent directly. Instead, the X backend call |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
125 * rdman_redraw_area directly to handle the repaint event. This function |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
126 * will send EVT_RDMAN_REDRAW out. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
127 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
128 * \section evt_summary Summary |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
129 * |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
130 * The observer pattern can be used to be the abstraction layer of the |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
131 * MadButterfly. The current implementation has effectively seperate the |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
132 * backend and the core engine. There is no direct call to the engine |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
133 * from the backend. All messages are deliver to the MadButterfly through |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
134 * the observer. |
18f8c3126cdb
Refine installation instructions and document event dispatching by wycc.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
135 */ |