comparison nodejs/X_supp_njs.c @ 869:c18058fb48ee

Export API for JS to feed X events. We need the API that JS code can feed X events to X runtime.
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 24 Sep 2010 03:22:19 +0800
parents 586e50f82c1f
children 67d0fed24120
comparison
equal deleted inserted replaced
868:f41ac71266bc 869:c18058fb48ee
139 rt->enable_timer = 0; /* no timer, now */ 139 rt->enable_timer = 0; /* no timer, now */
140 140
141 return rt; 141 return rt;
142 } 142 }
143 143
144 /*! \brief Pass a X event to X runtime.
145 */
146 void
147 X_njs_MB_handle_single_event(njs_runtime_t *rt, void *evt) {
148 void *xrt = rt->xrt;
149 extern void _X_MB_handle_single_event(void *rt, void *evt);
150
151 _X_MB_handle_single_event(xrt, evt);
152 }
153
154 /*! \brief Called at end of an iteration of event loop.
155 */
156 void
157 X_njs_MB_no_more_event(njs_runtime_t *rt) {
158 void *xrt = rt->xrt;
159
160 _X_MB_no_more_event(xrt);
161 }
162
144 /*! \brief Get X runtime that is backend of this njs runtime. 163 /*! \brief Get X runtime that is backend of this njs runtime.
145 */ 164 */
146 void * 165 void *
147 _X_njs_MB_get_X_runtime(njs_runtime_t *rt) { 166 _X_njs_MB_get_X_runtime(njs_runtime_t *rt) {
148 return rt->xrt; 167 return rt->xrt;