Mercurial > MadButterfly
annotate include/mb_af.h @ 1194:319414e4d87a
Fix the issue that is fault to switch scenes
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 02 Jan 2011 18:50:55 +0800 |
parents | 5d9def42df12 |
children |
rev | line source |
---|---|
822
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
456
diff
changeset
|
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- |
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
456
diff
changeset
|
2 // vim: sw=4:ts=8:sts=4 |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 #ifndef __APP_H |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
4 #define __APP_H |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
5 |
993
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
6 #include "mb_backend.h" |
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
7 |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
8 typedef struct _mbapp mbaf_t; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
9 struct _mbapp { |
993
5b58e74988bc
Use mb_backend_t::new instead of mb_backend_t::init
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
10 mb_rt_t *rt; |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
11 redraw_man_t *rdman; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
12 mb_sprite_t *rootsprite; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
13 mb_obj_t *root; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
14 subject_t *kbevents; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
15 void *private; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
16 }; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
17 mbaf_t *mbaf_init(const char *module, const char *module_dir); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
18 void mbaf_set_data(mbaf_t *app,void *data); |
994
5d9def42df12
Rename mb_backend_t::tman() to mb_backend_t::timer_man()
Thinker K.F. Li <thinker@codemud.net>
parents:
993
diff
changeset
|
19 mb_timer_man_t *mbaf_get_timer(mbaf_t *app); |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
20 void mbaf_loop(mbaf_t *app); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
21 #define MBAF_DATA(app,type) ((type *) ((app)->private)) |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
22 #define MBAF_RDMAN(app) (((mbaf_t *) app)->rdman) |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
23 #define MBAF_KB_SUBJECT(app) ((app)->kbevents) |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
24 |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
25 #include "mbbutton.h" |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
26 |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
27 #endif /* __MBAF_H_ */ |