Mercurial > MadButterfly
comparison nodejs/X_supp_njs.h @ 1048:f26c4b621ec0
MErge head
author | wycc |
---|---|
date | Tue, 23 Nov 2010 23:55:24 +0800 |
parents | 18256f404193 |
children | df6ee4568ca2 |
comparison
equal
deleted
inserted
replaced
1047:4072a302b207 | 1048:f26c4b621ec0 |
---|---|
2 // vim: sw=4:ts=8:sts=4 | 2 // vim: sw=4:ts=8:sts=4 |
3 #ifndef __X_SUPP_NJS_H_ | 3 #ifndef __X_SUPP_NJS_H_ |
4 #define __X_SUPP_NJS_H_ | 4 #define __X_SUPP_NJS_H_ |
5 | 5 |
6 #include <ev.h> | 6 #include <ev.h> |
7 #include <mb_backend.h> | |
7 | 8 |
8 typedef struct _njs_runtime { | 9 typedef struct _njs_runtime { |
9 ev_io iowatcher; | 10 mb_rt_t *xrt; |
10 ev_timer tmwatcher; | |
11 int enable_io; | |
12 int enable_timer; | |
13 void *xrt; | |
14 } njs_runtime_t; | 11 } njs_runtime_t; |
15 | 12 |
16 extern void X_njs_MB_init_handle_connection(njs_runtime_t *rt); | 13 extern void X_njs_MB_reg_timer_man(void); |
14 extern void X_njs_MB_reg_IO_man(void); | |
15 /* extern void X_njs_MB_init_handle_connection(njs_runtime_t *rt); */ | |
17 extern void X_njs_MB_free(njs_runtime_t *rt); | 16 extern void X_njs_MB_free(njs_runtime_t *rt); |
18 extern njs_runtime_t *X_njs_MB_new(char *display_name, int w, int h); | 17 extern njs_runtime_t *X_njs_MB_new(char *display_name, int w, int h); |
19 extern void X_njs_MB_free_keep_win(njs_runtime_t *rt); | 18 extern void X_njs_MB_free_keep_win(njs_runtime_t *rt); |
20 extern njs_runtime_t *X_njs_MB_new_with_win(void *display, long win); | 19 extern njs_runtime_t *X_njs_MB_new_with_win(void *display, long win); |
21 extern int X_njs_MB_flush(njs_runtime_t *rt); | 20 extern int X_njs_MB_flush(njs_runtime_t *rt); |
22 extern void X_njs_MB_handle_single_event(njs_runtime_t *rt, void *evt); | 21 extern void X_njs_MB_handle_single_event(njs_runtime_t *rt, void *evt); |
23 extern void X_njs_MB_no_more_event(njs_runtime_t *rt); | 22 extern void X_njs_MB_no_more_event(njs_runtime_t *rt); |
24 extern void *_X_njs_MB_get_X_runtime(njs_runtime_t *rt); | 23 extern mb_rt_t *_X_njs_MB_get_X_runtime(njs_runtime_t *rt); |
25 | 24 |
26 #define X_njs_MB_kbevents(rt) X_MB_kbevents((rt)->xrt) | 25 #define X_njs_MB_kbevents(rt) mb_runtime_kbevents((rt)->xrt) |
27 #define X_njs_MB_rdman(rt) X_MB_rdman((rt)->xrt) | 26 #define X_njs_MB_rdman(rt) mb_runtime_rdman((rt)->xrt) |
28 #define X_njs_MB_tman(rt) X_MB_tman((rt)->xrt) | 27 #define X_njs_MB_timer_man(rt) mb_runtime_timer_man((rt)->xrt) |
29 #define X_njs_MB_ob_factory(rt) X_MB_ob_factory((rt)->xrt) | 28 #define X_njs_MB_ob_factory(rt) mb_runtime_ob_factory((rt)->xrt) |
30 #define X_njs_MB_img_ldr(rt) X_MB_img_ldr((rt)->xrt) | 29 #define X_njs_MB_img_ldr(rt) mb_runtime_img_ldr((rt)->xrt) |
31 #define X_njs_MB_kbevents(rt) X_MB_kbevents((rt)->xrt) | |
32 | 30 |
33 #endif /* __X_SUPP_NJS_H_ */ | 31 #endif /* __X_SUPP_NJS_H_ */ |