ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.h
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.h (file contents):
Revision 1.1 by root, Mon Jan 2 15:35:43 2006 UTC vs.
Revision 1.21 by root, Wed Jan 25 00:42:21 2006 UTC

4 4
5#ifndef RXVTPERL_H_ 5#ifndef RXVTPERL_H_
6#define RXVTPERL_H_ 6#define RXVTPERL_H_
7 7
8#if ENABLE_PERL 8#if ENABLE_PERL
9# define SHOULD_INVOKE(htype) \
10 ( (htype) == HOOK_INIT \
11 || (htype) == HOOK_DESTROY \
12 || (htype) == HOOK_REFRESH_BEGIN \
13 || (htype) == HOOK_REFRESH_END \
14 || perl.should_invoke [htype])
15# define HOOK_INVOKE(args) rxvt_perl.invoke args
9 16
10#include "rxvt.h" 17#include "rxvt.h"
11 18
12#define PERL_INVOKE(args) rxvt_perl.invoke args
13
14enum data_type { 19enum data_type {
15 DT_END, 20 DT_END, // no further arguments
16 DT_INT, 21 DT_INT,
17 DT_LONG, 22 DT_LONG,
23 DT_STR, // 0-terminates string
24 DT_STR_LEN, // string + length
25 DT_WCS_LEN, // wchar_t* + length
26 DT_LCS_LEN, // long* + length
27 DT_XEVENT,
18}; 28};
19 29
20enum hook_type { 30enum hook_type {
21 HOOK_LOAD, 31# define def(sym) HOOK_ ## sym,
32# include "hookinc.h"
33# undef def
34 HOOK_NUM,
35};
22 36
23 HOOK_INIT, 37struct rxvt_perl_term
24 HOOK_RESET, 38{
25 HOOK_START, 39 void *self;
26 HOOK_DESTROY, 40 unsigned long grabtime;
27 41 uint8_t should_invoke[HOOK_NUM];
28 HOOK_SEL_BEGIN,
29 HOOK_SEL_EXTEND,
30 HOOK_SEL_MAKE,
31 HOOK_SEL_GRAB,
32
33 HOOK_FOCUS_IN,
34 HOOK_FOCUS_OUT,
35
36 HOOK_VIEW_CHANGE,
37 HOOK_SCROLL_BACK,
38 HOOK_TTY_ACTIVITY,
39
40 HOOK_REFRESH_BEGIN,
41 HOOK_REFRESH_END,
42
43 HOOK_NUM,
44}; 42};
45 43
46struct rxvt_perl_interp 44struct rxvt_perl_interp
47{ 45{
48 rxvt_perl_interp (); 46 char **perl_environ;
47
49 ~rxvt_perl_interp (); 48 ~rxvt_perl_interp ();
50 49
51 bool should_invoke[HOOK_NUM]; 50 void init (rxvt_term *term);
52
53 void init ();
54 bool invoke (rxvt_term *term, hook_type htype, ...); 51 bool invoke (rxvt_term *term, hook_type htype, ...);
52 void line_update (rxvt_term *term);
55}; 53};
56 54
57extern struct rxvt_perl_interp rxvt_perl; 55extern struct rxvt_perl_interp rxvt_perl;
58 56
59#else 57#else
60#define PERL_INVOKE(args) (void)0 58# define SHOULD_INVOKE(htype) false
59# define HOOK_INVOKE(args) false
61#endif 60#endif
62 61
63#endif 62#endif
64 63

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines