Mercurial > MadButterfly
comparison src/X_supp.c @ 987:bf0da8c7d03f refine_backend_if
Add default timer factory for X support
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 22 Nov 2010 00:42:29 +0800 |
parents | c39d14139ca5 |
children | bc8cfcd40d0e |
comparison
equal
deleted
inserted
replaced
986:c39d14139ca5 | 987:bf0da8c7d03f |
---|---|
72 int mflag; | 72 int mflag; |
73 int mx, my; /* Position of last motion event */ | 73 int mx, my; /* Position of last motion event */ |
74 int mbut_state; /* Button state of last motion event */ | 74 int mbut_state; /* Button state of last motion event */ |
75 }; | 75 }; |
76 | 76 |
77 /*! \defgroup x_mb_timer Timer manager for X. | |
78 * @{ | |
79 */ | |
80 struct _X_supp_timer_man { | |
81 mb_timer_man_t timer_man; | |
82 mb_tman_t *tman; | |
83 }; | |
84 | |
85 static struct _X_supp_timer_man _X_supp_default_timer_man = { | |
86 {_x_supp_timer_man_timeout, _x_supp_timer_man_remove}, | |
87 NULL | |
88 }; | |
89 | |
90 static mb_timer_factory_t _X_supp_default_timer_factory = { | |
91 _X_supp_timer_fact_new, | |
92 _X_supp_timer_fact_free | |
93 } | |
94 | |
95 /* @} */ | |
96 | |
77 /*! \defgroup x_mb_io IO manager for X. | 97 /*! \defgroup x_mb_io IO manager for X. |
78 * @{ | 98 * @{ |
79 */ | 99 */ |
80 #define MAX_MONITORS 200 | 100 #define MAX_MONITORS 200 |
81 | 101 |
104 }; | 124 }; |
105 static mb_IO_factory_t *_io_factory = _X_supp_default_io_factory; | 125 static mb_IO_factory_t *_io_factory = _X_supp_default_io_factory; |
106 | 126 |
107 static struct _X_MB_IO_man _default_io_man = { | 127 static struct _X_MB_IO_man _default_io_man = { |
108 {_x_mb_io_man_reg, _x_mb_io_man_unreg}, | 128 {_x_mb_io_man_reg, _x_mb_io_man_unreg}, |
109 , /* monitors */ | 129 {}, /* monitors */ |
110 0 /* n_monitor */ | 130 0 /* n_monitor */ |
111 }; | 131 }; |
112 | 132 |
113 static mb_IO_man_t * | 133 static mb_IO_man_t * |
114 _x_mb_io_man_new(void) { | 134 _x_mb_io_man_new(void) { |