# HG changeset patch # User Thinker K.F. Li # Date 1290417239 -28800 # Node ID 7f49b501ac4d562c95445e60a81f887efb6b646d # Parent c693cd8c6e236a62a4006a611e337bcd33955e2a Migrate examples/drag to new definition of backend diff -r c693cd8c6e23 -r 7f49b501ac4d examples/drag/main.c --- 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)