… | |
… | |
141 | |
141 | |
142 | #if defined (NO_OLD_SELECTION) && defined(NO_NEW_SELECTION) |
142 | #if defined (NO_OLD_SELECTION) && defined(NO_NEW_SELECTION) |
143 | # error if you disable both selection styles, how can you select, silly? |
143 | # error if you disable both selection styles, how can you select, silly? |
144 | #endif |
144 | #endif |
145 | |
145 | |
146 | #define APL_CLASS "XTerm" /* class name */ |
|
|
147 | #define APL_SUBCLASS "Rxvt" /* also check resources under this name */ |
|
|
148 | #define APL_NAME "rxvt" /* normal name */ |
|
|
149 | |
|
|
150 | /* COLORTERM, TERM environment variables */ |
146 | /* COLORTERM, TERM environment variables */ |
151 | #define COLORTERMENV "rxvt" |
147 | #define COLORTERMENV "rxvt" |
152 | #ifdef XPM_BACKGROUND |
148 | #ifdef XPM_BACKGROUND |
153 | # define COLORTERMENVFULL COLORTERMENV "-xpm" |
149 | # define COLORTERMENVFULL COLORTERMENV "-xpm" |
154 | #else |
150 | #else |
155 | # define COLORTERMENVFULL COLORTERMENV |
151 | # define COLORTERMENVFULL COLORTERMENV |
156 | #endif |
152 | #endif |
157 | #ifndef TERMENV |
153 | #ifndef TERMENV |
158 | # define TERMENV "xterm" |
154 | # define TERMENV "rxvt" |
159 | #endif |
155 | #endif |
160 | |
156 | |
161 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
157 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
162 | # define NO_MOUSE_REPORT_SCROLLBAR |
158 | # define NO_MOUSE_REPORT_SCROLLBAR |
163 | #endif |
159 | #endif |
… | |
… | |
296 | |
292 | |
297 | /* flags for rxvt_scr_gotorc () */ |
293 | /* flags for rxvt_scr_gotorc () */ |
298 | enum { |
294 | enum { |
299 | C_RELATIVE = 1 , /* col movement is relative */ |
295 | C_RELATIVE = 1 , /* col movement is relative */ |
300 | R_RELATIVE = 2, /* row movement is relative */ |
296 | R_RELATIVE = 2, /* row movement is relative */ |
301 | RELATIVE = 1 | 2 |
297 | RELATIVE = 1 | 2, |
302 | }; |
298 | }; |
303 | |
299 | |
304 | /* modes for rxvt_scr_insdel_chars (), rxvt_scr_insdel_lines () */ |
300 | /* modes for rxvt_scr_insdel_chars (), rxvt_scr_insdel_lines () */ |
305 | enum { |
301 | enum { |
306 | INSERT = -1, /* don't change these values */ |
302 | INSERT = -1, /* don't change these values */ |
307 | DELETE = +1, |
303 | DELETE = +1, |
308 | ERASE = +2 |
304 | ERASE = +2, |
309 | }; |
305 | }; |
310 | |
306 | |
311 | /* modes for rxvt_scr_page () - scroll page. used by scrollbar window */ |
307 | /* modes for rxvt_scr_page () - scroll page. used by scrollbar window */ |
312 | enum page_dirn { |
308 | enum page_dirn { |
313 | UP, |
309 | UP, |
314 | DN, |
310 | DN, |
315 | NO_DIR |
311 | NO_DIR, |
316 | }; |
312 | }; |
317 | |
313 | |
318 | /* arguments for rxvt_scr_change_screen () */ |
314 | /* arguments for rxvt_scr_change_screen () */ |
319 | enum { |
315 | enum { |
320 | PRIMARY = 0, |
316 | PRIMARY = 0, |
321 | SECONDARY |
317 | SECONDARY, |
322 | }; |
318 | }; |
323 | |
319 | |
324 | #define RS_None 0 /* Normal */ |
320 | #define RS_None 0 /* Normal */ |
325 | |
321 | |
326 | #define RS_fgMask 0x000001FFu /* 512 colors */ |
322 | #define RS_fgMask 0x000001FFu /* 512 colors */ |
… | |
… | |
350 | enum { |
346 | enum { |
351 | C0_NUL = 0x00, |
347 | C0_NUL = 0x00, |
352 | C0_SOH, C0_STX, C0_ETX, C0_EOT, C0_ENQ, C0_ACK, C0_BEL, |
348 | C0_SOH, C0_STX, C0_ETX, C0_EOT, C0_ENQ, C0_ACK, C0_BEL, |
353 | C0_BS , C0_HT , C0_LF , C0_VT , C0_FF , C0_CR , C0_SO , C0_SI , |
349 | C0_BS , C0_HT , C0_LF , C0_VT , C0_FF , C0_CR , C0_SO , C0_SI , |
354 | C0_DLE, C0_DC1, C0_DC2, D0_DC3, C0_DC4, C0_NAK, C0_SYN, C0_ETB, |
350 | C0_DLE, C0_DC1, C0_DC2, D0_DC3, C0_DC4, C0_NAK, C0_SYN, C0_ETB, |
355 | C0_CAN, C0_EM , C0_SUB, C0_ESC, C0_IS4, C0_IS3, C0_IS2, C0_IS1 |
351 | C0_CAN, C0_EM , C0_SUB, C0_ESC, C0_IS4, C0_IS3, C0_IS2, C0_IS1, |
356 | }; |
352 | }; |
357 | #define CHAR_ST 0x9c /* 0234 */ |
353 | #define CHAR_ST 0x9c /* 0234 */ |
358 | |
354 | |
359 | /* |
355 | /* |
360 | * XTerm Operating System Commands: ESC ] Ps;Pt (ST|BEL) |
356 | * XTerm Operating System Commands: ESC ] Ps;Pt (ST|BEL) |
361 | * colour extensions by Christian W. Zuckschwerdt <zany@triq.net> |
357 | * colour extensions by Christian W. Zuckschwerdt <zany@triq.net> |
362 | */ |
358 | */ |
|
|
359 | enum { |
363 | #define XTerm_name 0 |
360 | XTerm_name = 0, |
364 | #define XTerm_iconName 1 |
361 | XTerm_iconName = 1, |
365 | #define XTerm_title 2 |
362 | XTerm_title = 2, |
|
|
363 | XTerm_property = 3, /* change X property, not yet implemented */ |
366 | #define XTerm_Color 4 /* change colors */ |
364 | XTerm_Color = 4, /* change colors */ |
|
|
365 | XTerm_Color00 = 10, /* not implemented, CLASH! */ |
|
|
366 | XTerm_Color01 = 11, /* not implemented */ |
367 | #define XTerm_Color_cursor 12 /* change actual 'Cursor' color */ |
367 | XTerm_Color_cursor = 12, /* change actual 'Cursor' color */ |
368 | #define XTerm_Color_pointer 13 /* change actual 'Pointer' color */ |
368 | XTerm_Color_pointer = 13, /* change actual 'Pointer' color */ |
|
|
369 | XTerm_Color04 = 14, /* not implemented */ |
|
|
370 | XTerm_Color05 = 15, /* not implemented */ |
|
|
371 | XTerm_Color06 = 16, /* not implemented */ |
369 | #define XTerm_Color_RV 17 /* change actual 'Highlight' color */ |
372 | XTerm_Color_RV = 17, /* change actual 'Highlight' color */ |
370 | #define XTerm_Color_BD 18 /* change actual 'Bold' color */ |
|
|
371 | #define XTerm_Color_UL 19 /* change actual 'Underline' color */ |
|
|
372 | #define XTerm_logfile 46 /* not implemented */ |
373 | XTerm_logfile = 46, /* not implemented */ |
373 | #define XTerm_font 50 |
374 | XTerm_font = 50, |
374 | |
375 | |
375 | /* |
376 | XTerm_konsole30 = 30, /* reserved for konsole */ |
|
|
377 | XTerm_konsole31 = 31, /* reserved for konsole */ |
|
|
378 | XTerm_emacs51 = 51, /* reserved for emacs shell */ |
|
|
379 | /* |
376 | * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) |
380 | * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) |
377 | */ |
381 | */ |
378 | #define XTerm_locale 9 /* change locale */ |
382 | XTerm_locale = 9, /* change locale */ |
379 | #define XTerm_Menu 10 /* set menu item */ |
383 | XTerm_Menu = 10, /* set menu item */ |
|
|
384 | XTerm_Color_BD = 18, /* change actual 'Bold' color */ |
|
|
385 | XTerm_Color_UL = 19, /* change actual 'Underline' color */ |
380 | #define XTerm_Pixmap 20 /* new bg pixmap */ |
386 | XTerm_Pixmap = 20, /* new bg pixmap */ |
381 | #define XTerm_restoreFG 39 /* change default fg color */ |
387 | XTerm_restoreFG = 39, /* change default fg color */ |
382 | #define XTerm_restoreBG 49 /* change default bg color */ |
388 | XTerm_restoreBG = 49, /* change default bg color */ |
383 | #define XTerm_dumpscreen 55 /* dump scrollback and all of screen */ |
389 | XTerm_dumpscreen = 55, /* dump scrollback and all of screen */ |
|
|
390 | }; |
384 | |
391 | |
385 | /* Words starting with `Color_' are colours. Others are counts */ |
392 | /* Words starting with `Color_' are colours. Others are counts */ |
386 | /* |
393 | /* |
387 | * The following comment is mostly obsolete since pixcolor_set was expanded: |
394 | * The following comment is mostly obsolete since pixcolor_set was expanded: |
388 | * We're currently upto 29 colours. Only 3 more available. The |
395 | * We're currently upto 29 colours. Only 3 more available. The |
… | |
… | |
1148 | void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs); |
1155 | void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs); |
1149 | int scr_scroll_text (int row1, int row2, int count, int spec); |
1156 | int scr_scroll_text (int row1, int row2, int count, int spec); |
1150 | void scr_reset (); |
1157 | void scr_reset (); |
1151 | void scr_reset_realloc (); |
1158 | void scr_reset_realloc (); |
1152 | void scr_release (); |
1159 | void scr_release (); |
1153 | void scr_clear (); |
1160 | void scr_clear (bool really = true); |
1154 | void scr_refresh (unsigned char refresh_type); |
1161 | void scr_refresh (unsigned char refresh_type); |
1155 | bool scr_refresh_rend (rend_t mask, rend_t value); |
1162 | bool scr_refresh_rend (rend_t mask, rend_t value); |
1156 | void scr_erase_screen (int mode); |
1163 | void scr_erase_screen (int mode); |
1157 | void scr_touch (bool refresh); |
1164 | void scr_touch (bool refresh); |
1158 | void scr_expose (int x, int y, int width, int height, bool refresh); |
1165 | void scr_expose (int x, int y, int width, int height, bool refresh); |
… | |
… | |
1163 | |
1170 | |
1164 | // command.C |
1171 | // command.C |
1165 | void lookup_key (XKeyEvent &ev); |
1172 | void lookup_key (XKeyEvent &ev); |
1166 | unsigned int cmd_write (const unsigned char *str, unsigned int count); |
1173 | unsigned int cmd_write (const unsigned char *str, unsigned int count); |
1167 | uint32_t cmd_getc (); |
1174 | uint32_t cmd_getc (); |
|
|
1175 | bool cmd_parse (); |
1168 | void mouse_report (XButtonEvent &ev); |
1176 | void mouse_report (XButtonEvent &ev); |
1169 | void button_press (XButtonEvent &ev); |
1177 | void button_press (XButtonEvent &ev); |
1170 | void button_release (XButtonEvent &ev); |
1178 | void button_release (XButtonEvent &ev); |
1171 | int check_our_parents (); |
1179 | int check_our_parents (); |
1172 | #ifdef PRINTPIPE |
1180 | #ifdef PRINTPIPE |