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