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.51 by pcg, Sat Mar 6 00:05:01 2004 UTC vs.
Revision 1.54 by pcg, Mon Mar 15 00:08:11 2004 UTC

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"
521#endif 518#endif
522#ifdef USE_XIM 519#ifdef USE_XIM
523 Rs_preeditType, 520 Rs_preeditType,
524 Rs_inputMethod, 521 Rs_inputMethod,
525#endif 522#endif
526#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
527 Rs_bigfont_key,
528 Rs_smallfont_key,
529#endif
530#ifdef TRANSPARENT 523#ifdef TRANSPARENT
531 Rs_transparent, 524 Rs_transparent,
532 Rs_transparent_all, 525 Rs_transparent_all,
533#endif 526#endif
534#ifndef NO_FRILLS 527#ifndef NO_FRILLS
538 Rs_scrollBar_thickness, 531 Rs_scrollBar_thickness,
539#ifndef NO_LINESPACE 532#ifndef NO_LINESPACE
540 Rs_lineSpace, 533 Rs_lineSpace,
541#endif 534#endif
542 Rs_cutchars, 535 Rs_cutchars,
543#ifdef ACS_ASCII
544 Rs_acs_chars,
545#endif
546 Rs_modifier, 536 Rs_modifier,
547 Rs_answerbackstring, 537 Rs_answerbackstring,
548 Rs_tripleclickwords, 538 Rs_tripleclickwords,
549 Rs_cursorBlink, 539 Rs_cursorBlink,
550 Rs_pointerBlank, 540 Rs_pointerBlank,
602#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) 592#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11)
603#define PrivMode(test,bit) \ 593#define PrivMode(test,bit) \
604 if (test) \ 594 if (test) \
605 PrivateModes |= (bit); \ 595 PrivateModes |= (bit); \
606 else \ 596 else \
607 PrivateModes &= ~ (bit) 597 PrivateModes &= ~(bit)
608 598
609#ifdef ALLOW_132_MODE 599#ifdef ALLOW_132_MODE
610# define PrivMode_Default \
611(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) 600# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
612#else 601#else
613# define PrivMode_Default \
614(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor) 602# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
615#endif 603#endif
616 604
617#define XDEPTH display->depth 605#define XDEPTH display->depth
618#define XCMAP display->cmap 606#define XCMAP display->cmap
619#define XVISUAL display->visual 607#define XVISUAL display->visual
840# define COMPOSE_LO 0xd800UL 828# define COMPOSE_LO 0xd800UL
841# define COMPOSE_HI 0xf8ffUL // dfff should be safer, but... 829# define COMPOSE_HI 0xf8ffUL // dfff should be safer, but...
842# define IS_COMPOSE(n) (COMPOSE_LO <= (n) && (n) <= COMPOSE_HI) 830# define IS_COMPOSE(n) (COMPOSE_LO <= (n) && (n) <= COMPOSE_HI)
843#endif 831#endif
844 832
845#if ENCODING_COMPOSE 833#if ENABLE_COMBINING
846// compose chars are used to represent composite characters 834// compose chars are used to represent composite characters
847// that are not representable in unicode, as well as characters 835// that are not representable in unicode, as well as characters
848// not fitting in the BMP. 836// not fitting in the BMP.
849struct compose_char { 837struct compose_char {
850 uint32_t c1, c2; // any chars != NOCHAR are valid 838 unicode_t c1, c2; // any chars != NOCHAR are valid
851 compose_char (uint32_t c1, uint32_t c2) 839 compose_char (unicode_t c1, unicode_t c2)
852 : c1(c1), c2(c2) 840 : c1(c1), c2(c2)
853 { } 841 { }
854}; 842};
855 843
856class rxvt_composite_vec { 844class rxvt_composite_vec {
857 vector<compose_char> v; 845 vector<compose_char> v;
858public: 846public:
859 text_t compose (uint32_t c1, uint32_t c2 = NOCHAR); 847 text_t compose (unicode_t c1, unicode_t c2 = NOCHAR);
860 int expand (uint32_t c, wchar_t *r); 848 int expand (unicode_t c, wchar_t *r);
861 compose_char *operator [](text_t c) 849 compose_char *operator [](text_t c)
862 { 850 {
863 return c >= COMPOSE_LO && c < COMPOSE_LO + v.size () 851 return c >= COMPOSE_LO && c < COMPOSE_LO + v.size ()
864 ? &v[c - COMPOSE_LO] 852 ? &v[c - COMPOSE_LO]
865 : 0; 853 : 0;
1022 const char *key_backspace; 1010 const char *key_backspace;
1023#endif 1011#endif
1024#ifndef NO_DELETE_KEY 1012#ifndef NO_DELETE_KEY
1025 const char *key_delete; 1013 const char *key_delete;
1026#endif 1014#endif
1027#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
1028 KeySym ks_bigfont, ks_smallfont;
1029#endif
1030#ifdef USE_XIM 1015#ifdef USE_XIM
1031 rxvt_xim *input_method; 1016 rxvt_xim *input_method;
1032 XIC Input_Context; 1017 XIC Input_Context;
1033 XIMStyle input_style; 1018 XIMStyle input_style;
1034 int event_type; 1019 int event_type;
1079 char *locale; 1064 char *locale;
1080 char *codeset; 1065 char *codeset;
1081 char charsets[4]; 1066 char charsets[4];
1082 unsigned char *v_buffer; /* pointer to physical buffer */ 1067 unsigned char *v_buffer; /* pointer to physical buffer */
1083 unsigned int v_buflen; /* size of area to write */ 1068 unsigned int v_buflen; /* size of area to write */
1084 char *newfont[MAX_NFONTS];
1085 stringvec *argv, *envv; /* if != 0, will be freed on destroy time */ 1069 stringvec *argv, *envv; /* if != 0, will be freed on destroy time */
1086#ifdef KEYSYM_RESOURCE 1070#ifdef KEYSYM_RESOURCE
1087 const unsigned char *Keysym_map[256]; 1071 const unsigned char *Keysym_map[256];
1088#endif 1072#endif
1089 const char *rs[NUM_RESOURCES]; 1073 const char *rs[NUM_RESOURCES];
1141 void destroy (); 1125 void destroy ();
1142 1126
1143 bool init (int argc, const char *const *argv); 1127 bool init (int argc, const char *const *argv);
1144 bool init_vars (); 1128 bool init_vars ();
1145 1129
1146 uint32_t next_char (); 1130 unicode_t next_char ();
1147 1131
1148 bool pty_fill (); 1132 bool pty_fill ();
1149 1133
1150 void *operator new (size_t s); 1134 void *operator new (size_t s);
1151 void operator delete (void *p, size_t s); 1135 void operator delete (void *p, size_t s);
1206 /* autoconvert */ 1190 /* autoconvert */
1207 1191
1208 // command.C 1192 // command.C
1209 void lookup_key (XKeyEvent &ev); 1193 void lookup_key (XKeyEvent &ev);
1210 unsigned int cmd_write (const unsigned char *str, unsigned int count); 1194 unsigned int cmd_write (const unsigned char *str, unsigned int count);
1211 uint32_t cmd_getc (); 1195 unicode_t cmd_getc ();
1212 bool cmd_parse (); 1196 bool cmd_parse ();
1213 void mouse_report (XButtonEvent &ev); 1197 void mouse_report (XButtonEvent &ev);
1214 void button_press (XButtonEvent &ev); 1198 void button_press (XButtonEvent &ev);
1215 void button_release (XButtonEvent &ev); 1199 void button_release (XButtonEvent &ev);
1216 int check_our_parents (); 1200 int check_our_parents ();
1288 void scr_poweron (); 1272 void scr_poweron ();
1289 void scr_cursor (int mode); 1273 void scr_cursor (int mode);
1290 int scr_change_screen (int scrn); 1274 int scr_change_screen (int scrn);
1291 void scr_color (unsigned int color, int fgbg); 1275 void scr_color (unsigned int color, int fgbg);
1292 void scr_rendition (int set, int style); 1276 void scr_rendition (int set, int style);
1293 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);
1294 void scr_backspace (); 1278 void scr_backspace ();
1295 void scr_tab (int count); 1279 void scr_tab (int count);
1296 void scr_backindex (); 1280 void scr_backindex ();
1297 void scr_forwardindex (); 1281 void scr_forwardindex ();
1298 void scr_gotorc (int row, int col, int relative); 1282 void scr_gotorc (int row, int col, int relative);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines