diff src/X_supp.c @ 1013:d5b8853767e7 refine_backend_if

Add flush function to mb_backend_t
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 22 Nov 2010 00:42:30 +0800
parents 914add76c210
children f7bf372a85a3
line wrap: on
line diff
--- a/src/X_supp.c	Mon Nov 22 00:42:30 2010 +0800
+++ b/src/X_supp.c	Mon Nov 22 00:42:30 2010 +0800
@@ -1188,13 +1188,24 @@
     io_man->unreg(io_man, hdl);
 }
 
+static int
+_x_mb_flush(mb_rt_t *rt) {
+    X_MB_runtime_t *xmb_rt = (X_MB_runtime_t *) rt;
+    int r;
+
+    r = XFlush(xmb_rt->display);
+    return r == 0? ERR: OK;
+}
+
 mb_backend_t backend = { X_MB_new,
 			 X_MB_new_with_win,
 			 
 			 X_MB_free,
+			 X_MB_free_keep_win,
 			 X_MB_add_event,
 			 X_MB_remove_event,
 			 _x_mb_event_loop,
+			 _x_mb_flush,
 			 
 			 X_MB_kbevents,
 			 X_MB_rdman,