Mercurial > MadButterfly
comparison src/mb_types.h @ 30:e06a4a667ce2
Accept mouse/pointer event and hint the shape that the pointer is over.
- add find_shape_at_pos()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 05 Aug 2008 12:40:45 +0800 |
parents | 604bc90d509d |
children | da770188a44d |
comparison
equal
deleted
inserted
replaced
29:f56c96b035a8 | 30:e06a4a667ce2 |
---|---|
50 int *n_overlays, geo_t **overlays); | 50 int *n_overlays, geo_t **overlays); |
51 #define geo_get_shape(g) ((g)->shape) | 51 #define geo_get_shape(g) ((g)->shape) |
52 #define geo_set_shape(g, sh) do {(g)->shape = sh;} while(0) | 52 #define geo_set_shape(g, sh) do {(g)->shape = sh;} while(0) |
53 #define _geo_is_in(a, s, w) ((a) >= (s) && (a) < ((s) + (w))) | 53 #define _geo_is_in(a, s, w) ((a) >= (s) && (a) < ((s) + (w))) |
54 #define geo_pos_is_in(g, _x, _y) \ | 54 #define geo_pos_is_in(g, _x, _y) \ |
55 (_geo_is_in(_x, (g)->cur_area.x, (g)->cur_area.w) && \ | 55 (_geo_is_in(_x, (g)->cur_area->x, (g)->cur_area->w) && \ |
56 _geo_is_in(_y, (g)->cur_area.y, (g)->cur_area.h)) | 56 _geo_is_in(_y, (g)->cur_area->y, (g)->cur_area->h)) |
57 | 57 |
58 | 58 |
59 /*! \brief A coordination system. | 59 /*! \brief A coordination system. |
60 * | 60 * |
61 * It have a transform function defined by matrix to transform | 61 * It have a transform function defined by matrix to transform |