Mercurial > MadButterfly
comparison include/mb_redraw_man.h @ 448:16116d84bc5e
Replace Cairo with a abstract layer mb_graph_engine.
mb_graph_engine is a layer to separate MadButterfly from Cairo.
It is only a set of macro mapping to cairo implementation, now.
But, it provides a oppotunities to replace cairo with other engines;
likes skia.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 04 Aug 2009 23:35:41 +0800 |
parents | 3e84458968ec |
children | af4b506ad56f |
comparison
equal
deleted
inserted
replaced
447:38aae921243f | 448:16116d84bc5e |
---|---|
1 #ifndef __REDRAW_MAN_H_ | 1 #ifndef __REDRAW_MAN_H_ |
2 #define __REDRAW_MAN_H_ | 2 #define __REDRAW_MAN_H_ |
3 | 3 |
4 #include <cairo.h> | 4 #include "mb_graph_engine.h" |
5 #include "mb_tools.h" | 5 #include "mb_tools.h" |
6 #include "mb_types.h" | 6 #include "mb_types.h" |
7 #include "mb_observer.h" | 7 #include "mb_observer.h" |
8 #include "mb_img_ldr.h" | 8 #include "mb_img_ldr.h" |
9 | 9 |
63 STAILQ(shape_t) shapes; /*!< \brief All managed shapes. */ | 63 STAILQ(shape_t) shapes; /*!< \brief All managed shapes. */ |
64 STAILQ(paint_t) paints; /*!< \brief All managed paints. */ | 64 STAILQ(paint_t) paints; /*!< \brief All managed paints. */ |
65 | 65 |
66 free_objs_t free_objs; | 66 free_objs_t free_objs; |
67 | 67 |
68 cairo_t *cr; | 68 mbe_t *cr; |
69 cairo_t *backend; | 69 mbe_t *backend; |
70 | 70 |
71 ob_factory_t ob_factory; | 71 ob_factory_t ob_factory; |
72 | 72 |
73 subject_t *redraw; /*!< \brief Notified after redrawing. */ | 73 subject_t *redraw; /*!< \brief Notified after redrawing. */ |
74 subject_t *addrm_monitor; /*!< \brief Monitor adding/removing observers | 74 subject_t *addrm_monitor; /*!< \brief Monitor adding/removing observers |
87 co_aix w, h; /*!< \brief Size of viewport | 87 co_aix w, h; /*!< \brief Size of viewport |
88 * This is initialized by backend. | 88 * This is initialized by backend. |
89 */ | 89 */ |
90 }; | 90 }; |
91 | 91 |
92 extern int redraw_man_init(redraw_man_t *rdman, cairo_t *cr, | 92 extern int redraw_man_init(redraw_man_t *rdman, mbe_t *cr, |
93 cairo_t *backend); | 93 mbe_t *backend); |
94 extern void redraw_man_destroy(redraw_man_t *rdman); | 94 extern void redraw_man_destroy(redraw_man_t *rdman); |
95 extern int rdman_find_overlaid_shapes(redraw_man_t *rdman, | 95 extern int rdman_find_overlaid_shapes(redraw_man_t *rdman, |
96 geo_t *geo, | 96 geo_t *geo, |
97 geo_t ***overlays); | 97 geo_t ***overlays); |
98 extern int rdman_add_shape(redraw_man_t *rdman, | 98 extern int rdman_add_shape(redraw_man_t *rdman, |