diff include/mb_observer.h @ 198:f9d507a3e1d9

Add event observer which listen to one event type only.
author wycc@wycc-desktop
date Fri, 05 Dec 2008 22:12:18 +0800
parents 54fdc2a65242
children 748896358da2
line wrap: on
line diff
--- a/include/mb_observer.h	Wed Nov 19 00:27:20 2008 +0800
+++ b/include/mb_observer.h	Fri Dec 05 22:12:18 2008 +0800
@@ -20,6 +20,7 @@
  * A target for receiving events.
  */
 struct _observer {
+    int type;
     evt_handler hdr;
     void *arg;
     observer_t *next;
@@ -71,7 +72,7 @@
 				     subject_t *cur_subject);
 };
 
-enum {EVT_MOUSE_OVER, EVT_MOUSE_OUT, EVT_MOUSE_MOVE,
+enum {EVT_ANY,EVT_MOUSE_OVER, EVT_MOUSE_OUT, EVT_MOUSE_MOVE,
       EVT_MOUSE_BUT_PRESS, EVT_MOUSE_BUT_RELEASE,
       EVT_KB_PRESS, EVT_KB_RELEASE, EVT_PROGM_COMPLETE,
       EVT_RDMAN_REDRAW };