diff examples/dynamic/mbbutton.h @ 247:d9a78c859660

Seperate the frameowrk codes from the main.c. Write a simpler MBAF demo hello program.
author wycc
date Thu, 01 Jan 2009 08:32:03 +0800
parents
children ab8284c8dcee
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/dynamic/mbbutton.h	Thu Jan 01 08:32:03 2009 +0800
@@ -0,0 +1,19 @@
+#ifndef __MBBUTTON_H
+#define __MBBUTTON_H
+typedef struct _mb_button {
+    mb_obj_t obj;
+    MBApp *en;
+    int state;
+    coord_t *root;
+    coord_t *active;
+    coord_t *normal;
+    coord_t *click;
+    void (*press)();
+    void *arg;
+    observer_t *obs_move,*obs_out,*obs_press;
+    mb_progm_t *progm;
+} mb_button_t;
+mb_button_t *mb_button_new(MBApp *app,mb_sprite_t *sp, char *name);
+void mb_button_add_onClick(mb_button_t *b, void (*h)(void *arg), void *arg);
+#endif
+