--- rxvt-unicode/src/rxvtperl.h 2006/01/06 01:16:58 1.9 +++ rxvt-unicode/src/rxvtperl.h 2006/01/25 00:42:21 1.21 @@ -6,17 +6,24 @@ #define RXVTPERL_H_ #if ENABLE_PERL -# define SHOULD_INVOKE(htype) rxvt_perl.should_invoke [htype] +# define SHOULD_INVOKE(htype) \ + ( (htype) == HOOK_INIT \ + || (htype) == HOOK_DESTROY \ + || (htype) == HOOK_REFRESH_BEGIN \ + || (htype) == HOOK_REFRESH_END \ + || perl.should_invoke [htype]) # define HOOK_INVOKE(args) rxvt_perl.invoke args #include "rxvt.h" enum data_type { - DT_END, + DT_END, // no further arguments DT_INT, DT_LONG, - DT_STRING, - DT_USTRING_LEN, + DT_STR, // 0-terminates string + DT_STR_LEN, // string + length + DT_WCS_LEN, // wchar_t* + length + DT_LCS_LEN, // long* + length DT_XEVENT, }; @@ -27,14 +34,20 @@ HOOK_NUM, }; +struct rxvt_perl_term +{ + void *self; + unsigned long grabtime; + uint8_t should_invoke[HOOK_NUM]; +}; + struct rxvt_perl_interp { - rxvt_perl_interp (); - ~rxvt_perl_interp (); + char **perl_environ; - bool should_invoke[HOOK_NUM]; + ~rxvt_perl_interp (); - void init (); + void init (rxvt_term *term); bool invoke (rxvt_term *term, hook_type htype, ...); void line_update (rxvt_term *term); }; @@ -43,7 +56,7 @@ #else # define SHOULD_INVOKE(htype) false -# define PERL_INVOKE(args) false +# define HOOK_INVOKE(args) false #endif #endif