annotate examples/dynamic/mbbutton.h @ 1299:6949e2b6cae2

Add unlink clone checker. - Monitor changes of DOM-tree of the document - Unlinking a clone is actually removing the clone and copying nodes from the source. - Copy value of ID of a node to saved_id to track source of copy nodes. - For a new node with 'saved_id' is a copy of another node. - Copy vulae of 'saved_id' to 'ns0:duplicate-src' to keep the source - Change value of 'saved_id' to the value of ID of the node for later copying. - For a new node without 'saved_id' is not a copy of another node. - only set 'saved_id' to the value of its ID.
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 16 Jan 2011 16:13:37 +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