Mercurial > MadButterfly
changeset 456:26c302b47de1
Change name of header files.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 06 Aug 2009 15:38:04 +0800 |
parents | 58b6337fb3b2 |
children | ea09fdab333a |
files | examples/dynamic/hello.c examples/dynamic/main.c examples/dynamic/mbbutton.c examples/dynamic/text.c examples/menu/filebrowser.c examples/menu/main.c include/Makefile.am include/animated_menu.h include/mb_af.h include/mb_ani_menu.h include/mbapp.h inkscape/firefox/template/textmenu/app.c inkscape/firefox/template/textmenu/main.c src/mbaf/animated_menu.c src/mbaf/mbapp.c src/mbaf/mbbutton.c |
diffstat | 16 files changed, 75 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/dynamic/hello.c Thu Aug 06 13:15:57 2009 +0800 +++ b/examples/dynamic/hello.c Thu Aug 06 15:38:04 2009 +0800 @@ -8,7 +8,7 @@ #include <mb.h> #include <string.h> //#include "menu.h" -#include "mbapp.h" +#include "mb_af.h" mbaf_t *app;
--- a/examples/dynamic/main.c Thu Aug 06 13:15:57 2009 +0800 +++ b/examples/dynamic/main.c Thu Aug 06 15:38:04 2009 +0800 @@ -8,7 +8,7 @@ #include <mb.h> #include <string.h> //#include "menu.h" -#include "mbapp.h" +#include "mb_af.h"
--- a/examples/dynamic/mbbutton.c Thu Aug 06 13:15:57 2009 +0800 +++ b/examples/dynamic/mbbutton.c Thu Aug 06 15:38:04 2009 +0800 @@ -2,7 +2,7 @@ #include <stdio.h> #include <mb.h> #include <string.h> -#include "mbapp.h" +#include "mb_af.h"
--- a/examples/dynamic/text.c Thu Aug 06 13:15:57 2009 +0800 +++ b/examples/dynamic/text.c Thu Aug 06 15:38:04 2009 +0800 @@ -8,7 +8,7 @@ #include <mb.h> #include <string.h> //#include "menu.h" -#include "mbapp.h" +#include "m_af.h" mbaf_t *app;
--- a/examples/menu/filebrowser.c Thu Aug 06 13:15:57 2009 +0800 +++ b/examples/menu/filebrowser.c Thu Aug 06 15:38:04 2009 +0800 @@ -15,8 +15,8 @@ #include <string.h> #include <dirent.h> //#include "menu.h" -#include "mbapp.h" -#include <animated_menu.h> +#include "mb_af.h" +#include <mb_ani_menu.h>
--- a/examples/menu/main.c Thu Aug 06 13:15:57 2009 +0800 +++ b/examples/menu/main.c Thu Aug 06 15:38:04 2009 +0800 @@ -14,8 +14,8 @@ #include <mb.h> #include <string.h> //#include "menu.h" -#include "mbapp.h" -#include "animated_menu.h" +#include "mb_af.h" +#include "mb_ani_menu.h"
--- a/include/Makefile.am Thu Aug 06 13:15:57 2009 +0800 +++ b/include/Makefile.am Thu Aug 06 15:38:04 2009 +0800 @@ -11,7 +11,7 @@ mb_prop.h \ mb_X_supp.h \ mb_img_ldr.h \ - mbapp.h \ - animated_menu.h \ + mb_af.h \ + mb_ani_menu.h \ mbbutton.h \ mb_so.h
--- a/include/animated_menu.h Thu Aug 06 13:15:57 2009 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -#ifndef __ANIMATED_MENU_H -#define __ANIMATED_MENU_H -typedef struct _mb_animated_menu { - char **titles; - int *menus_y; - int *items; - int top; - int cur; - int max; - int ready; - int speed; - mbaf_t *app; - mb_sprite_t *sprite; - mb_obj_t **objects; - mb_obj_t *lightbar; - void (*callback)(struct _mb_animated_menu *m, int sel); - void (*update_callback)(struct _mb_animated_menu *m, int sel); - mb_progm_t *progm; - X_kb_event_t pending_keys[16]; - int pending_pos, pending_last; -} mb_animated_menu_t; -/** \brief Create an instace of animated menu. - * - * The objectnames is used to extract symbols from the SVG file. - * ${objectnames}0 - ${objectnames}8 is the text object. - * ${objectnames}_lightbar is the lightbar. - * - */ -mb_animated_menu_t *mb_animated_menu_new(mbaf_t *app,mb_sprite_t *sp,char *objnames,char *menus[]); -void mb_animated_menu_set_speed(mb_animated_menu_t *m,int speed); -int mb_animated_menu_get_speed(mb_animated_menu_t *m); -void mb_animated_menu_set_callback(mb_animated_menu_t *m, void (*f)(mb_animated_menu_t *m, int sel)); -#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/mb_af.h Thu Aug 06 15:38:04 2009 +0800 @@ -0,0 +1,23 @@ +#ifndef __APP_H +#define __APP_H + +typedef struct _mbapp mbaf_t; +struct _mbapp { + void *rt; + redraw_man_t *rdman; + mb_sprite_t *rootsprite; + mb_obj_t *root; + subject_t *kbevents; + void *private; +}; +mbaf_t *mbaf_init(const char *module, const char *module_dir); +void mbaf_set_data(mbaf_t *app,void *data); +mb_tman_t *mbaf_get_timer(mbaf_t *app); +void mbaf_loop(mbaf_t *app); +#define MBAF_DATA(app,type) ((type *) ((app)->private)) +#define MBAF_RDMAN(app) (((mbaf_t *) app)->rdman) +#define MBAF_KB_SUBJECT(app) ((app)->kbevents) + +#include "mbbutton.h" + +#endif /* __MBAF_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/mb_ani_menu.h Thu Aug 06 15:38:04 2009 +0800 @@ -0,0 +1,33 @@ +#ifndef __ANIMATED_MENU_H +#define __ANIMATED_MENU_H +typedef struct _mb_animated_menu { + char **titles; + int *menus_y; + int *items; + int top; + int cur; + int max; + int ready; + int speed; + mbaf_t *app; + mb_sprite_t *sprite; + mb_obj_t **objects; + mb_obj_t *lightbar; + void (*callback)(struct _mb_animated_menu *m, int sel); + void (*update_callback)(struct _mb_animated_menu *m, int sel); + mb_progm_t *progm; + X_kb_event_t pending_keys[16]; + int pending_pos, pending_last; +} mb_animated_menu_t; +/** \brief Create an instace of animated menu. + * + * The objectnames is used to extract symbols from the SVG file. + * ${objectnames}0 - ${objectnames}8 is the text object. + * ${objectnames}_lightbar is the lightbar. + * + */ +mb_animated_menu_t *mb_animated_menu_new(mbaf_t *app,mb_sprite_t *sp,char *objnames,char *menus[]); +void mb_animated_menu_set_speed(mb_animated_menu_t *m,int speed); +int mb_animated_menu_get_speed(mb_animated_menu_t *m); +void mb_animated_menu_set_callback(mb_animated_menu_t *m, void (*f)(mb_animated_menu_t *m, int sel)); +#endif
--- a/include/mbapp.h Thu Aug 06 13:15:57 2009 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -#ifndef __APP_H -#define __APP_H - -typedef struct _mbapp mbaf_t; -struct _mbapp { - void *rt; - redraw_man_t *rdman; - mb_sprite_t *rootsprite; - mb_obj_t *root; - subject_t *kbevents; - void *private; -}; -mbaf_t *mbaf_init(const char *module, const char *module_dir); -void mbaf_set_data(mbaf_t *app,void *data); -mb_tman_t *mbaf_get_timer(mbaf_t *app); -void mbaf_loop(mbaf_t *app); -#define MBAF_DATA(app,type) ((type *) ((app)->private)) -#define MBAF_RDMAN(app) (((mbaf_t *) app)->rdman) -#define MBAF_KB_SUBJECT(app) ((app)->kbevents) - -#include "mbbutton.h" - -#endif /* __MBAF_H_ */
--- a/inkscape/firefox/template/textmenu/app.c Thu Aug 06 13:15:57 2009 +0800 +++ b/inkscape/firefox/template/textmenu/app.c Thu Aug 06 15:38:04 2009 +0800 @@ -1,7 +1,7 @@ #include <stdio.h> #include <mb.h> -#include "mbapp.h" -#include "animated_menu.h" +#include "mb_af.h" +#include "mb_ani_menu.h" #include "%n.h" void myselect_callback(mb_animated_menu_t *m, int select)
--- a/inkscape/firefox/template/textmenu/main.c Thu Aug 06 13:15:57 2009 +0800 +++ b/inkscape/firefox/template/textmenu/main.c Thu Aug 06 15:38:04 2009 +0800 @@ -2,8 +2,8 @@ #include <mb.h> #include <string.h> //#include "menu.h" -#include "mbapp.h" -#include "animated_menu.h" +#include "mb_af.h" +#include "mb_ani_menu.h" #include "%n.h" @@ -40,7 +40,7 @@ mb_obj_t *button; MyAppData data; - myApp = mbaf_init("list"); + myApp = mbaf_init("list", ""); mbaf_set_data(myApp,&data); _MyApp_InitContent(argc,argv);
--- a/src/mbaf/animated_menu.c Thu Aug 06 13:15:57 2009 +0800 +++ b/src/mbaf/animated_menu.c Thu Aug 06 15:38:04 2009 +0800 @@ -2,8 +2,8 @@ #include <mb.h> #include <string.h> //#include "menu.h" -#include "mbapp.h" -#include <animated_menu.h> +#include "mb_af.h" +#include "mb_ani_menu.h" static void mb_animated_menu_update(mb_animated_menu_t *m); static void set_text(coord_t *g, char *text) {