annotate examples/dynamic/mbbutton.h @ 751:9f4a1134ec82

Use the coord.remove() to implement the processing canvas
author wycc
date Thu, 26 Aug 2010 00:28:12 +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