… | |
… | |
13 | |
13 | |
14 | enum data_type { |
14 | enum data_type { |
15 | DT_END, |
15 | DT_END, |
16 | DT_INT, |
16 | DT_INT, |
17 | DT_LONG, |
17 | DT_LONG, |
18 | DT_STRING, |
18 | DT_STR, |
19 | DT_USTRING_LEN, |
19 | DT_STR_LEN, |
|
|
20 | DT_WCS_LEN, |
20 | DT_XEVENT, |
21 | DT_XEVENT, |
21 | }; |
22 | }; |
22 | |
23 | |
23 | enum hook_type { |
24 | enum hook_type { |
24 | # define def(sym) HOOK_ ## sym, |
25 | # define def(sym) HOOK_ ## sym, |
25 | # include "hookinc.h" |
26 | # include "hookinc.h" |
26 | # undef def |
27 | # undef def |
27 | HOOK_NUM, |
28 | HOOK_NUM, |
28 | }; |
29 | }; |
29 | |
30 | |
|
|
31 | struct rxvt_perl_term |
|
|
32 | { |
|
|
33 | void *self; |
|
|
34 | unsigned long grabtime; |
|
|
35 | }; |
|
|
36 | |
30 | struct rxvt_perl_interp |
37 | struct rxvt_perl_interp |
31 | { |
38 | { |
32 | rxvt_perl_interp (); |
39 | rxvt_perl_interp (); |
33 | ~rxvt_perl_interp (); |
40 | ~rxvt_perl_interp (); |
34 | |
41 | |
35 | bool should_invoke[HOOK_NUM]; |
42 | bool should_invoke[HOOK_NUM]; |
36 | |
43 | |
37 | void init (); |
44 | void init (bool tainted); |
38 | bool invoke (rxvt_term *term, hook_type htype, ...); |
45 | bool invoke (rxvt_term *term, hook_type htype, ...); |
39 | void line_update (rxvt_term *term); |
46 | void line_update (rxvt_term *term); |
40 | }; |
47 | }; |
41 | |
48 | |
42 | extern struct rxvt_perl_interp rxvt_perl; |
49 | extern struct rxvt_perl_interp rxvt_perl; |
43 | |
50 | |
44 | #else |
51 | #else |
45 | # define SHOULD_INVOKE(htype) false |
52 | # define SHOULD_INVOKE(htype) false |
46 | # define PERL_INVOKE(args) false |
53 | # define HOOK_INVOKE(args) false |
47 | #endif |
54 | #endif |
48 | |
55 | |
49 | #endif |
56 | #endif |
50 | |
57 | |