ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvt.h
(Generate patch)

Comparing rxvt-unicode/src/rxvt.h (file contents):
Revision 1.42 by pcg, Tue Feb 24 16:25:45 2004 UTC vs.
Revision 1.52 by pcg, Sun Mar 14 17:33:08 2004 UTC

12 12
13#include "defaultfont.h" 13#include "defaultfont.h"
14#include "rxvtcolor.h" 14#include "rxvtcolor.h"
15#include "iom.h" 15#include "iom.h"
16#include "salloc.h" 16#include "salloc.h"
17
18#include <wchar.h>
19 17
20/* 18/*
21 ***************************************************************************** 19 *****************************************************************************
22 * SYSTEM HACKS 20 * SYSTEM HACKS
23 ***************************************************************************** 21 *****************************************************************************
141 139
142#if defined (NO_OLD_SELECTION) && defined(NO_NEW_SELECTION) 140#if defined (NO_OLD_SELECTION) && defined(NO_NEW_SELECTION)
143# error if you disable both selection styles, how can you select, silly? 141# error if you disable both selection styles, how can you select, silly?
144#endif 142#endif
145 143
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 */ 144/* COLORTERM, TERM environment variables */
151#define COLORTERMENV "rxvt" 145#define COLORTERMENV "rxvt"
152#ifdef XPM_BACKGROUND 146#ifdef XPM_BACKGROUND
153# define COLORTERMENVFULL COLORTERMENV "-xpm" 147# define COLORTERMENVFULL COLORTERMENV "-xpm"
154#else 148#else
155# define COLORTERMENVFULL COLORTERMENV 149# define COLORTERMENVFULL COLORTERMENV
156#endif 150#endif
157#ifndef TERMENV 151#ifndef TERMENV
158# define TERMENV "xterm" 152# define TERMENV "rxvt"
159#endif 153#endif
160 154
161#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) 155#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR)
162# define NO_MOUSE_REPORT_SCROLLBAR 156# define NO_MOUSE_REPORT_SCROLLBAR
163#endif 157#endif
362 */ 356 */
363enum { 357enum {
364 XTerm_name = 0, 358 XTerm_name = 0,
365 XTerm_iconName = 1, 359 XTerm_iconName = 1,
366 XTerm_title = 2, 360 XTerm_title = 2,
367 XTerm_property = 3, /* change X property, not yet implemented */ 361 XTerm_property = 3, // change X property, not yet implemented
368 XTerm_Color = 4, /* change colors */ 362 XTerm_Color = 4, // change colors
369 XTerm_Color00 = 10, /* not implemented, CLASH! */ 363 XTerm_Color00 = 10, // not implemented, CLASH!
370 XTerm_Color01 = 11, /* not implemented */ 364 XTerm_Color01 = 11, // not implemented
371 XTerm_Color_cursor = 12, /* change actual 'Cursor' color */ 365 XTerm_Color_cursor = 12, // change actual 'Cursor' color
372 XTerm_Color_pointer = 13, /* change actual 'Pointer' color */ 366 XTerm_Color_pointer = 13, // change actual 'Pointer' color
373 XTerm_Color04 = 14, /* not implemented */ 367 XTerm_Color04 = 14, // not implemented
374 XTerm_Color05 = 15, /* not implemented */ 368 XTerm_Color05 = 15, // not implemented
375 XTerm_Color06 = 16, /* not implemented */ 369 XTerm_Color06 = 16, // not implemented
376 XTerm_Color_RV = 17, /* change actual 'Highlight' color */ 370 XTerm_Color_RV = 17, // change actual 'Highlight' color
377 XTerm_logfile = 46, /* not implemented */ 371 XTerm_logfile = 46, // not implemented
378 XTerm_font = 50, 372 XTerm_font = 50,
379 373
380 XTerm_konsole30 = 30, /* reserved for konsole */ 374 XTerm_konsole30 = 30, // reserved for konsole
381 XTerm_konsole31 = 31, /* reserved for konsole */ 375 XTerm_konsole31 = 31, // reserved for konsole
382 XTerm_emacs51 = 51, /* reserved for emacs shell */ 376 XTerm_emacs51 = 51, // reserved for emacs shell
383 /* 377 /*
384 * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) 378 * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL)
385 */ 379 */
386 XTerm_locale = 9, /* change locale */
387 XTerm_Menu = 10, /* set menu item */ 380 XTerm_Menu = 10, // set menu item
388 XTerm_Color_BD = 18, /* change actual 'Bold' color */ 381 XTerm_Color_BD = 18, // change actual 'Bold' color
389 XTerm_Color_UL = 19, /* change actual 'Underline' color */ 382 XTerm_Color_UL = 19, // change actual 'Underline' color
390 XTerm_Pixmap = 20, /* new bg pixmap */ 383 XTerm_Pixmap = 20, // new bg pixmap
391 XTerm_restoreFG = 39, /* change default fg color */ 384 XTerm_restoreFG = 39, // change default fg color
392 XTerm_restoreBG = 49, /* change default bg color */ 385 XTerm_restoreBG = 49, // change default bg color
393 XTerm_dumpscreen = 55, /* dump scrollback and all of screen */ 386 XTerm_dumpscreen = 55, // dump scrollback and all of screen
387 XTerm_locale = 701, // change locale
388 XTerm_findfont = 702, // find font of given character (in decimal)
394}; 389};
395 390
396/* Words starting with `Color_' are colours. Others are counts */ 391/* Words starting with `Color_' are colours. Others are counts */
397/* 392/*
398 * The following comment is mostly obsolete since pixcolor_set was expanded: 393 * The following comment is mostly obsolete since pixcolor_set was expanded:
526#endif 521#endif
527#ifdef USE_XIM 522#ifdef USE_XIM
528 Rs_preeditType, 523 Rs_preeditType,
529 Rs_inputMethod, 524 Rs_inputMethod,
530#endif 525#endif
531#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
532 Rs_bigfont_key,
533 Rs_smallfont_key,
534#endif
535#ifdef TRANSPARENT 526#ifdef TRANSPARENT
536 Rs_transparent, 527 Rs_transparent,
537 Rs_transparent_all, 528 Rs_transparent_all,
538#endif 529#endif
539#ifndef NO_FRILLS 530#ifndef NO_FRILLS
543 Rs_scrollBar_thickness, 534 Rs_scrollBar_thickness,
544#ifndef NO_LINESPACE 535#ifndef NO_LINESPACE
545 Rs_lineSpace, 536 Rs_lineSpace,
546#endif 537#endif
547 Rs_cutchars, 538 Rs_cutchars,
548#ifdef ACS_ASCII
549 Rs_acs_chars,
550#endif
551 Rs_modifier, 539 Rs_modifier,
552 Rs_answerbackstring, 540 Rs_answerbackstring,
553 Rs_tripleclickwords, 541 Rs_tripleclickwords,
554 Rs_cursorBlink, 542 Rs_cursorBlink,
555 Rs_pointerBlank, 543 Rs_pointerBlank,
607#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) 595#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11)
608#define PrivMode(test,bit) \ 596#define PrivMode(test,bit) \
609 if (test) \ 597 if (test) \
610 PrivateModes |= (bit); \ 598 PrivateModes |= (bit); \
611 else \ 599 else \
612 PrivateModes &= ~ (bit) 600 PrivateModes &= ~(bit)
613 601
614#ifdef ALLOW_132_MODE 602#ifdef ALLOW_132_MODE
615# define PrivMode_Default \
616(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) 603# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
617#else 604#else
618# define PrivMode_Default \
619(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor) 605# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
620#endif 606#endif
621 607
622#define XDEPTH display->depth 608#define XDEPTH display->depth
623#define XCMAP display->cmap 609#define XCMAP display->cmap
624#define XVISUAL display->visual 610#define XVISUAL display->visual
835 operator mbstate_t *() { return &mbs; } 821 operator mbstate_t *() { return &mbs; }
836 void reset () { MEMSET (&mbs, 0, sizeof (mbs)); } 822 void reset () { MEMSET (&mbs, 0, sizeof (mbs)); }
837 mbstate () { reset (); } 823 mbstate () { reset (); }
838}; 824};
839 825
826#if UNICODE3
827# define COMPOSE_LO 0x40000000UL
828# define COMPOSE_HI 0x400fffffUL
829# define IS_COMPOSE(n) ((int32_t)(n) >= COMPOSE_LO)
830#else
831# define COMPOSE_LO 0xd800UL
832# define COMPOSE_HI 0xf8ffUL // dfff should be safer, but...
833# define IS_COMPOSE(n) (COMPOSE_LO <= (n) && (n) <= COMPOSE_HI)
834#endif
835
836#if ENABLE_COMBINING
837// compose chars are used to represent composite characters
838// that are not representable in unicode, as well as characters
839// not fitting in the BMP.
840struct compose_char {
841 uint32_t c1, c2; // any chars != NOCHAR are valid
842 compose_char (uint32_t c1, uint32_t c2)
843 : c1(c1), c2(c2)
844 { }
845};
846
847class rxvt_composite_vec {
848 vector<compose_char> v;
849public:
850 text_t compose (uint32_t c1, uint32_t c2 = NOCHAR);
851 int expand (uint32_t c, wchar_t *r);
852 compose_char *operator [](text_t c)
853 {
854 return c >= COMPOSE_LO && c < COMPOSE_LO + v.size ()
855 ? &v[c - COMPOSE_LO]
856 : 0;
857 }
858};
859
860extern class rxvt_composite_vec rxvt_composite;
861#endif
862
863
840struct rxvt_term : rxvt_vars { 864struct rxvt_term : rxvt_vars {
841 struct mbstate mbstate; 865 struct mbstate mbstate;
842 866
843 unsigned char want_refresh:1, 867 unsigned char want_refresh:1,
844#ifdef TRANSPARENT 868#ifdef TRANSPARENT
845 want_full_refresh:1, /* awaiting full screen refresh */ 869 want_full_refresh:1, /* awaiting full screen refresh */
846#endif 870#endif
989 const char *key_backspace; 1013 const char *key_backspace;
990#endif 1014#endif
991#ifndef NO_DELETE_KEY 1015#ifndef NO_DELETE_KEY
992 const char *key_delete; 1016 const char *key_delete;
993#endif 1017#endif
994#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
995 KeySym ks_bigfont, ks_smallfont;
996#endif
997#ifdef USE_XIM 1018#ifdef USE_XIM
998 rxvt_xim *input_method; 1019 rxvt_xim *input_method;
999 XIC Input_Context; 1020 XIC Input_Context;
1000 XIMStyle input_style; 1021 XIMStyle input_style;
1001 int event_type; 1022 int event_type;
1046 char *locale; 1067 char *locale;
1047 char *codeset; 1068 char *codeset;
1048 char charsets[4]; 1069 char charsets[4];
1049 unsigned char *v_buffer; /* pointer to physical buffer */ 1070 unsigned char *v_buffer; /* pointer to physical buffer */
1050 unsigned int v_buflen; /* size of area to write */ 1071 unsigned int v_buflen; /* size of area to write */
1051 char *newfont[MAX_NFONTS];
1052 stringvec *argv, *envv; /* if != 0, will be freed on destroy time */ 1072 stringvec *argv, *envv; /* if != 0, will be freed on destroy time */
1053#ifdef KEYSYM_RESOURCE 1073#ifdef KEYSYM_RESOURCE
1054 const unsigned char *Keysym_map[256]; 1074 const unsigned char *Keysym_map[256];
1055#endif 1075#endif
1056 const char *rs[NUM_RESOURCES]; 1076 const char *rs[NUM_RESOURCES];
1159 void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs); 1179 void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs);
1160 int scr_scroll_text (int row1, int row2, int count, int spec); 1180 int scr_scroll_text (int row1, int row2, int count, int spec);
1161 void scr_reset (); 1181 void scr_reset ();
1162 void scr_reset_realloc (); 1182 void scr_reset_realloc ();
1163 void scr_release (); 1183 void scr_release ();
1164 void scr_clear (); 1184 void scr_clear (bool really = true);
1165 void scr_refresh (unsigned char refresh_type); 1185 void scr_refresh (unsigned char refresh_type);
1166 bool scr_refresh_rend (rend_t mask, rend_t value); 1186 bool scr_refresh_rend (rend_t mask, rend_t value);
1167 void scr_erase_screen (int mode); 1187 void scr_erase_screen (int mode);
1168 void scr_touch (bool refresh); 1188 void scr_touch (bool refresh);
1169 void scr_expose (int x, int y, int width, int height, bool refresh); 1189 void scr_expose (int x, int y, int width, int height, bool refresh);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines