annotate nodejs/X_supp_njs.h @ 1041:eb3d2e3381cb refine_backend_if

Fix typo for mb_runtime_free_keep_win()
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 23 Nov 2010 11:42:01 +0800
parents 22e5cf38d8e8
children 18256f404193
rev   line source
822
586e50f82c1f Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents: 681
diff changeset
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*-
586e50f82c1f Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents: 681
diff changeset
2 // vim: sw=4:ts=8:sts=4
550
127499ab2412 Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3 #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
4 #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
5
560
ce7a35abcb0d Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents: 556
diff changeset
6 #include <ev.h>
1039
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
7 #include <mb_backend.h>
560
ce7a35abcb0d Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents: 556
diff changeset
8
ce7a35abcb0d Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents: 556
diff changeset
9 typedef struct _njs_runtime {
ce7a35abcb0d Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents: 556
diff changeset
10 int enable_io;
ce7a35abcb0d Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents: 556
diff changeset
11 int enable_timer;
1039
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
12 mb_rt_t *xrt;
560
ce7a35abcb0d Function to instantiate coord for Javascript
Thinker K.F. Li <thinker@branda.to>
parents: 556
diff changeset
13 } njs_runtime_t;
550
127499ab2412 Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14
1040
22e5cf38d8e8 Timer manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 1039
diff changeset
15 extern void X_njs_MB_reg_timer_man(void);
1039
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
16 extern void X_njs_MB_reg_IO_man(void);
556
c9d23f7279a4 The first testcase that nodejs code can show a MadButterfly window.
Thinker K.F. Li <thinker@branda.to>
parents: 555
diff changeset
17 extern void X_njs_MB_init_handle_connection(njs_runtime_t *rt);
552
dd8d32b4c899 rename ev_data to rt
Thinker K.F. Li <thinker@branda.to>
parents: 551
diff changeset
18 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
19 extern njs_runtime_t *X_njs_MB_new(char *display_name, int w, int h);
871
67d0fed24120 Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents: 869
diff changeset
20 extern void X_njs_MB_free_keep_win(njs_runtime_t *rt);
67d0fed24120 Export a function to create a runtime for an existed window for JS
Thinker K.F. Li <thinker@codemud.net>
parents: 869
diff changeset
21 extern njs_runtime_t *X_njs_MB_new_with_win(void *display, long win);
571
13b15b7a463b Redraw all and changed in Javascript
Thinker K.F. Li <thinker@branda.to>
parents: 560
diff changeset
22 extern int X_njs_MB_flush(njs_runtime_t *rt);
869
c18058fb48ee Export API for JS to feed X events.
Thinker K.F. Li <thinker@codemud.net>
parents: 822
diff changeset
23 extern void X_njs_MB_handle_single_event(njs_runtime_t *rt, void *evt);
c18058fb48ee Export API for JS to feed X events.
Thinker K.F. Li <thinker@codemud.net>
parents: 822
diff changeset
24 extern void X_njs_MB_no_more_event(njs_runtime_t *rt);
1039
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
25 extern mb_rt_t *_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
26
1039
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
27 #define X_njs_MB_kbevents(rt) mb_runtime_kbevents((rt)->xrt)
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
28 #define X_njs_MB_rdman(rt) mb_runtime_rdman((rt)->xrt)
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
29 #define X_njs_MB_timer_man(rt) mb_runtime_timer_man((rt)->xrt)
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
30 #define X_njs_MB_ob_factory(rt) mb_runtime_ob_factory((rt)->xrt)
176cba3ad32c IO manager for njs
Thinker K.F. Li <thinker@codemud.net>
parents: 871
diff changeset
31 #define X_njs_MB_img_ldr(rt) mb_runtime_img_ldr((rt)->xrt)
555
962d8436a303 Define functions to fill gap of njs runtime.
Thinker K.F. Li <thinker@branda.to>
parents: 553
diff changeset
32
550
127499ab2412 Upgrade ndoejs plugin to level of a new runtime.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
33 #endif /* __X_SUPP_NJS_H_ */