comparison src/observer.h @ 123:9e2316dc6ecb

Program completion events
author Thinker K.F. Li <thinker@branda.to>
date Tue, 16 Sep 2008 14:19:26 +0800
parents 17e97e92b76e
children 1c1f28c124c9
comparison
equal deleted inserted replaced
122:17e97e92b76e 123:9e2316dc6ecb
38 STAILQ(observer_t) observers; 38 STAILQ(observer_t) observers;
39 }; 39 };
40 /*! \brief Flag that make a subject to propagate events to parents. */ 40 /*! \brief Flag that make a subject to propagate events to parents. */
41 #define SUBF_STOP_PROPAGATE 0x1 41 #define SUBF_STOP_PROPAGATE 0x1
42 42
43 enum {OBJT_GEO, OBJT_COORD, OBJT_KB}; 43 enum {OBJT_GEO, OBJT_COORD, OBJT_KB, OBJT_PROGM};
44 44
45 struct _mouse_event { 45 struct _mouse_event {
46 event_t event; 46 event_t event;
47 int x, y; 47 int x, y;
48 unsigned int but_state; 48 unsigned int but_state;
68 subject_t *cur_subject); 68 subject_t *cur_subject);
69 }; 69 };
70 70
71 enum {EVT_MOUSE_OVER, EVT_MOUSE_OUT, EVT_MOUSE_MOVE, 71 enum {EVT_MOUSE_OVER, EVT_MOUSE_OUT, EVT_MOUSE_MOVE,
72 EVT_MOUSE_BUT_PRESS, EVT_MOUSE_BUT_RELEASE, 72 EVT_MOUSE_BUT_PRESS, EVT_MOUSE_BUT_RELEASE,
73 EVT_KB_PRESS, EVT_KB_RELEASE}; 73 EVT_KB_PRESS, EVT_KB_RELEASE, EVT_PROGM_COMPLETE};
74 74
75 extern subject_t *subject_new(ob_factory_t *factory, 75 extern subject_t *subject_new(ob_factory_t *factory,
76 void *obj, int obj_type); 76 void *obj, int obj_type);
77 extern void subject_free(ob_factory_t *factory, subject_t *subject); 77 extern void subject_free(ob_factory_t *factory, subject_t *subject);
78 extern void subject_notify(ob_factory_t *factory, 78 extern void subject_notify(ob_factory_t *factory,