# HG changeset patch # User Thinker K.F. Li # Date 1236437951 -28800 # Node ID 55e0b22b919e3156f486a1be43304ecae897622b # Parent 995eb2c1a1aa5dc5971dfbcfddf672085e35a139 examples/dynamic/mbapp.[ch] are not more used. - If they are still there, it causes examples/dynamic crash. Since MBApp defined in examples/dynamic/mbapp.[ch] are different from ones in include/mbapp.h. diff -r 995eb2c1a1aa -r 55e0b22b919e examples/dynamic/mbapp.c --- a/examples/dynamic/mbapp.c Sat Mar 07 14:25:20 2009 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -#include -#include -MBApp *MBApp_Init(char *module) -{ - MBApp *app = (MBApp *) malloc(sizeof(MBApp)); - X_MB_runtime_t *rt; - - rt = X_MB_new(":0.0", 800, 600); - - app->rt = rt; - app->rdman = X_MB_rdman(rt); - app->rootsprite= sprite_load(module,app->rdman, app->rdman->root_coord); - rdman_attach_backend(app->rdman, rt); - MB_SPRITE_GOTO_SCENE(app->rootsprite, 1); - return app; -} - -void MBApp_setData(MBApp *app,void *data) -{ - app->private = (void *) data; -} - -mb_tman_t *MBApp_getTimer(MBApp *app) -{ - return X_MB_tman(app->rt); -} - -void MBApp_loop(MBApp *en) -{ - /* - * Start handle connections, includes one to X server. - * User start to interact with the application. - */ - X_MB_handle_connection(en->rt); - - /* - * Clean - */ - X_MB_free(en->rt); - free(en); -} diff -r 995eb2c1a1aa -r 55e0b22b919e examples/dynamic/mbapp.h --- a/examples/dynamic/mbapp.h Sat Mar 07 14:25:20 2009 +0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -#ifndef __APP_H -#define __APP_H -typedef struct _mbapp MBApp; -struct _mbapp { - void *rt; - redraw_man_t *rdman; - mb_sprite_t *rootsprite; - mb_obj_t *root; - void *private; -}; -MBApp *MBApp_Init(char *module); -void MBApp_setData(MBApp *app,void *data); -mb_tman_t *MBApp_getTimer(MBApp *app); -void MBApp_loop(MBApp *en); -#define MBAPP_DATA(app,type) ((type *) ((app)->private)) -#define MBAPP_RDMAN(app) (((MBApp *) app)->rdman) - -#include "mbbutton.h" -#endif