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