… | |
… | |
99 | ***************************************************************************** |
99 | ***************************************************************************** |
100 | * PROTOTYPES |
100 | * PROTOTYPES |
101 | ***************************************************************************** |
101 | ***************************************************************************** |
102 | */ |
102 | */ |
103 | // main.C |
103 | // main.C |
104 | RETSIGTYPE rxvt_Child_signal (int sig) NOTHROW; |
|
|
105 | RETSIGTYPE rxvt_Exit_signal (int sig) NOTHROW; |
|
|
106 | void rxvt_clean_exit () NOTHROW; |
|
|
107 | void * rxvt_malloc (size_t size); |
104 | void * rxvt_malloc (size_t size); |
108 | void * rxvt_calloc (size_t number, size_t size); |
105 | void * rxvt_calloc (size_t number, size_t size); |
109 | void * rxvt_realloc (void *ptr, size_t size); |
106 | void * rxvt_realloc (void *ptr, size_t size); |
110 | |
107 | |
111 | // misc.C |
108 | // misc.C |
… | |
… | |
114 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
111 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
115 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
112 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
116 | |
113 | |
117 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
114 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
118 | |
115 | |
119 | char * rxvt_r_basename (const char *str) NOTHROW; |
116 | char * rxvt_basename (const char *str) NOTHROW; |
120 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
117 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
121 | void rxvt_log (const char *fmt,...) NOTHROW; |
118 | void rxvt_log (const char *fmt,...) NOTHROW; |
122 | void rxvt_warn (const char *fmt,...) NOTHROW; |
119 | void rxvt_warn (const char *fmt,...) NOTHROW; |
123 | void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; |
120 | void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; |
124 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
121 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
125 | |
122 | |
126 | int rxvt_Str_match (const char *s1, const char *s2) NOTHROW; |
|
|
127 | const char * rxvt_Str_skip_space (const char *str) NOTHROW; |
|
|
128 | char * rxvt_Str_trim (char *str) NOTHROW; |
123 | char * rxvt_strtrim (char *str) NOTHROW; |
129 | int rxvt_Str_escaped (char *str) NOTHROW; |
|
|
130 | char ** rxvt_splitcommastring (const char *cs) NOTHROW; |
124 | char ** rxvt_splitcommastring (const char *cs) NOTHROW; |
131 | void rxvt_freecommastring (char **cs) NOTHROW; |
125 | void rxvt_freecommastring (char **cs) NOTHROW; |
132 | |
126 | |
133 | ///////////////////////////////////////////////////////////////////////////// |
127 | ///////////////////////////////////////////////////////////////////////////// |
134 | |
128 | |
135 | // temporarily replace the process environment |
129 | // temporarily replace the process environment |
136 | extern char **environ; |
130 | extern char **environ; |
137 | extern char **rxvt_environ; // the original environ pointer |
131 | extern char **rxvt_environ; // the original environ pointer |
138 | |
132 | |
139 | inline void set_environ (stringvec *envv) |
133 | static inline void set_environ (stringvec *envv) |
140 | { |
134 | { |
141 | #if ENABLE_PERL |
135 | #if ENABLE_PERL |
142 | assert (envv); |
136 | assert (envv); |
143 | #else |
137 | #else |
144 | if (envv) |
138 | if (envv) |
145 | #endif |
139 | #endif |
146 | environ = (char **)envv->begin (); |
140 | environ = (char **)envv->begin (); |
147 | } |
141 | } |
148 | |
142 | |
149 | inline void set_environ (char **envv) |
143 | static inline void set_environ (char **envv) |
150 | { |
144 | { |
151 | #if ENABLE_PERL |
145 | #if ENABLE_PERL |
152 | assert (envv); |
146 | assert (envv); |
153 | #else |
147 | #else |
154 | if (envv) |
148 | if (envv) |
… | |
… | |
181 | propScale = (1UL<<1), |
175 | propScale = (1UL<<1), |
182 | geometryFlags = (geometrySet|propScale), |
176 | geometryFlags = (geometrySet|propScale), |
183 | |
177 | |
184 | tintSet = (1UL<<8), |
178 | tintSet = (1UL<<8), |
185 | tintNeeded = (1UL<<9), |
179 | tintNeeded = (1UL<<9), |
|
|
180 | tintWholesome = (1UL<<10), |
186 | tintServerSide = (1UL<<10), |
181 | tintServerSide = (1UL<<11), |
187 | tintFlags = (tintSet|tintServerSide|tintNeeded), |
182 | tintFlags = (tintSet|tintServerSide|tintNeeded|tintWholesome), |
188 | blurNeeded = (1UL<<11), |
183 | blurNeeded = (1UL<<12), |
|
|
184 | blurServerSide = (1UL<<13), /* this don't work yet */ |
189 | |
185 | |
190 | isTransparent = (1UL<<16), |
186 | isTransparent = (1UL<<16), |
191 | isInvalid = (1UL<<17) |
187 | isInvalid = (1UL<<17), |
|
|
188 | isVtOrigin = (1UL<<18) /* if set pixmap has origin at corner of |
|
|
189 | vt window instead of parent[0]! */ |
192 | }; |
190 | }; |
193 | |
191 | |
194 | unsigned long flags; |
192 | unsigned long flags; |
195 | |
193 | |
196 | enum { |
194 | enum { |
… | |
… | |
247 | Pixmap pixmap; |
245 | Pixmap pixmap; |
248 | unsigned int pmap_width, pmap_height; |
246 | unsigned int pmap_width, pmap_height; |
249 | unsigned int pmap_depth; |
247 | unsigned int pmap_depth; |
250 | |
248 | |
251 | bool window_size_sensitive (); |
249 | bool window_size_sensitive (); |
|
|
250 | bool window_position_sensitive () { |
|
|
251 | return (flags & isTransparent); |
|
|
252 | }; |
|
|
253 | |
|
|
254 | bool is_parentOrigin () { |
|
|
255 | return !(flags & isVtOrigin); |
|
|
256 | }; |
|
|
257 | |
252 | bool need_client_side_rendering (); |
258 | bool need_client_side_rendering (); |
253 | void apply (); |
259 | void apply (); |
254 | bool render (); |
260 | bool render (); |
255 | void invalidate () { |
261 | void invalidate () { |
256 | if (!(flags & isInvalid)) |
262 | if (!(flags & isInvalid)) |
… | |
… | |
698 | #define PrivMode_LFNL (1UL<<19) |
704 | #define PrivMode_LFNL (1UL<<19) |
699 | /* too annoying to implement X11 highlight tracking */ |
705 | /* too annoying to implement X11 highlight tracking */ |
700 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
706 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
701 | |
707 | |
702 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
708 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
703 | #define PrivMode(test,bit) \ |
|
|
704 | if (test) \ |
|
|
705 | priv_modes |= (bit); \ |
|
|
706 | else \ |
|
|
707 | priv_modes &= ~(bit) |
|
|
708 | |
709 | |
709 | #ifdef ALLOW_132_MODE |
710 | #ifdef ALLOW_132_MODE |
710 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
711 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
711 | #else |
712 | #else |
712 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
713 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
… | |
… | |
969 | rxvt_perl_term perl; |
970 | rxvt_perl_term perl; |
970 | #endif |
971 | #endif |
971 | struct mbstate mbstate; // current input multibyte state |
972 | struct mbstate mbstate; // current input multibyte state |
972 | |
973 | |
973 | unsigned char want_refresh:1, |
974 | unsigned char want_refresh:1, |
974 | #ifdef ENABLE_TRANSPARENCY |
|
|
975 | want_full_refresh:1, /* awaiting full screen refresh */ |
|
|
976 | #endif |
|
|
977 | current_screen:1, /* primary or secondary */ |
975 | current_screen:1, /* primary or secondary */ |
978 | num_scr_allow:1, |
976 | num_scr_allow:1, |
979 | bypass_keystate:1, |
977 | bypass_keystate:1, |
980 | #ifdef CURSOR_BLINK |
978 | #ifdef CURSOR_BLINK |
981 | hidden_cursor:1, |
979 | hidden_cursor:1, |
… | |
… | |
1076 | char * incr_buf; |
1074 | char * incr_buf; |
1077 | size_t incr_buf_size, incr_buf_fill; |
1075 | size_t incr_buf_size, incr_buf_fill; |
1078 | /* ---------- */ |
1076 | /* ---------- */ |
1079 | Cursor leftptr_cursor; |
1077 | Cursor leftptr_cursor; |
1080 | /* ---------- */ |
1078 | /* ---------- */ |
1081 | #ifndef NO_BACKSPACE_KEY |
|
|
1082 | const char *key_backspace; |
|
|
1083 | #endif |
|
|
1084 | #ifndef NO_DELETE_KEY |
|
|
1085 | const char *key_delete; |
|
|
1086 | #endif |
|
|
1087 | struct mouse_event MEvent; |
1079 | struct mouse_event MEvent; |
1088 | XComposeStatus compose; |
1080 | XComposeStatus compose; |
1089 | ttymode_t tio; |
1081 | ttymode_t tio; |
1090 | row_col_t oldcursor; |
1082 | row_col_t oldcursor; |
1091 | #ifdef HAVE_BG_PIXMAP |
1083 | #ifdef HAVE_BG_PIXMAP |
… | |
… | |
1397 | { |
1389 | { |
1398 | if (set) |
1390 | if (set) |
1399 | options[opt >> 3] |= (1 << (opt & 7)); |
1391 | options[opt >> 3] |= (1 << (opt & 7)); |
1400 | else |
1392 | else |
1401 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1393 | options[opt >> 3] &= ~(1 << (opt & 7)); |
|
|
1394 | } |
|
|
1395 | |
|
|
1396 | void PrivMode (int set, unsigned bit) NOTHROW |
|
|
1397 | { |
|
|
1398 | if (set) |
|
|
1399 | priv_modes |= bit; |
|
|
1400 | else |
|
|
1401 | priv_modes &= ~bit; |
1402 | } |
1402 | } |
1403 | |
1403 | |
1404 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; |
1404 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; |
1405 | void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; |
1405 | void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; |
1406 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
1406 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
… | |
… | |
1516 | // xpm.C |
1516 | // xpm.C |
1517 | void get_window_origin (int &x, int &y); |
1517 | void get_window_origin (int &x, int &y); |
1518 | Pixmap get_pixmap_property (int prop_id); |
1518 | Pixmap get_pixmap_property (int prop_id); |
1519 | }; |
1519 | }; |
1520 | |
1520 | |
1521 | /* |
|
|
1522 | ***************************************************************************** |
|
|
1523 | * PROTOTYPES |
|
|
1524 | ***************************************************************************** |
|
|
1525 | */ |
|
|
1526 | #ifdef PROTOTYPES |
|
|
1527 | # define __PROTO(p) p |
|
|
1528 | #else |
|
|
1529 | # define __PROTO(p) () |
|
|
1530 | #endif |
|
|
1531 | |
|
|
1532 | #endif /* _RXVT_H_ */ |
1521 | #endif /* _RXVT_H_ */ |
1533 | |
1522 | |