… | |
… | |
8 | #include <X11/cursorfont.h> |
8 | #include <X11/cursorfont.h> |
9 | #include <X11/keysym.h> |
9 | #include <X11/keysym.h> |
10 | #include <X11/keysymdef.h> |
10 | #include <X11/keysymdef.h> |
11 | #include <X11/Xatom.h> |
11 | #include <X11/Xatom.h> |
12 | |
12 | |
|
|
13 | #include "encoding.h" |
13 | #include "defaultfont.h" |
14 | #include "defaultfont.h" |
14 | #include "rxvtcolor.h" |
15 | #include "rxvtcolor.h" |
15 | #include "iom.h" |
16 | #include "iom.h" |
16 | #include "salloc.h" |
17 | #include "salloc.h" |
17 | |
18 | |
… | |
… | |
134 | /* |
135 | /* |
135 | ***************************************************************************** |
136 | ***************************************************************************** |
136 | * NORMAL DEFINES |
137 | * NORMAL DEFINES |
137 | ***************************************************************************** |
138 | ***************************************************************************** |
138 | */ |
139 | */ |
139 | |
|
|
140 | #if defined (NO_OLD_SELECTION) && defined(NO_NEW_SELECTION) |
|
|
141 | # error if you disable both selection styles, how can you select, silly? |
|
|
142 | #endif |
|
|
143 | |
140 | |
144 | /* COLORTERM, TERM environment variables */ |
141 | /* COLORTERM, TERM environment variables */ |
145 | #define COLORTERMENV "rxvt" |
142 | #define COLORTERMENV "rxvt" |
146 | #ifdef XPM_BACKGROUND |
143 | #ifdef XPM_BACKGROUND |
147 | # define COLORTERMENVFULL COLORTERMENV "-xpm" |
144 | # define COLORTERMENVFULL COLORTERMENV "-xpm" |
… | |
… | |
836 | #if ENABLE_COMBINING |
833 | #if ENABLE_COMBINING |
837 | // compose chars are used to represent composite characters |
834 | // compose chars are used to represent composite characters |
838 | // that are not representable in unicode, as well as characters |
835 | // that are not representable in unicode, as well as characters |
839 | // not fitting in the BMP. |
836 | // not fitting in the BMP. |
840 | struct compose_char { |
837 | struct compose_char { |
841 | uint32_t c1, c2; // any chars != NOCHAR are valid |
838 | unicode_t c1, c2; // any chars != NOCHAR are valid |
842 | compose_char (uint32_t c1, uint32_t c2) |
839 | compose_char (unicode_t c1, unicode_t c2) |
843 | : c1(c1), c2(c2) |
840 | : c1(c1), c2(c2) |
844 | { } |
841 | { } |
845 | }; |
842 | }; |
846 | |
843 | |
847 | class rxvt_composite_vec { |
844 | class rxvt_composite_vec { |
848 | vector<compose_char> v; |
845 | vector<compose_char> v; |
849 | public: |
846 | public: |
850 | text_t compose (uint32_t c1, uint32_t c2 = NOCHAR); |
847 | text_t compose (unicode_t c1, unicode_t c2 = NOCHAR); |
851 | int expand (uint32_t c, wchar_t *r); |
848 | int expand (unicode_t c, wchar_t *r); |
852 | compose_char *operator [](text_t c) |
849 | compose_char *operator [](text_t c) |
853 | { |
850 | { |
854 | return c >= COMPOSE_LO && c < COMPOSE_LO + v.size () |
851 | return c >= COMPOSE_LO && c < COMPOSE_LO + v.size () |
855 | ? &v[c - COMPOSE_LO] |
852 | ? &v[c - COMPOSE_LO] |
856 | : 0; |
853 | : 0; |
… | |
… | |
1128 | void destroy (); |
1125 | void destroy (); |
1129 | |
1126 | |
1130 | bool init (int argc, const char *const *argv); |
1127 | bool init (int argc, const char *const *argv); |
1131 | bool init_vars (); |
1128 | bool init_vars (); |
1132 | |
1129 | |
1133 | uint32_t next_char (); |
1130 | unicode_t next_char (); |
1134 | |
1131 | |
1135 | bool pty_fill (); |
1132 | bool pty_fill (); |
1136 | |
1133 | |
1137 | void *operator new (size_t s); |
1134 | void *operator new (size_t s); |
1138 | void operator delete (void *p, size_t s); |
1135 | void operator delete (void *p, size_t s); |
… | |
… | |
1193 | /* autoconvert */ |
1190 | /* autoconvert */ |
1194 | |
1191 | |
1195 | // command.C |
1192 | // command.C |
1196 | void lookup_key (XKeyEvent &ev); |
1193 | void lookup_key (XKeyEvent &ev); |
1197 | unsigned int cmd_write (const unsigned char *str, unsigned int count); |
1194 | unsigned int cmd_write (const unsigned char *str, unsigned int count); |
1198 | uint32_t cmd_getc (); |
1195 | unicode_t cmd_getc (); |
1199 | bool cmd_parse (); |
1196 | bool cmd_parse (); |
1200 | void mouse_report (XButtonEvent &ev); |
1197 | void mouse_report (XButtonEvent &ev); |
1201 | void button_press (XButtonEvent &ev); |
1198 | void button_press (XButtonEvent &ev); |
1202 | void button_release (XButtonEvent &ev); |
1199 | void button_release (XButtonEvent &ev); |
1203 | int check_our_parents (); |
1200 | int check_our_parents (); |
… | |
… | |
1275 | void scr_poweron (); |
1272 | void scr_poweron (); |
1276 | void scr_cursor (int mode); |
1273 | void scr_cursor (int mode); |
1277 | int scr_change_screen (int scrn); |
1274 | int scr_change_screen (int scrn); |
1278 | void scr_color (unsigned int color, int fgbg); |
1275 | void scr_color (unsigned int color, int fgbg); |
1279 | void scr_rendition (int set, int style); |
1276 | void scr_rendition (int set, int style); |
1280 | void scr_add_lines (const uint32_t *str, int nlines, int len); |
1277 | void scr_add_lines (const unicode_t *str, int nlines, int len); |
1281 | void scr_backspace (); |
1278 | void scr_backspace (); |
1282 | void scr_tab (int count); |
1279 | void scr_tab (int count); |
1283 | void scr_backindex (); |
1280 | void scr_backindex (); |
1284 | void scr_forwardindex (); |
1281 | void scr_forwardindex (); |
1285 | void scr_gotorc (int row, int col, int relative); |
1282 | void scr_gotorc (int row, int col, int relative); |