Mercurial > MadButterfly
comparison include/mb_af.h @ 1067:7b4e80ab671a openvg
merge from default branch
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 01 Dec 2010 12:25:56 +0800 |
parents | 5d9def42df12 |
children |
comparison
equal
deleted
inserted
replaced
630:bd18951b51d5 | 1067:7b4e80ab671a |
---|---|
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- | |
2 // vim: sw=4:ts=8:sts=4 | |
1 #ifndef __APP_H | 3 #ifndef __APP_H |
2 #define __APP_H | 4 #define __APP_H |
3 | 5 |
6 #include "mb_backend.h" | |
7 | |
4 typedef struct _mbapp mbaf_t; | 8 typedef struct _mbapp mbaf_t; |
5 struct _mbapp { | 9 struct _mbapp { |
6 void *rt; | 10 mb_rt_t *rt; |
7 redraw_man_t *rdman; | 11 redraw_man_t *rdman; |
8 mb_sprite_t *rootsprite; | 12 mb_sprite_t *rootsprite; |
9 mb_obj_t *root; | 13 mb_obj_t *root; |
10 subject_t *kbevents; | 14 subject_t *kbevents; |
11 void *private; | 15 void *private; |
12 }; | 16 }; |
13 mbaf_t *mbaf_init(const char *module, const char *module_dir); | 17 mbaf_t *mbaf_init(const char *module, const char *module_dir); |
14 void mbaf_set_data(mbaf_t *app,void *data); | 18 void mbaf_set_data(mbaf_t *app,void *data); |
15 mb_tman_t *mbaf_get_timer(mbaf_t *app); | 19 mb_timer_man_t *mbaf_get_timer(mbaf_t *app); |
16 void mbaf_loop(mbaf_t *app); | 20 void mbaf_loop(mbaf_t *app); |
17 #define MBAF_DATA(app,type) ((type *) ((app)->private)) | 21 #define MBAF_DATA(app,type) ((type *) ((app)->private)) |
18 #define MBAF_RDMAN(app) (((mbaf_t *) app)->rdman) | 22 #define MBAF_RDMAN(app) (((mbaf_t *) app)->rdman) |
19 #define MBAF_KB_SUBJECT(app) ((app)->kbevents) | 23 #define MBAF_KB_SUBJECT(app) ((app)->kbevents) |
20 | 24 |