1 |
/* |
2 |
* rxvtperl.h |
3 |
*/ |
4 |
|
5 |
#ifndef RXVTPERL_H_ |
6 |
#define RXVTPERL_H_ |
7 |
|
8 |
#if ENABLE_PERL |
9 |
# define SHOULD_INVOKE(htype) rxvt_perl.should_invoke [htype] |
10 |
# define HOOK_INVOKE(args) rxvt_perl.invoke args |
11 |
|
12 |
#include "rxvt.h" |
13 |
|
14 |
enum data_type { |
15 |
DT_END, |
16 |
DT_INT, |
17 |
DT_LONG, |
18 |
DT_STRING, |
19 |
DT_STRING_LEN, |
20 |
DT_USTRING_LEN, |
21 |
DT_XEVENT, |
22 |
}; |
23 |
|
24 |
enum hook_type { |
25 |
# define def(sym) HOOK_ ## sym, |
26 |
# include "hookinc.h" |
27 |
# undef def |
28 |
HOOK_NUM, |
29 |
}; |
30 |
|
31 |
struct rxvt_perl_interp |
32 |
{ |
33 |
rxvt_perl_interp (); |
34 |
~rxvt_perl_interp (); |
35 |
|
36 |
bool should_invoke[HOOK_NUM]; |
37 |
|
38 |
void init (); |
39 |
bool invoke (rxvt_term *term, hook_type htype, ...); |
40 |
void line_update (rxvt_term *term); |
41 |
}; |
42 |
|
43 |
extern struct rxvt_perl_interp rxvt_perl; |
44 |
|
45 |
#else |
46 |
# define SHOULD_INVOKE(htype) false |
47 |
# define PERL_INVOKE(args) false |
48 |
#endif |
49 |
|
50 |
#endif |
51 |
|