Mercurial > MadButterfly
comparison include/mb_backend.h @ 985:bab9c0f836b9 refine_backend_if
doc backend
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 22 Nov 2010 00:42:29 +0800 |
parents | 3fe8054457a8 |
children | c39d14139ca5 |
comparison
equal
deleted
inserted
replaced
984:3fe8054457a8 | 985:bab9c0f836b9 |
---|---|
1 #ifndef __MB_BACKEND_H_ | 1 #ifndef __MB_BACKEND_H_ |
2 #define __MB_BACKEND_H_ | 2 #define __MB_BACKEND_H_ |
3 | |
4 #include "mb_config.h" | |
3 | 5 |
4 #ifdef X_BACKEND | 6 #ifdef X_BACKEND |
5 #include "mb_X_supp.h" | 7 #include "mb_X_supp.h" |
6 #endif | 8 #endif |
7 | 9 |
28 typedef struct { | 30 typedef struct { |
29 mb_rt_t *(*new)(const char *display, int w,int h); | 31 mb_rt_t *(*new)(const char *display, int w,int h); |
30 mb_rt_t *(*new_with_win)(const char *display, MBB_WINDOW win, int w,int h); | 32 mb_rt_t *(*new_with_win)(const char *display, MBB_WINDOW win, int w,int h); |
31 | 33 |
32 void (*free)(mb_rt_t *rt); | 34 void (*free)(mb_rt_t *rt); |
35 /*! \brief Request the backend to start monitoring a file descriptor. | |
36 * | |
37 * This is used only when the backend is responsible for event loop. | |
38 */ | |
33 void (*add_event)(mb_rt_t *rt,int type, int fd, mb_eventcb_t f,void *arg); | 39 void (*add_event)(mb_rt_t *rt,int type, int fd, mb_eventcb_t f,void *arg); |
40 /*! \brief Request the backend to stop monitoring a file descriptor. | |
41 * | |
42 * This is used only when the backend is responsible for event loop. | |
43 */ | |
34 void (*remove_event)(mb_rt_t *rt,int type, int fd); | 44 void (*remove_event)(mb_rt_t *rt,int type, int fd); |
35 void (*loop)(mb_rt_t *rt); | 45 /*! \brief Event Loop |
46 * | |
47 * This is called when main application does not handle event | |
48 * loop. Or, it should register an IO factory (i.e \ref | |
49 * mb_IO_factory_t) with the backend. | |
50 */ | |
51 void (*event_loop)(mb_rt_t *rt); | |
36 | 52 |
37 subject_t *(*kbevents)(mb_rt_t *rt); | 53 subject_t *(*kbevents)(mb_rt_t *rt); |
38 redraw_man_t *(*rdman)(mb_rt_t *rt); | 54 redraw_man_t *(*rdman)(mb_rt_t *rt); |
39 mb_timer_man_t *(*tman)(mb_rt_t *rt); | 55 mb_timer_man_t *(*tman)(mb_rt_t *rt); |
40 ob_factory_t *(*ob_factory)(mb_rt_t *rt); | 56 ob_factory_t *(*ob_factory)(mb_rt_t *rt); |