--- rxvt-unicode/src/rxvtperl.h 2006/01/02 15:35:43 1.1 +++ rxvt-unicode/src/rxvtperl.h 2006/01/08 08:43:11 1.14 @@ -6,43 +6,34 @@ #define RXVTPERL_H_ #if ENABLE_PERL +# define SHOULD_INVOKE(htype) rxvt_perl.should_invoke [htype] +# define HOOK_INVOKE(args) rxvt_perl.invoke args #include "rxvt.h" -#define PERL_INVOKE(args) rxvt_perl.invoke args - enum data_type { DT_END, DT_INT, DT_LONG, + DT_STR, + DT_STR_LEN, + DT_WCS_LEN, + DT_XEVENT, }; enum hook_type { - HOOK_LOAD, - - HOOK_INIT, - HOOK_RESET, - HOOK_START, - HOOK_DESTROY, - - HOOK_SEL_BEGIN, - HOOK_SEL_EXTEND, - HOOK_SEL_MAKE, - HOOK_SEL_GRAB, - - HOOK_FOCUS_IN, - HOOK_FOCUS_OUT, - - HOOK_VIEW_CHANGE, - HOOK_SCROLL_BACK, - HOOK_TTY_ACTIVITY, - - HOOK_REFRESH_BEGIN, - HOOK_REFRESH_END, - +# define def(sym) HOOK_ ## sym, +# include "hookinc.h" +# undef def HOOK_NUM, }; +struct rxvt_perl_term +{ + void *self; + unsigned long grabtime; +}; + struct rxvt_perl_interp { rxvt_perl_interp (); @@ -50,14 +41,16 @@ bool should_invoke[HOOK_NUM]; - void init (); + void init (bool tainted); bool invoke (rxvt_term *term, hook_type htype, ...); + void line_update (rxvt_term *term); }; extern struct rxvt_perl_interp rxvt_perl; #else -#define PERL_INVOKE(args) (void)0 +# define SHOULD_INVOKE(htype) false +# define HOOK_INVOKE(args) false #endif #endif