… | |
… | |
15 | #endif |
15 | #endif |
16 | |
16 | |
17 | #if ENABLE_FRILLS |
17 | #if ENABLE_FRILLS |
18 | # define ENABLE_XEMBED 1 |
18 | # define ENABLE_XEMBED 1 |
19 | # define ENABLE_EWMH 1 |
19 | # define ENABLE_EWMH 1 |
|
|
20 | # define ENABLE_XIM_ONTHESPOT 1 |
20 | # define CURSOR_BLINK 1 |
21 | # define CURSOR_BLINK 1 |
21 | #else |
22 | #else |
22 | # define ENABLE_MINIMAL 1 |
23 | # define ENABLE_MINIMAL 1 |
23 | #endif |
24 | #endif |
24 | |
25 | |
… | |
… | |
736 | ***************************************************************************** |
737 | ***************************************************************************** |
737 | */ |
738 | */ |
738 | #define dLocal(type,name) type const name = this->name |
739 | #define dLocal(type,name) type const name = this->name |
739 | #define dDisp Display *disp = this->display->display |
740 | #define dDisp Display *disp = this->display->display |
740 | |
741 | |
|
|
742 | // for speed reasons, we assume that all latin1 characters |
|
|
743 | // are single-width (the first unicdoe combining character |
|
|
744 | // is actually 0x300, but ascii is what matters most). |
|
|
745 | #define WCWIDTH(c) ((c) < 0x100 ? 1 : wcwidth (c)) |
|
|
746 | |
741 | /* convert pixel dimensions to row/column values. Everything as int32_t */ |
747 | /* convert pixel dimensions to row/column values. Everything as int32_t */ |
742 | #define Pixel2Col(x) Pixel2Width((int32_t)(x)) |
748 | #define Pixel2Col(x) Pixel2Width((int32_t)(x)) |
743 | #define Pixel2Row(y) Pixel2Height((int32_t)(y)) |
749 | #define Pixel2Row(y) Pixel2Height((int32_t)(y)) |
744 | #define Pixel2Width(x) ((int32_t)(x) / (int32_t)fwidth) |
750 | #define Pixel2Width(x) ((int32_t)(x) / (int32_t)fwidth) |
745 | #define Pixel2Height(y) ((int32_t)(y) / (int32_t)fheight) |
751 | #define Pixel2Height(y) ((int32_t)(y) / (int32_t)fheight) |
… | |
… | |
821 | |
827 | |
822 | #ifdef XPM_BACKGROUND |
828 | #ifdef XPM_BACKGROUND |
823 | # define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g)) |
829 | # define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g)) |
824 | #else |
830 | #else |
825 | # define XPMClearArea(a, b, c, d, e, f, g) |
831 | # define XPMClearArea(a, b, c, d, e, f, g) |
826 | #endif |
|
|
827 | |
|
|
828 | #ifdef DEBUG_CMD |
|
|
829 | # define D_CMD(x) fprintf x ; fputc('\n', stderr) |
|
|
830 | #else |
|
|
831 | # define D_CMD(x) |
|
|
832 | #endif |
|
|
833 | #ifdef DEBUG_INIT |
|
|
834 | # define D_INIT(x) fprintf x ; fputc('\n', stderr) |
|
|
835 | #else |
|
|
836 | # define D_INIT(x) |
|
|
837 | #endif |
|
|
838 | #ifdef DEBUG_MAIN |
|
|
839 | # define D_MAIN(x) fprintf x ; fputc('\n', stderr) |
|
|
840 | #else |
|
|
841 | # define D_MAIN(x) |
|
|
842 | #endif |
|
|
843 | #ifdef DEBUG_SIZE |
|
|
844 | # define D_SIZE(x) fprintf x ; fputc('\n', stderr) |
|
|
845 | #else |
|
|
846 | # define D_SIZE(x) |
|
|
847 | #endif |
832 | #endif |
848 | |
833 | |
849 | typedef callback1<void, const char *> log_callback; |
834 | typedef callback1<void, const char *> log_callback; |
850 | typedef callback1<int, int> getfd_callback; |
835 | typedef callback1<int, int> getfd_callback; |
851 | |
836 | |
… | |
… | |
1157 | #endif |
1142 | #endif |
1158 | |
1143 | |
1159 | // modifies first argument(!) |
1144 | // modifies first argument(!) |
1160 | void paste (char *data, unsigned int len) NOTHROW; |
1145 | void paste (char *data, unsigned int len) NOTHROW; |
1161 | |
1146 | |
1162 | long vt_emask, vt_emask_perl; |
1147 | long vt_emask, vt_emask_perl, vt_emask_xim; |
1163 | |
1148 | |
1164 | void vt_select_input () const NOTHROW |
1149 | void vt_select_input () const NOTHROW |
1165 | { |
1150 | { |
1166 | XSelectInput (display->display, vt, vt_emask | vt_emask_perl); |
1151 | XSelectInput (display->display, vt, vt_emask | vt_emask_perl | vt_emask_xim); |
1167 | } |
1152 | } |
1168 | |
1153 | |
1169 | #if TRANSPARENT |
1154 | #if TRANSPARENT |
1170 | void rootwin_cb (XEvent &xev); |
1155 | void rootwin_cb (XEvent &xev); |
1171 | xevent_watcher rootwin_ev; |
1156 | xevent_watcher rootwin_ev; |
… | |
… | |
1328 | int rXParseAllocColor (rxvt_color * screen_in_out, const char *colour); |
1313 | int rXParseAllocColor (rxvt_color * screen_in_out, const char *colour); |
1329 | void set_widthheight (unsigned int newwidth, unsigned int newheight); |
1314 | void set_widthheight (unsigned int newwidth, unsigned int newheight); |
1330 | |
1315 | |
1331 | // screen.C |
1316 | // screen.C |
1332 | |
1317 | |
1333 | void lalloc (line_t &l) const NOTHROW |
1318 | void lalloc (line_t &l) const |
1334 | { |
1319 | { |
1335 | l.t = (text_t *)talloc->alloc (); |
1320 | l.t = (text_t *)talloc->alloc (); |
1336 | l.r = (rend_t *)ralloc->alloc (); |
1321 | l.r = (rend_t *)ralloc->alloc (); |
1337 | } |
1322 | } |
1338 | |
1323 | |
… | |
… | |
1342 | talloc->free (l.t); |
1327 | talloc->free (l.t); |
1343 | ralloc->free (l.r); |
1328 | ralloc->free (l.r); |
1344 | } |
1329 | } |
1345 | #endif |
1330 | #endif |
1346 | |
1331 | |
1347 | void lresize (line_t &l) const NOTHROW |
1332 | void lresize (line_t &l) const |
1348 | { |
1333 | { |
1349 | if (!l.t) |
1334 | if (!l.t) |
1350 | return; |
1335 | return; |
1351 | |
1336 | |
1352 | l.t = (text_t *)talloc->alloc (l.t, prev_ncol * sizeof (text_t)); |
1337 | l.t = (text_t *)talloc->alloc (l.t, prev_ncol * sizeof (text_t)); |
… | |
… | |
1420 | void scr_remap_chars () NOTHROW; |
1405 | void scr_remap_chars () NOTHROW; |
1421 | void scr_remap_chars (line_t &l) NOTHROW; |
1406 | void scr_remap_chars (line_t &l) NOTHROW; |
1422 | |
1407 | |
1423 | enum cursor_mode { SAVE, RESTORE }; |
1408 | enum cursor_mode { SAVE, RESTORE }; |
1424 | |
1409 | |
1425 | void scr_poweron () NOTHROW; |
1410 | void scr_poweron (); |
1426 | void scr_cursor (cursor_mode mode) NOTHROW; |
1411 | void scr_cursor (cursor_mode mode) NOTHROW; |
1427 | void scr_do_wrap () NOTHROW; |
1412 | void scr_do_wrap () NOTHROW; |
|
|
1413 | void scr_swap_screen () NOTHROW; |
1428 | int scr_change_screen (int scrn) NOTHROW; |
1414 | void scr_change_screen (int scrn); |
1429 | void scr_color (unsigned int color, int fgbg) NOTHROW; |
1415 | void scr_color (unsigned int color, int fgbg) NOTHROW; |
1430 | void scr_rendition (int set, int style) NOTHROW; |
1416 | void scr_rendition (int set, int style) NOTHROW; |
1431 | void scr_add_lines (const wchar_t *str, int len, int minlines = 0) NOTHROW; |
1417 | void scr_add_lines (const wchar_t *str, int len, int minlines = 0) NOTHROW; |
1432 | void scr_backspace () NOTHROW; |
1418 | void scr_backspace () NOTHROW; |
1433 | void scr_tab (int count, bool ht = false) NOTHROW; |
1419 | void scr_tab (int count, bool ht = false) NOTHROW; |
… | |
… | |
1525 | # define __PROTO(p) p |
1511 | # define __PROTO(p) p |
1526 | #else |
1512 | #else |
1527 | # define __PROTO(p) () |
1513 | # define __PROTO(p) () |
1528 | #endif |
1514 | #endif |
1529 | |
1515 | |
1530 | #ifdef DEBUG_malloc |
|
|
1531 | # include "dmalloc.h" /* This comes last */ |
|
|
1532 | #endif |
|
|
1533 | |
|
|
1534 | #endif /* _RXVT_H_ */ |
1516 | #endif /* _RXVT_H_ */ |
1535 | |
1517 | |