annotate examples/dynamic/mbbutton.h @ 1166:d73ef03c96de

Refactory code of MBScene.updateUI() from MBScene.show() - It is too busy to reborn full GUI components of pyink everytime the content being updated. - It is fixed by moveing code about updating of frameline to MBScene._updateUI() and avoid calling MBScene.show() to reduce time for updating frameline.
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 29 Dec 2010 21:16:27 +0800
parents ab8284c8dcee
children
rev   line source
247
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
1 #ifndef __MBBUTTON_H
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
2 #define __MBBUTTON_H
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
3 typedef struct _mb_button {
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
4 mb_obj_t obj;
249
ab8284c8dcee * Add loopback reference from rdman to the backend. This is only required when we need to acquire the tman for the animation. This is not a reasonable arrangement since the animation should be backend transparent. We should not touch the backend directly from the animation. We should relocate the tman to the rdman.
wycc
parents: 247
diff changeset
5 redraw_man_t *rdman;
247
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
6 int state;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
7 coord_t *root;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
8 coord_t *active;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
9 coord_t *normal;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
10 coord_t *click;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
11 void (*press)();
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
12 void *arg;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
13 observer_t *obs_move,*obs_out,*obs_press;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
14 mb_progm_t *progm;
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
15 } mb_button_t;
249
ab8284c8dcee * Add loopback reference from rdman to the backend. This is only required when we need to acquire the tman for the animation. This is not a reasonable arrangement since the animation should be backend transparent. We should not touch the backend directly from the animation. We should relocate the tman to the rdman.
wycc
parents: 247
diff changeset
16 mb_button_t *mb_button_new(redraw_man_t *rdman,mb_sprite_t *sp, char *name);
247
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
17 void mb_button_add_onClick(mb_button_t *b, void (*h)(void *arg), void *arg);
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
18 #endif
d9a78c859660 Seperate the frameowrk codes from the main.c.
wycc
parents:
diff changeset
19