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.45 by pcg, Wed Mar 3 04:07:52 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 *****************************************************************************
358 */ 356 */
359enum { 357enum {
360 XTerm_name = 0, 358 XTerm_name = 0,
361 XTerm_iconName = 1, 359 XTerm_iconName = 1,
362 XTerm_title = 2, 360 XTerm_title = 2,
363 XTerm_property = 3, /* change X property, not yet implemented */ 361 XTerm_property = 3, // change X property, not yet implemented
364 XTerm_Color = 4, /* change colors */ 362 XTerm_Color = 4, // change colors
365 XTerm_Color00 = 10, /* not implemented, CLASH! */ 363 XTerm_Color00 = 10, // not implemented, CLASH!
366 XTerm_Color01 = 11, /* not implemented */ 364 XTerm_Color01 = 11, // not implemented
367 XTerm_Color_cursor = 12, /* change actual 'Cursor' color */ 365 XTerm_Color_cursor = 12, // change actual 'Cursor' color
368 XTerm_Color_pointer = 13, /* change actual 'Pointer' color */ 366 XTerm_Color_pointer = 13, // change actual 'Pointer' color
369 XTerm_Color04 = 14, /* not implemented */ 367 XTerm_Color04 = 14, // not implemented
370 XTerm_Color05 = 15, /* not implemented */ 368 XTerm_Color05 = 15, // not implemented
371 XTerm_Color06 = 16, /* not implemented */ 369 XTerm_Color06 = 16, // not implemented
372 XTerm_Color_RV = 17, /* change actual 'Highlight' color */ 370 XTerm_Color_RV = 17, // change actual 'Highlight' color
373 XTerm_logfile = 46, /* not implemented */ 371 XTerm_logfile = 46, // not implemented
374 XTerm_font = 50, 372 XTerm_font = 50,
375 373
376 XTerm_konsole30 = 30, /* reserved for konsole */ 374 XTerm_konsole30 = 30, // reserved for konsole
377 XTerm_konsole31 = 31, /* reserved for konsole */ 375 XTerm_konsole31 = 31, // reserved for konsole
378 XTerm_emacs51 = 51, /* reserved for emacs shell */ 376 XTerm_emacs51 = 51, // reserved for emacs shell
379 /* 377 /*
380 * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) 378 * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL)
381 */ 379 */
382 XTerm_locale = 9, /* change locale */
383 XTerm_Menu = 10, /* set menu item */ 380 XTerm_Menu = 10, // set menu item
384 XTerm_Color_BD = 18, /* change actual 'Bold' color */ 381 XTerm_Color_BD = 18, // change actual 'Bold' color
385 XTerm_Color_UL = 19, /* change actual 'Underline' color */ 382 XTerm_Color_UL = 19, // change actual 'Underline' color
386 XTerm_Pixmap = 20, /* new bg pixmap */ 383 XTerm_Pixmap = 20, // new bg pixmap
387 XTerm_restoreFG = 39, /* change default fg color */ 384 XTerm_restoreFG = 39, // change default fg color
388 XTerm_restoreBG = 49, /* change default bg color */ 385 XTerm_restoreBG = 49, // change default bg color
389 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)
390}; 389};
391 390
392/* Words starting with `Color_' are colours. Others are counts */ 391/* Words starting with `Color_' are colours. Others are counts */
393/* 392/*
394 * The following comment is mostly obsolete since pixcolor_set was expanded: 393 * The following comment is mostly obsolete since pixcolor_set was expanded:
522#endif 521#endif
523#ifdef USE_XIM 522#ifdef USE_XIM
524 Rs_preeditType, 523 Rs_preeditType,
525 Rs_inputMethod, 524 Rs_inputMethod,
526#endif 525#endif
527#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
528 Rs_bigfont_key,
529 Rs_smallfont_key,
530#endif
531#ifdef TRANSPARENT 526#ifdef TRANSPARENT
532 Rs_transparent, 527 Rs_transparent,
533 Rs_transparent_all, 528 Rs_transparent_all,
534#endif 529#endif
535#ifndef NO_FRILLS 530#ifndef NO_FRILLS
539 Rs_scrollBar_thickness, 534 Rs_scrollBar_thickness,
540#ifndef NO_LINESPACE 535#ifndef NO_LINESPACE
541 Rs_lineSpace, 536 Rs_lineSpace,
542#endif 537#endif
543 Rs_cutchars, 538 Rs_cutchars,
544#ifdef ACS_ASCII
545 Rs_acs_chars,
546#endif
547 Rs_modifier, 539 Rs_modifier,
548 Rs_answerbackstring, 540 Rs_answerbackstring,
549 Rs_tripleclickwords, 541 Rs_tripleclickwords,
550 Rs_cursorBlink, 542 Rs_cursorBlink,
551 Rs_pointerBlank, 543 Rs_pointerBlank,
603#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) 595#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11)
604#define PrivMode(test,bit) \ 596#define PrivMode(test,bit) \
605 if (test) \ 597 if (test) \
606 PrivateModes |= (bit); \ 598 PrivateModes |= (bit); \
607 else \ 599 else \
608 PrivateModes &= ~ (bit) 600 PrivateModes &= ~(bit)
609 601
610#ifdef ALLOW_132_MODE 602#ifdef ALLOW_132_MODE
611# define PrivMode_Default \
612(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) 603# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
613#else 604#else
614# define PrivMode_Default \
615(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor) 605# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
616#endif 606#endif
617 607
618#define XDEPTH display->depth 608#define XDEPTH display->depth
619#define XCMAP display->cmap 609#define XCMAP display->cmap
620#define XVISUAL display->visual 610#define XVISUAL display->visual
831 operator mbstate_t *() { return &mbs; } 821 operator mbstate_t *() { return &mbs; }
832 void reset () { MEMSET (&mbs, 0, sizeof (mbs)); } 822 void reset () { MEMSET (&mbs, 0, sizeof (mbs)); }
833 mbstate () { reset (); } 823 mbstate () { reset (); }
834}; 824};
835 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
836struct rxvt_term : rxvt_vars { 864struct rxvt_term : rxvt_vars {
837 struct mbstate mbstate; 865 struct mbstate mbstate;
838 866
839 unsigned char want_refresh:1, 867 unsigned char want_refresh:1,
840#ifdef TRANSPARENT 868#ifdef TRANSPARENT
841 want_full_refresh:1, /* awaiting full screen refresh */ 869 want_full_refresh:1, /* awaiting full screen refresh */
842#endif 870#endif
985 const char *key_backspace; 1013 const char *key_backspace;
986#endif 1014#endif
987#ifndef NO_DELETE_KEY 1015#ifndef NO_DELETE_KEY
988 const char *key_delete; 1016 const char *key_delete;
989#endif 1017#endif
990#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
991 KeySym ks_bigfont, ks_smallfont;
992#endif
993#ifdef USE_XIM 1018#ifdef USE_XIM
994 rxvt_xim *input_method; 1019 rxvt_xim *input_method;
995 XIC Input_Context; 1020 XIC Input_Context;
996 XIMStyle input_style; 1021 XIMStyle input_style;
997 int event_type; 1022 int event_type;
1042 char *locale; 1067 char *locale;
1043 char *codeset; 1068 char *codeset;
1044 char charsets[4]; 1069 char charsets[4];
1045 unsigned char *v_buffer; /* pointer to physical buffer */ 1070 unsigned char *v_buffer; /* pointer to physical buffer */
1046 unsigned int v_buflen; /* size of area to write */ 1071 unsigned int v_buflen; /* size of area to write */
1047 char *newfont[MAX_NFONTS];
1048 stringvec *argv, *envv; /* if != 0, will be freed on destroy time */ 1072 stringvec *argv, *envv; /* if != 0, will be freed on destroy time */
1049#ifdef KEYSYM_RESOURCE 1073#ifdef KEYSYM_RESOURCE
1050 const unsigned char *Keysym_map[256]; 1074 const unsigned char *Keysym_map[256];
1051#endif 1075#endif
1052 const char *rs[NUM_RESOURCES]; 1076 const char *rs[NUM_RESOURCES];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines