annotate include/mbapp.h @ 335:01038b8d8f05

Set the progm to be NULL so that we won't call mb_progm_abort when we call it at the next time. This will fix the crash issue of the dynamic. However, the dynamic is still crash sometimes if we click the button quickly. It looks like it crashes in the refresh. We need to future figure out the issue.
author wycc
date Sat, 07 Mar 2009 14:24:55 +0800
parents 2e97e8082d83
children 84ce2d4a8c3f
rev   line source
294
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
1 #ifndef __APP_H
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
2 #define __APP_H
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
3 typedef struct _mbapp MBApp;
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
4 struct _mbapp {
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
5 void *rt;
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
6 redraw_man_t *rdman;
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
7 mb_sprite_t *rootsprite;
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
8 mb_obj_t *root;
296
2e97e8082d83 * Fix the symbol definition code which does not assume the id is the same as the mbname.
wycc
parents: 294
diff changeset
9 subject_t *kbevents;
294
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
10 void *private;
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
11 };
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
12 MBApp *MBApp_Init(char *module);
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
13 void MBApp_setData(MBApp *app,void *data);
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
14 mb_tman_t *MBApp_getTimer(MBApp *app);
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
15 void MBApp_loop(MBApp *en);
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
16 #define MBAPP_DATA(app,type) ((type *) ((app)->private))
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
17 #define MBAPP_RDMAN(app) (((MBApp *) app)->rdman)
296
2e97e8082d83 * Fix the symbol definition code which does not assume the id is the same as the mbname.
wycc
parents: 294
diff changeset
18 #define MBAPP_keySubject(app) ((app)->kbevents)
294
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
19
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
20 #include "mbbutton.h"
2ca0773cd48d * Add MBAF files
wycc
parents:
diff changeset
21 #endif