Mercurial > MadButterfly
diff include/mb_redraw_man.h @ 249:ab8284c8dcee
* Add loopback reference from rdman to the backend. This is only required when we need to acquire the tman for the animation. This is not a reasonable arrangement since the animation should be backend transparent. We should not touch the backend directly from the animation. We should relocate the tman to the rdman.
* Remove reference to the MBApp from the mb_button_t so that it will be easier for us to generate button inside the sprite.
author | wycc |
---|---|
date | Sun, 04 Jan 2009 09:32:49 +0800 |
parents | 65cabbdd5284 |
children | 99a9cca4bbd0 |
line wrap: on
line diff
--- a/include/mb_redraw_man.h Sat Jan 03 08:43:29 2009 +0800 +++ b/include/mb_redraw_man.h Sun Jan 04 09:32:49 2009 +0800 @@ -74,6 +74,10 @@ * \see addrm_monitor_hdlr() */ mb_obj_t *last_mouse_over; + void *rt; /*!< \brief This is a pointer to the current + * graphic backend. + * \see rdman_attach_backend() + */ }; extern int redraw_man_init(redraw_man_t *rdman, cairo_t *cr, @@ -186,6 +190,10 @@ #define rdman_clear_shape_gl(rdman) \ DARRAY_CLEAN(rdman_get_gen_geos(rdman)) +/*! \brief Attach backend to the redraw manager so that we can hide the backend from the users. + * + */ +#define rdman_attach_backend(rdman,backend) (((rdman)->rt)=(backend)) /*! \brief Load sprite dymanicly from the shared object module. * * The search path can be changed by sprite_set_search_path. The name can have a relative path in the front of it. @@ -199,5 +207,4 @@ */ void sprite_set_search_path(char *path); - #endif /* __REDRAW_MAN_H_ */