| 1 |
root |
1.1 |
/* |
| 2 |
|
|
* rxvtperl.h |
| 3 |
|
|
*/ |
| 4 |
|
|
|
| 5 |
|
|
#ifndef RXVTPERL_H_ |
| 6 |
|
|
#define RXVTPERL_H_ |
| 7 |
|
|
|
| 8 |
|
|
#if ENABLE_PERL |
| 9 |
root |
1.18 |
# define SHOULD_INVOKE(htype) perl.should_invoke [htype] |
| 10 |
root |
1.9 |
# define HOOK_INVOKE(args) rxvt_perl.invoke args |
| 11 |
root |
1.1 |
|
| 12 |
|
|
#include "rxvt.h" |
| 13 |
|
|
|
| 14 |
|
|
enum data_type { |
| 15 |
|
|
DT_END, |
| 16 |
|
|
DT_INT, |
| 17 |
|
|
DT_LONG, |
| 18 |
root |
1.12 |
DT_STR, |
| 19 |
|
|
DT_STR_LEN, |
| 20 |
|
|
DT_WCS_LEN, |
| 21 |
root |
1.5 |
DT_XEVENT, |
| 22 |
root |
1.1 |
}; |
| 23 |
|
|
|
| 24 |
|
|
enum hook_type { |
| 25 |
root |
1.7 |
# define def(sym) HOOK_ ## sym, |
| 26 |
|
|
# include "hookinc.h" |
| 27 |
|
|
# undef def |
| 28 |
root |
1.1 |
HOOK_NUM, |
| 29 |
|
|
}; |
| 30 |
|
|
|
| 31 |
root |
1.13 |
struct rxvt_perl_term |
| 32 |
|
|
{ |
| 33 |
|
|
void *self; |
| 34 |
|
|
unsigned long grabtime; |
| 35 |
root |
1.18 |
uint8_t should_invoke[HOOK_NUM]; |
| 36 |
root |
1.13 |
}; |
| 37 |
|
|
|
| 38 |
root |
1.1 |
struct rxvt_perl_interp |
| 39 |
|
|
{ |
| 40 |
root |
1.16 |
char **perl_environ; |
| 41 |
|
|
|
| 42 |
root |
1.1 |
~rxvt_perl_interp (); |
| 43 |
|
|
|
| 44 |
root |
1.15 |
void init (); |
| 45 |
root |
1.1 |
bool invoke (rxvt_term *term, hook_type htype, ...); |
| 46 |
root |
1.9 |
void line_update (rxvt_term *term); |
| 47 |
root |
1.1 |
}; |
| 48 |
|
|
|
| 49 |
|
|
extern struct rxvt_perl_interp rxvt_perl; |
| 50 |
|
|
|
| 51 |
|
|
#else |
| 52 |
root |
1.9 |
# define SHOULD_INVOKE(htype) false |
| 53 |
root |
1.11 |
# define HOOK_INVOKE(args) false |
| 54 |
root |
1.1 |
#endif |
| 55 |
|
|
|
| 56 |
|
|
#endif |
| 57 |
|
|
|