Mercurial > MadButterfly
comparison include/mb_backend.h @ 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 | 02d52058d352 |
children | 9b5d4839c5bb |
comparison
equal
deleted
inserted
replaced
1012:914add76c210 | 1013:d5b8853767e7 |
---|---|
44 typedef struct { | 44 typedef struct { |
45 mb_rt_t *(*new)(const char *display, int w,int h); | 45 mb_rt_t *(*new)(const char *display, int w,int h); |
46 mb_rt_t *(*new_with_win)(MB_DISPLAY display, MB_WINDOW win); | 46 mb_rt_t *(*new_with_win)(MB_DISPLAY display, MB_WINDOW win); |
47 | 47 |
48 void (*free)(mb_rt_t *rt); | 48 void (*free)(mb_rt_t *rt); |
49 void (*free_keep_win)(mb_rt_t *rt); | |
49 /*! \brief Request the backend to start monitoring a file descriptor. | 50 /*! \brief Request the backend to start monitoring a file descriptor. |
50 * | 51 * |
51 * This is used only when the backend is responsible for event loop. | 52 * This is used only when the backend is responsible for event loop. |
52 */ | 53 */ |
53 int (*add_event)(mb_rt_t *rt, int fd, MB_IO_TYPE type, | 54 int (*add_event)(mb_rt_t *rt, int fd, MB_IO_TYPE type, |
62 * This is called when main application does not handle event | 63 * This is called when main application does not handle event |
63 * loop. Or, it should register an IO factory (i.e \ref | 64 * loop. Or, it should register an IO factory (i.e \ref |
64 * mb_IO_factory_t) with the backend. | 65 * mb_IO_factory_t) with the backend. |
65 */ | 66 */ |
66 void (*event_loop)(mb_rt_t *rt); | 67 void (*event_loop)(mb_rt_t *rt); |
68 | |
69 /*! \brief Flush requests to screen server if existed */ | |
70 int (*flush)(mb_rt_t *rt); | |
67 | 71 |
68 subject_t *(*kbevents)(mb_rt_t *rt); | 72 subject_t *(*kbevents)(mb_rt_t *rt); |
69 redraw_man_t *(*rdman)(mb_rt_t *rt); | 73 redraw_man_t *(*rdman)(mb_rt_t *rt); |
70 mb_timer_man_t *(*timer_man)(mb_rt_t *rt); | 74 mb_timer_man_t *(*timer_man)(mb_rt_t *rt); |
71 ob_factory_t *(*ob_factory)(mb_rt_t *rt); | 75 ob_factory_t *(*ob_factory)(mb_rt_t *rt); |