Mercurial > MadButterfly
annotate nodejs/X_supp_njs.h @ 745:4ccb0553e804
Refactor code of free C objects into xnjsmb_coord_free_subtree
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 25 Aug 2010 14:43:48 +0800 |
parents | b601a4d6f7d1 |
children | 586e50f82c1f |
rev | line source |
---|---|
550
127499ab2412
Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 #ifndef __X_SUPP_NJS_H_ |
127499ab2412
Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
2 #define __X_SUPP_NJS_H_ |
127499ab2412
Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 |
560
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
4 #include <ev.h> |
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
5 |
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
6 typedef struct _njs_runtime { |
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
7 ev_io iowatcher; |
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
8 ev_timer tmwatcher; |
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
9 int enable_io; |
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
10 int enable_timer; |
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
11 void *xrt; |
ce7a35abcb0d
Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
556
diff
changeset
|
12 } njs_runtime_t; |
550
127499ab2412
Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
13 |
556
c9d23f7279a4
The first testcase that nodejs code can show a MadButterfly window.
Thinker K.F. Li <thinker@branda.to>
parents:
555
diff
changeset
|
14 extern void X_njs_MB_init_handle_connection(njs_runtime_t *rt); |
552 | 15 extern void X_njs_MB_free(njs_runtime_t *rt); |
551
9e69c4a0f565
rename njs_ev_data_t to njs_runtime_t
Thinker K.F. Li <thinker@branda.to>
parents:
550
diff
changeset
|
16 extern njs_runtime_t *X_njs_MB_new(char *display_name, int w, int h); |
571
13b15b7a463b
Redraw all and changed in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
560
diff
changeset
|
17 extern int X_njs_MB_flush(njs_runtime_t *rt); |
553
0a77b88500bf
rename _X_njs_MB_get_runtime to _X_njs_MB_get_X_runtime
Thinker K.F. Li <thinker@branda.to>
parents:
552
diff
changeset
|
18 extern void *_X_njs_MB_get_X_runtime(njs_runtime_t *rt); |
550
127499ab2412
Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
19 |
555
962d8436a303
Define functions to fill gap of njs runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
553
diff
changeset
|
20 #define X_njs_MB_kbevents(rt) X_MB_kbevents((rt)->xrt) |
962d8436a303
Define functions to fill gap of njs runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
553
diff
changeset
|
21 #define X_njs_MB_rdman(rt) X_MB_rdman((rt)->xrt) |
962d8436a303
Define functions to fill gap of njs runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
553
diff
changeset
|
22 #define X_njs_MB_tman(rt) X_MB_tman((rt)->xrt) |
962d8436a303
Define functions to fill gap of njs runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
553
diff
changeset
|
23 #define X_njs_MB_ob_factory(rt) X_MB_ob_factory((rt)->xrt) |
962d8436a303
Define functions to fill gap of njs runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
553
diff
changeset
|
24 #define X_njs_MB_img_ldr(rt) X_MB_img_ldr((rt)->xrt) |
681
b601a4d6f7d1
Change kbevent to kbevents and hide X_MB_kbevents()
Thinker K.F. Li <thinker@branda.to>
parents:
571
diff
changeset
|
25 #define X_njs_MB_kbevents(rt) X_MB_kbevents((rt)->xrt) |
555
962d8436a303
Define functions to fill gap of njs runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
553
diff
changeset
|
26 |
550
127499ab2412
Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
27 #endif /* __X_SUPP_NJS_H_ */ |