… | |
… | |
169 | extern char **environ; |
169 | extern char **environ; |
170 | extern char **rxvt_environ; // the original environ pointer |
170 | extern char **rxvt_environ; // the original environ pointer |
171 | |
171 | |
172 | inline void set_environ (stringvec *envv) |
172 | inline void set_environ (stringvec *envv) |
173 | { |
173 | { |
|
|
174 | #if ENABLE_PERL |
|
|
175 | assert (envv); |
|
|
176 | #else |
174 | if (envv) |
177 | if (envv) |
|
|
178 | #endif |
175 | environ = (char **)envv->begin (); |
179 | environ = (char **)envv->begin (); |
176 | } |
180 | } |
177 | |
181 | |
178 | inline void set_environ (char **envv) |
182 | inline void set_environ (char **envv) |
179 | { |
183 | { |
|
|
184 | #if ENABLE_PERL |
|
|
185 | assert (envv); |
|
|
186 | #else |
180 | if (envv) |
187 | if (envv) |
|
|
188 | #endif |
181 | environ = envv; |
189 | environ = envv; |
182 | } |
190 | } |
183 | |
191 | |
184 | /* |
192 | /* |
185 | ***************************************************************************** |
193 | ***************************************************************************** |
… | |
… | |
815 | # define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g)) |
823 | # define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g)) |
816 | #else |
824 | #else |
817 | # define XPMClearArea(a, b, c, d, e, f, g) |
825 | # define XPMClearArea(a, b, c, d, e, f, g) |
818 | #endif |
826 | #endif |
819 | |
827 | |
820 | #ifdef DEBUG_CMD |
|
|
821 | # define D_CMD(x) fprintf x ; fputc('\n', stderr) |
|
|
822 | #else |
|
|
823 | # define D_CMD(x) |
|
|
824 | #endif |
|
|
825 | #ifdef DEBUG_INIT |
|
|
826 | # define D_INIT(x) fprintf x ; fputc('\n', stderr) |
|
|
827 | #else |
|
|
828 | # define D_INIT(x) |
|
|
829 | #endif |
|
|
830 | #ifdef DEBUG_MAIN |
|
|
831 | # define D_MAIN(x) fprintf x ; fputc('\n', stderr) |
|
|
832 | #else |
|
|
833 | # define D_MAIN(x) |
|
|
834 | #endif |
|
|
835 | #ifdef DEBUG_SIZE |
|
|
836 | # define D_SIZE(x) fprintf x ; fputc('\n', stderr) |
|
|
837 | #else |
|
|
838 | # define D_SIZE(x) |
|
|
839 | #endif |
|
|
840 | |
|
|
841 | typedef callback1<void, const char *> log_callback; |
828 | typedef callback1<void, const char *> log_callback; |
842 | typedef callback1<int, int> getfd_callback; |
829 | typedef callback1<int, int> getfd_callback; |
843 | |
830 | |
844 | #define SET_LOCALE(locale) rxvt_set_locale (locale) |
831 | #define SET_LOCALE(locale) rxvt_set_locale (locale) |
845 | extern bool rxvt_set_locale (const char *locale) NOTHROW; |
832 | extern bool rxvt_set_locale (const char *locale) NOTHROW; |
… | |
… | |
1149 | #endif |
1136 | #endif |
1150 | |
1137 | |
1151 | // modifies first argument(!) |
1138 | // modifies first argument(!) |
1152 | void paste (char *data, unsigned int len) NOTHROW; |
1139 | void paste (char *data, unsigned int len) NOTHROW; |
1153 | |
1140 | |
1154 | long vt_emask, vt_emask_perl; |
1141 | long vt_emask, vt_emask_perl, vt_emask_xim; |
1155 | |
1142 | |
1156 | void vt_select_input () const NOTHROW |
1143 | void vt_select_input () const NOTHROW |
1157 | { |
1144 | { |
1158 | XSelectInput (display->display, vt, vt_emask | vt_emask_perl); |
1145 | XSelectInput (display->display, vt, vt_emask | vt_emask_perl | vt_emask_xim); |
1159 | } |
1146 | } |
1160 | |
1147 | |
1161 | #if TRANSPARENT |
1148 | #if TRANSPARENT |
1162 | void rootwin_cb (XEvent &xev); |
1149 | void rootwin_cb (XEvent &xev); |
1163 | xevent_watcher rootwin_ev; |
1150 | xevent_watcher rootwin_ev; |
… | |
… | |
1249 | void create_windows (int argc, const char *const *argv); |
1236 | void create_windows (int argc, const char *const *argv); |
1250 | void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); |
1237 | void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); |
1251 | void window_calc (unsigned int newwidth, unsigned int newheight); |
1238 | void window_calc (unsigned int newwidth, unsigned int newheight); |
1252 | |
1239 | |
1253 | #if USE_XIM |
1240 | #if USE_XIM |
1254 | rxvt_xim *input_method; |
1241 | rxvt_xim *input_method; |
1255 | XIC Input_Context; |
1242 | XIC Input_Context; |
1256 | XIMStyle input_style; |
1243 | XIMStyle input_style; |
1257 | XPoint spot; // most recently sent spot position |
1244 | XPoint spot; // most recently sent spot position |
1258 | |
1245 | |
1259 | void im_destroy (); |
1246 | void im_destroy (); |
1260 | void im_cb (); im_watcher im_ev; |
1247 | void im_cb (); im_watcher im_ev; |
1261 | void im_set_size (XRectangle &size); |
1248 | void im_set_size (XRectangle &size); |
1262 | void im_set_position (XPoint &pos) NOTHROW; |
1249 | void im_set_position (XPoint &pos) NOTHROW; |
… | |
… | |
1320 | int rXParseAllocColor (rxvt_color * screen_in_out, const char *colour); |
1307 | int rXParseAllocColor (rxvt_color * screen_in_out, const char *colour); |
1321 | void set_widthheight (unsigned int newwidth, unsigned int newheight); |
1308 | void set_widthheight (unsigned int newwidth, unsigned int newheight); |
1322 | |
1309 | |
1323 | // screen.C |
1310 | // screen.C |
1324 | |
1311 | |
1325 | void lalloc (line_t &l) const NOTHROW |
1312 | void lalloc (line_t &l) const |
1326 | { |
1313 | { |
1327 | l.t = (text_t *)talloc->alloc (); |
1314 | l.t = (text_t *)talloc->alloc (); |
1328 | l.r = (rend_t *)ralloc->alloc (); |
1315 | l.r = (rend_t *)ralloc->alloc (); |
1329 | } |
1316 | } |
1330 | |
1317 | |
… | |
… | |
1334 | talloc->free (l.t); |
1321 | talloc->free (l.t); |
1335 | ralloc->free (l.r); |
1322 | ralloc->free (l.r); |
1336 | } |
1323 | } |
1337 | #endif |
1324 | #endif |
1338 | |
1325 | |
1339 | void lresize (line_t &l) const NOTHROW |
1326 | void lresize (line_t &l) const |
1340 | { |
1327 | { |
1341 | if (!l.t) |
1328 | if (!l.t) |
1342 | return; |
1329 | return; |
1343 | |
1330 | |
1344 | l.t = (text_t *)talloc->alloc (l.t, prev_ncol * sizeof (text_t)); |
1331 | l.t = (text_t *)talloc->alloc (l.t, prev_ncol * sizeof (text_t)); |
… | |
… | |
1412 | void scr_remap_chars () NOTHROW; |
1399 | void scr_remap_chars () NOTHROW; |
1413 | void scr_remap_chars (line_t &l) NOTHROW; |
1400 | void scr_remap_chars (line_t &l) NOTHROW; |
1414 | |
1401 | |
1415 | enum cursor_mode { SAVE, RESTORE }; |
1402 | enum cursor_mode { SAVE, RESTORE }; |
1416 | |
1403 | |
1417 | void scr_poweron () NOTHROW; |
1404 | void scr_poweron (); |
1418 | void scr_cursor (cursor_mode mode) NOTHROW; |
1405 | void scr_cursor (cursor_mode mode) NOTHROW; |
1419 | void scr_do_wrap () NOTHROW; |
1406 | void scr_do_wrap () NOTHROW; |
|
|
1407 | void scr_swap_screen () NOTHROW; |
1420 | int scr_change_screen (int scrn) NOTHROW; |
1408 | void scr_change_screen (int scrn); |
1421 | void scr_color (unsigned int color, int fgbg) NOTHROW; |
1409 | void scr_color (unsigned int color, int fgbg) NOTHROW; |
1422 | void scr_rendition (int set, int style) NOTHROW; |
1410 | void scr_rendition (int set, int style) NOTHROW; |
1423 | void scr_add_lines (const wchar_t *str, int len, int minlines = 0) NOTHROW; |
1411 | void scr_add_lines (const wchar_t *str, int len, int minlines = 0) NOTHROW; |
1424 | void scr_backspace () NOTHROW; |
1412 | void scr_backspace () NOTHROW; |
1425 | void scr_tab (int count, bool ht = false) NOTHROW; |
1413 | void scr_tab (int count, bool ht = false) NOTHROW; |
… | |
… | |
1517 | # define __PROTO(p) p |
1505 | # define __PROTO(p) p |
1518 | #else |
1506 | #else |
1519 | # define __PROTO(p) () |
1507 | # define __PROTO(p) () |
1520 | #endif |
1508 | #endif |
1521 | |
1509 | |
1522 | #ifdef DEBUG_malloc |
|
|
1523 | # include "dmalloc.h" /* This comes last */ |
|
|
1524 | #endif |
|
|
1525 | |
|
|
1526 | #endif /* _RXVT_H_ */ |
1510 | #endif /* _RXVT_H_ */ |
1527 | |
1511 | |