Mercurial > MadButterfly
annotate include/mb_ani_menu.h @ 1169:ac5f960ba6cf
Merge
author | wycc |
---|---|
date | Thu, 30 Dec 2010 11:12:34 +0800 |
parents | 1993e5ae60aa |
children |
rev | line source |
---|---|
822
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
456
diff
changeset
|
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- |
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
456
diff
changeset
|
2 // vim: sw=4:ts=8:sts=4 |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 #ifndef __ANIMATED_MENU_H |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
4 #define __ANIMATED_MENU_H |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
5 typedef struct _mb_animated_menu { |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
6 char **titles; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
7 int *menus_y; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
8 int *items; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
9 int top; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
10 int cur; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
11 int max; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
12 int ready; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
13 int speed; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
14 mbaf_t *app; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
15 mb_sprite_t *sprite; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
16 mb_obj_t **objects; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
17 mb_obj_t *lightbar; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
18 void (*callback)(struct _mb_animated_menu *m, int sel); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
19 void (*update_callback)(struct _mb_animated_menu *m, int sel); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
20 mb_progm_t *progm; |
1112
1993e5ae60aa
Rename X_kb_event_t to mb_kb_event_t
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
21 mb_kb_event_t pending_keys[16]; |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
22 int pending_pos, pending_last; |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
23 } mb_animated_menu_t; |
822
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
456
diff
changeset
|
24 /** \brief Create an instace of animated menu. |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
25 * |
822
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
456
diff
changeset
|
26 * The objectnames is used to extract symbols from the SVG file. |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
27 * ${objectnames}0 - ${objectnames}8 is the text object. |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
28 * ${objectnames}_lightbar is the lightbar. |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
29 * |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
30 */ |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
31 mb_animated_menu_t *mb_animated_menu_new(mbaf_t *app,mb_sprite_t *sp,char *objnames,char *menus[]); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
32 void mb_animated_menu_set_speed(mb_animated_menu_t *m,int speed); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
33 int mb_animated_menu_get_speed(mb_animated_menu_t *m); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
34 void mb_animated_menu_set_callback(mb_animated_menu_t *m, void (*f)(mb_animated_menu_t *m, int sel)); |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
35 #endif |