… | |
… | |
4 | |
4 | |
5 | #ifndef RXVTPERL_H_ |
5 | #ifndef RXVTPERL_H_ |
6 | #define RXVTPERL_H_ |
6 | #define RXVTPERL_H_ |
7 | |
7 | |
8 | #if ENABLE_PERL |
8 | #if ENABLE_PERL |
9 | # define SHOULD_INVOKE(htype) rxvt_perl.should_invoke [htype] |
9 | # define SHOULD_INVOKE(htype) perl.should_invoke [htype] |
10 | # define HOOK_INVOKE(args) rxvt_perl.invoke args |
10 | # define HOOK_INVOKE(args) rxvt_perl.invoke args |
11 | |
11 | |
12 | #include "rxvt.h" |
12 | #include "rxvt.h" |
13 | |
13 | |
14 | enum data_type { |
14 | enum data_type { |
… | |
… | |
26 | # include "hookinc.h" |
26 | # include "hookinc.h" |
27 | # undef def |
27 | # undef def |
28 | HOOK_NUM, |
28 | HOOK_NUM, |
29 | }; |
29 | }; |
30 | |
30 | |
|
|
31 | struct rxvt_perl_term |
|
|
32 | { |
|
|
33 | void *self; |
|
|
34 | unsigned long grabtime; |
|
|
35 | uint8_t should_invoke[HOOK_NUM]; |
|
|
36 | }; |
|
|
37 | |
31 | struct rxvt_perl_interp |
38 | struct rxvt_perl_interp |
32 | { |
39 | { |
33 | rxvt_perl_interp (); |
40 | char **perl_environ; |
|
|
41 | |
34 | ~rxvt_perl_interp (); |
42 | ~rxvt_perl_interp (); |
35 | |
|
|
36 | bool should_invoke[HOOK_NUM]; |
|
|
37 | |
43 | |
38 | void init (); |
44 | void init (); |
39 | bool invoke (rxvt_term *term, hook_type htype, ...); |
45 | bool invoke (rxvt_term *term, hook_type htype, ...); |
40 | void line_update (rxvt_term *term); |
46 | void line_update (rxvt_term *term); |
41 | }; |
47 | }; |