diff src/observer.h @ 122:17e97e92b76e

Encapsulate X_MB_runtime_t and support X keyboard events.
author Thinker K.F. Li <thinker@branda.to>
date Mon, 15 Sep 2008 20:33:06 +0800
parents 3645e29e4986
children 9e2316dc6ecb
line wrap: on
line diff
--- a/src/observer.h	Sun Sep 14 23:40:57 2008 +0800
+++ b/src/observer.h	Mon Sep 15 20:33:06 2008 +0800
@@ -11,7 +11,7 @@
 typedef void (*evt_handler)(event_t *event, void *arg);
 
 struct _event {
-    int type;
+    int type;			/*!< event type (a.k.a. EVT_*  */
     subject_t *tgt, *cur_tgt;
 };
 
@@ -40,7 +40,7 @@
 /*! \brief Flag that make a subject to propagate events to parents. */
 #define SUBF_STOP_PROPAGATE 0x1
 
-enum {OBJT_GEO, OBJT_COORD};
+enum {OBJT_GEO, OBJT_COORD, OBJT_KB};
 
 struct _mouse_event {
     event_t event;
@@ -69,7 +69,8 @@
 };
 
 enum {EVT_MOUSE_OVER, EVT_MOUSE_OUT, EVT_MOUSE_MOVE,
-      EVT_MOUSE_BUT_PRESS, EVT_MOUSE_BUT_RELEASE};
+      EVT_MOUSE_BUT_PRESS, EVT_MOUSE_BUT_RELEASE,
+      EVT_KB_PRESS, EVT_KB_RELEASE};
 
 extern subject_t *subject_new(ob_factory_t *factory,
 			      void *obj, int obj_type);