Mercurial > MadButterfly
diff src/mb_types.h @ 73:9ab15ebc9061
Observer for mouse events
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 18 Aug 2008 01:59:26 +0800 |
parents | 1ca417f741f1 |
children | a6763f080da5 |
line wrap: on
line diff
--- a/src/mb_types.h Wed Aug 13 09:25:57 2008 +0800 +++ b/src/mb_types.h Mon Aug 18 01:59:26 2008 +0800 @@ -3,6 +3,7 @@ #include <cairo.h> #include "tools.h" +#include "observer.h" typedef float co_aix; typedef struct _shape shape_t; @@ -47,6 +48,8 @@ area_t *cur_area, *last_area; area_t areas[2]; + + subject_t *mouse_event; }; #define GEF_DIRTY 0x1 #define GEF_HIDDEN 0x2 @@ -96,6 +99,7 @@ struct _coord *sibling; STAILQ(shape_t) members; /*!< All shape_t objects in this coord. */ + subject_t *mouse_event; } coord_t; #define COF_DIRTY 0x1 #define COF_HIDDEN 0x2 @@ -129,8 +133,9 @@ shape_t *coord_mem_next; paint_t *fill, *stroke; co_aix stroke_width; - int stroke_linecap; - int stroke_linejoin; + int stroke_linecap:2; + int stroke_linejoin:2; + void (*free)(shape_t *shape); }; enum { SHT_UNKNOW, SHT_PATH, SHT_TEXT, SHT_RECT };