annotate examples/dynamic/mbapp.h @ 271:c990a9a9648f

Fix bug of calculator. - calc can not handle button press event. - It caused by miss-understanding event_t::cur_tgt. It is a subject, not a shape that calc think. - event_t::cur_tgt::obj is a shape that calc want. It is a the subject that the subject stands for.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 25 Jan 2009 23:03:18 +0800
parents d9a78c859660
children
rev   line source
247
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
1 #ifndef __APP_H
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
2 #define __APP_H
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
3 typedef struct _mbapp MBApp;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
4 struct _mbapp {
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
5 void *rt;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
6 redraw_man_t *rdman;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
7 mb_sprite_t *rootsprite;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
8 mb_obj_t *root;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
9 void *private;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
10 };
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
11 MBApp *MBApp_Init(char *module);
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
12 void MBApp_setData(MBApp *app,void *data);
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
13 mb_tman_t *MBApp_getTimer(MBApp *app);
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
14 void MBApp_loop(MBApp *en);
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
15 #define MBAPP_DATA(app,type) ((type *) ((app)->private))
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
16 #define MBAPP_RDMAN(app) (((MBApp *) app)->rdman)
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
17
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
18 #include "mbbutton.h"
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
19 #endif