changeset 1028:7f49b501ac4d refine_backend_if

Migrate examples/drag to new definition of backend
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 22 Nov 2010 17:13:59 +0800
parents c693cd8c6e23
children 71489039406b
files examples/drag/main.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/examples/drag/main.c	Mon Nov 22 17:02:49 2010 +0800
+++ b/examples/drag/main.c	Mon Nov 22 17:13:59 2010 +0800
@@ -10,7 +10,7 @@
 
 typedef struct _engine engine_t;
 struct _engine {
-    X_MB_runtime_t *rt;
+    mb_rt_t *rt;
     redraw_man_t *rdman;
     menu_t *menu;
     int state;
@@ -21,12 +21,12 @@
 engine_t *engine_init()
 {
 
-    X_MB_runtime_t *rt;
-    rt = X_MB_new(":0.0", 800, 600);
+    mb_rt_t *rt;
+    rt = mb_runtime_new(":0.0", 800, 600);
     engine_t *en = (engine_t *) malloc(sizeof(engine_t));
 
     en->rt = rt;
-    en->rdman =  X_MB_rdman(rt);
+    en->rdman =  mb_runtime_rdman(rt);
     en->state = 0;
     return en;
 }
@@ -36,13 +36,13 @@
      * Start handle connections, includes one to X server.
      * User start to interact with the application.
      */
-    X_MB_handle_connection(en->rt);
+    mb_runtime_event_loop(en->rt);
 
     /*
      * Clean
      */
     menu_free(en->menu);
-    X_MB_free(en->rt);
+    mb_runtime_free(en->rt);
     free(en);
 }
 #define COORD_SHOW(group) coord_show(group);rdman_coord_changed(X_MB_rdman(ex_rt->rt), group)