1 | #ifndef _RXVTLIB_H_ /* include once only */ |
1 | #ifndef _RXVTLIB_H_ /* include once only */ |
2 | #define _RXVTLIB_H_ |
2 | #define _RXVTLIB_H_ |
3 | |
3 | |
4 | #include <stdio.h> |
4 | #include <cstdio> |
5 | #include <ctype.h> |
5 | #include <cctype> |
6 | #include <errno.h> |
6 | #include <cerrno> |
7 | @include_stdarg_h@ |
7 | @include_stdarg_h@ |
8 | @include_stdlib_h@ |
8 | @include_stdlib_h@ |
9 | @include_stdint_h@ |
9 | @include_stdint_h@ |
10 | #include <sys/types.h> |
10 | #include <sys/types.h> |
11 | @include_unistd_h@ |
11 | @include_unistd_h@ |
… | |
… | |
20 | @include_sys_strredir_h@ |
20 | @include_sys_strredir_h@ |
21 | |
21 | |
22 | #include <sys/wait.h> |
22 | #include <sys/wait.h> |
23 | #include <sys/stat.h> |
23 | #include <sys/stat.h> |
24 | |
24 | |
|
|
25 | #include <cwchar> |
|
|
26 | |
25 | extern "C" { |
27 | extern "C" { |
26 | #include <X11/Intrinsic.h> /* Xlib, Xutil, Xresource, Xfuncproto */ |
28 | #include <X11/Intrinsic.h> /* Xlib, Xutil, Xresource, Xfuncproto */ |
27 | } |
29 | } |
28 | |
30 | |
29 | /* |
31 | /* |
… | |
… | |
61 | typedef struct { |
63 | typedef struct { |
62 | int32_t row; |
64 | int32_t row; |
63 | int32_t col; |
65 | int32_t col; |
64 | } row_col_t; |
66 | } row_col_t; |
65 | |
67 | |
66 | #if UNICODE3 |
68 | #if UNICODE_3 |
67 | typedef uint32_t text_t; |
69 | typedef uint32_t text_t; |
68 | #else |
70 | #else |
69 | typedef uint16_t text_t; // saves lots of memory |
71 | typedef uint16_t text_t; // saves lots of memory |
70 | #endif |
72 | #endif |
71 | typedef uint32_t rend_t; |
73 | typedef uint32_t rend_t; |
… | |
… | |
157 | SELECTION_CONT, /* continued selection */ |
159 | SELECTION_CONT, /* continued selection */ |
158 | SELECTION_DONE /* selection put in CUT_BUFFER0 */ |
160 | SELECTION_DONE /* selection put in CUT_BUFFER0 */ |
159 | }; |
161 | }; |
160 | |
162 | |
161 | typedef struct { |
163 | typedef struct { |
162 | unsigned char *text; /* selected text */ |
164 | wchar_t *text; /* selected text */ |
163 | uint32_t len; /* length of selected text */ |
165 | uint32_t len; /* length of selected text */ |
164 | short screen; /* screen being used */ |
166 | short screen; /* screen being used */ |
165 | short clicks; /* number of clicks */ |
167 | short clicks; /* number of clicks */ |
166 | selection_op_t op; /* current operation */ |
168 | selection_op_t op; /* current operation */ |
167 | row_col_t beg; /* beginning of selection <= mark */ |
169 | row_col_t beg; /* beginning of selection <= mark */ |
… | |
… | |
197 | #define Opt_meta8 (1LU<<10) |
199 | #define Opt_meta8 (1LU<<10) |
198 | #define Opt_scrollTtyOutput (1LU<<11) |
200 | #define Opt_scrollTtyOutput (1LU<<11) |
199 | #define Opt_scrollTtyKeypress (1LU<<12) |
201 | #define Opt_scrollTtyKeypress (1LU<<12) |
200 | #define Opt_transparent (1LU<<13) |
202 | #define Opt_transparent (1LU<<13) |
201 | #define Opt_transparent_all (1LU<<14) |
203 | #define Opt_transparent_all (1LU<<14) |
202 | #define Opt_mc_hack (1LU<<15) |
204 | #define Opt_15 (1LU<<15) // UNALLOCATED |
203 | #define Opt_tripleclickwords (1LU<<16) |
205 | #define Opt_tripleclickwords (1LU<<16) |
204 | #define Opt_scrollWithBuffer (1LU<<17) |
206 | #define Opt_scrollWithBuffer (1LU<<17) |
205 | #define Opt_jumpScroll (1LU<<18) |
207 | #define Opt_jumpScroll (1LU<<18) |
206 | #define Opt_mouseWheelScrollPage (1LU<<19) |
208 | #define Opt_mouseWheelScrollPage (1LU<<19) |
207 | #define Opt_pointerBlank (1LU<<20) |
209 | #define Opt_pointerBlank (1LU<<20) |