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.353 by ayin, Sat Jan 26 15:26:54 2008 UTC vs.
Revision 1.371 by root, Tue Nov 4 22:44:09 2008 UTC

97/* 97/*
98 ***************************************************************************** 98 *****************************************************************************
99 * SYSTEM HACKS 99 * SYSTEM HACKS
100 ***************************************************************************** 100 *****************************************************************************
101 */ 101 */
102/* Consistent defines - please report on the necessity
103 * @ Unixware: defines (__svr4__)
104 */
105#if defined (SVR4) && !defined (__svr4__)
106# define __svr4__ 1
107#endif
108#if defined (sun) && !defined (__sun__)
109# define __sun__ 1
110#endif
111 102
112#ifndef HAVE_XPOINTER 103#ifndef HAVE_XPOINTER
113typedef char *XPointer; 104typedef char *XPointer;
114#endif 105#endif
115 106
209 ***************************************************************************** 200 *****************************************************************************
210 * STRUCTURES AND TYPEDEFS 201 * STRUCTURES AND TYPEDEFS
211 ***************************************************************************** 202 *****************************************************************************
212 */ 203 */
213 204
214/* If we're using either the rxvt scrollbar, keep the
215 * scrollColor resource.
216 */
217#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(PLAIN_SCROLLBAR)
218# define KEEP_SCROLLCOLOR 1
219#else
220# undef KEEP_SCROLLCOLOR
221#endif
222
223/* 205/*
224 * the 'essential' information for reporting Mouse Events 206 * the 'essential' information for reporting Mouse Events
225 * pared down from XButtonEvent 207 * pared down from XButtonEvent
226 */ 208 */
227struct mouse_event { 209struct mouse_event {
276#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) 258#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR)
277# define NO_MOUSE_REPORT_SCROLLBAR 1 259# define NO_MOUSE_REPORT_SCROLLBAR 1
278#endif 260#endif
279 261
280#define scrollBar_esc 30 262#define scrollBar_esc 30
281
282#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR)
283# define HAVE_SCROLLBARS 1
284#endif
285 263
286#if !defined (RXVT_SCROLLBAR) && !defined (NEXT_SCROLLBAR) 264#if !defined (RXVT_SCROLLBAR) && !defined (NEXT_SCROLLBAR)
287# define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1 265# define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1
288#endif 266#endif
289 267
441 URxvt_boldItalicFont = 713, 419 URxvt_boldItalicFont = 713,
442 420
443 URxvt_view_up = 720, 421 URxvt_view_up = 720,
444 URxvt_view_down = 721, 422 URxvt_view_down = 721,
445 423
446 URxvt_perl = 777, 424 URxvt_perl = 777, // for use by perl extensions, starts with "extension-name;"
447}; 425};
448 426
449/* Words starting with `Color_' are colours. Others are counts */ 427/* Words starting with `Color_' are colours. Others are counts */
450/* 428/*
451 * The PixColor and rendition colour usage should probably be decoupled 429 * The PixColor and rendition colour usage should probably be decoupled
501 Color_underline, 479 Color_underline,
502#endif 480#endif
503#ifdef OPTION_HC 481#ifdef OPTION_HC
504 Color_HC, 482 Color_HC,
505#endif 483#endif
506#ifdef KEEP_SCROLLCOLOR
507 Color_scroll, 484 Color_scroll,
485#ifdef RXVT_SCROLLBAR
508 Color_trough, 486 Color_trough,
509#endif 487#endif
510#if ENABLE_TRANSPARENCY 488#if ENABLE_TRANSPARENCY
511 Color_tint, 489 Color_tint,
512#endif 490#endif
513#if OFF_FOCUS_FADING 491#if OFF_FOCUS_FADING
514 Color_fade, 492 Color_fade,
515#endif 493#endif
516 NRS_COLORS, /* */ 494 NRS_COLORS, /* */
517#ifdef KEEP_SCROLLCOLOR 495#ifdef RXVT_SCROLLBAR
518 Color_topShadow = NRS_COLORS, 496 Color_topShadow = NRS_COLORS,
519 Color_bottomShadow, 497 Color_bottomShadow,
520 TOTAL_COLORS 498 TOTAL_COLORS
521#else 499#else
522 TOTAL_COLORS = NRS_COLORS 500 TOTAL_COLORS = NRS_COLORS
572 550
573// do not change these constants lightly, there are many interdependencies 551// do not change these constants lightly, there are many interdependencies
574#define IMBUFSIZ 128 // input modifier buffer sizes 552#define IMBUFSIZ 128 // input modifier buffer sizes
575#define KBUFSZ 512 // size of keyboard mapping buffer 553#define KBUFSZ 512 // size of keyboard mapping buffer
576#define CBUFSIZ 2048 // size of command buffer 554#define CBUFSIZ 2048 // size of command buffer
555#define CBUFCNT 8 // never call pty_fill/cmd_parse more than this often in a row
577#define UBUFSIZ 2048 // character buffer 556#define UBUFSIZ 2048 // character buffer
578 557
579#if ENABLE_FRILLS 558#if ENABLE_FRILLS
580# include <X11/Xmd.h> 559# include <X11/Xmd.h>
581typedef struct _mwmhints { 560typedef struct _mwmhints {
823 * +------------+·display·+·= term_start 802 * +------------+·display·+·= term_start
824 * | terminal | display | 803 * | terminal | display |
825 * | terminal +---------+ 804 * | terminal +---------+
826 * | terminal | 805 * | terminal |
827 * | terminal | 806 * | terminal |
828 * +------------+···········= term_stat + nrow - 1 807 * +------------+···········= term_start + nrow - 1
829 * | 808 * |
830 * | 809 * |
831 * END······················= total_rows 810 * END······················= total_rows
832 */ 811 */
833 812
869 * clicks: 1, 2 or 3 clicks - 4 indicates a special condition of 1 where 848 * clicks: 1, 2 or 3 clicks - 4 indicates a special condition of 1 where
870 * nothing is selected 849 * nothing is selected
871 * beg: row/column of beginning of selection : never past mark 850 * beg: row/column of beginning of selection : never past mark
872 * mark: row/column of initial click : never past end 851 * mark: row/column of initial click : never past end
873 * end: row/column of one character past end of selection 852 * end: row/column of one character past end of selection
874 * * Note: -nsaved <= beg.row <= mark.row <= end.row < nrow 853 * * Note: top_row <= beg.row <= mark.row <= end.row < nrow
875 * * Note: col == -1 ==> we're left of screen 854 * * Note: col == -1 ==> we're left of screen
876 * 855 *
877 */ 856 */
878typedef struct { 857typedef struct {
879 row_col_t cur; /* cursor position on the screen */ 858 row_col_t cur; /* cursor position on the screen */
965 944
966 unsigned char want_refresh:1, 945 unsigned char want_refresh:1,
967 current_screen:1, /* primary or secondary */ 946 current_screen:1, /* primary or secondary */
968 num_scr_allow:1, 947 num_scr_allow:1,
969 bypass_keystate:1, 948 bypass_keystate:1,
949#ifdef ENABLE_FRILLS
950 urgency_hint:1,
951#endif
970#ifdef CURSOR_BLINK 952#ifdef CURSOR_BLINK
971 hidden_cursor:1, 953 hidden_cursor:1,
972#endif 954#endif
973#ifdef TEXT_BLINK 955#ifdef TEXT_BLINK
974 hidden_text:1, 956 hidden_text:1,
1012 mouse_slip_wheel_speed, 994 mouse_slip_wheel_speed,
1013#endif 995#endif
1014 refresh_count, 996 refresh_count,
1015 window_vt_x, 997 window_vt_x,
1016 window_vt_y, 998 window_vt_y,
1017 window_sb_x,
1018 mouse_row, 999 mouse_row,
1019 mouse_col, 1000 mouse_col,
1020# ifdef POINTER_BLANK 1001# ifdef POINTER_BLANK
1021 pointerBlankDelay, 1002 pointerBlankDelay,
1022# endif 1003# endif
1030 unsigned long priv_modes, 1011 unsigned long priv_modes,
1031 SavedModes; 1012 SavedModes;
1032/* ---------- */ 1013/* ---------- */
1033 Atom *xa; 1014 Atom *xa;
1034/* ---------- */ 1015/* ---------- */
1035#ifdef RXVT_SCROLLBAR
1036 GC scrollbarGC,
1037 topShadowGC,
1038 botShadowGC;
1039#endif
1040#ifdef XTERM_SCROLLBAR
1041 GC xscrollbarGC,
1042 ShadowGC;
1043#endif
1044#ifdef PLAIN_SCROLLBAR
1045 GC pscrollbarGC;
1046#endif
1047#ifdef NEXT_SCROLLBAR
1048 GC blackGC,
1049 whiteGC,
1050 grayGC,
1051 darkGC,
1052 stippleGC;
1053 Pixmap dimple,
1054 upArrow,
1055 downArrow,
1056 upArrowHi,
1057 downArrowHi;
1058#endif
1059/* ---------- */
1060 Time selection_time, 1016 Time selection_time,
1061 selection_request_time; 1017 selection_request_time;
1062 pid_t cmd_pid; /* process id of child */ 1018 pid_t cmd_pid; /* process id of child */
1063 char * incr_buf; 1019 char * incr_buf;
1064 size_t incr_buf_size, incr_buf_fill; 1020 size_t incr_buf_size, incr_buf_fill;
1071 bgPixmap_t bgPixmap; 1027 bgPixmap_t bgPixmap;
1072#endif 1028#endif
1073#ifdef HAVE_AFTERIMAGE 1029#ifdef HAVE_AFTERIMAGE
1074 ASVisual *asv; 1030 ASVisual *asv;
1075 ASImageManager *asimman; 1031 ASImageManager *asimman;
1032
1033 void init_asv ()
1034 {
1035 if (!asv)
1036 asv = create_asvisual_for_id (dpy, display->screen, depth, XVisualIDFromVisual (visual), cmap, NULL);
1037 }
1076#endif 1038#endif
1077 1039
1078#if ENABLE_OVERLAY 1040#if ENABLE_OVERLAY
1079 int ov_x, ov_y, ov_w, ov_h; // overlay dimensions 1041 int ov_x, ov_y, ov_w, ov_h; // overlay dimensions
1080 text_t **ov_text; 1042 text_t **ov_text;
1124 1086
1125#if ENABLE_FRILLS || ISO_14755 1087#if ENABLE_FRILLS || ISO_14755
1126 // ISO 14755 entry support 1088 // ISO 14755 entry support
1127 unicode_t iso14755buf; 1089 unicode_t iso14755buf;
1128 void commit_iso14755 (); 1090 void commit_iso14755 ();
1129 int hex_keyval (XKeyEvent &ev);
1130# if ISO_14755 1091# if ISO_14755
1131 void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); 1092 void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1);
1132 void iso14755_54 (int x, int y); 1093 void iso14755_54 (int x, int y);
1133# endif 1094# endif
1134#endif 1095#endif
1155#endif 1116#endif
1156 1117
1157 void x_cb (XEvent &xev); 1118 void x_cb (XEvent &xev);
1158 xevent_watcher termwin_ev; 1119 xevent_watcher termwin_ev;
1159 xevent_watcher vt_ev; 1120 xevent_watcher vt_ev;
1160#ifdef HAVE_SCROLLBARS
1161 xevent_watcher scrollbar_ev; 1121 xevent_watcher scrollbar_ev;
1162#endif
1163 1122
1164 void child_cb (ev::child &w, int revents); ev::child child_ev; 1123 void child_cb (ev::child &w, int revents); ev::child child_ev;
1165 void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev; 1124 void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev;
1166 void refresh_check (); 1125 void refresh_check ();
1167 void flush (); 1126 void flush ();
1240 wchar_t next_char () NOTHROW; 1199 wchar_t next_char () NOTHROW;
1241 wchar_t cmd_getc () THROW ((class out_of_input)); 1200 wchar_t cmd_getc () THROW ((class out_of_input));
1242 uint32_t next_octet () NOTHROW; 1201 uint32_t next_octet () NOTHROW;
1243 uint32_t cmd_get8 () THROW ((class out_of_input)); 1202 uint32_t cmd_get8 () THROW ((class out_of_input));
1244 1203
1245 bool cmd_parse (); 1204 void cmd_parse ();
1246 void mouse_report (XButtonEvent &ev); 1205 void mouse_report (XButtonEvent &ev);
1247 void button_press (XButtonEvent &ev); 1206 void button_press (XButtonEvent &ev);
1248 void button_release (XButtonEvent &ev); 1207 void button_release (XButtonEvent &ev);
1249 void focus_in (); 1208 void focus_in ();
1250 void focus_out (); 1209 void focus_out ();
1210 void set_urgency (bool enable);
1251 void update_fade_color (unsigned int idx); 1211 void update_fade_color (unsigned int idx);
1252#ifdef PRINTPIPE 1212#ifdef PRINTPIPE
1253 FILE *popen_printer (); 1213 FILE *popen_printer ();
1254 int pclose_printer (FILE *stream); 1214 int pclose_printer (FILE *stream);
1255#endif 1215#endif
1278 void init_command (const char *const *argv); 1238 void init_command (const char *const *argv);
1279 void run_command (const char *const *argv); 1239 void run_command (const char *const *argv);
1280 int run_child (const char *const *argv); 1240 int run_child (const char *const *argv);
1281 void color_aliases (int idx); 1241 void color_aliases (int idx);
1282 void create_windows (int argc, const char *const *argv); 1242 void create_windows (int argc, const char *const *argv);
1283 void Get_Colours (); 1243 void get_colours ();
1284 void get_ourmods (); 1244 void get_ourmods ();
1285 // main.C 1245 // main.C
1286 void tt_winch (); 1246 void tt_winch ();
1287 rxvt_term (); 1247 rxvt_term ();
1288 ~rxvt_term (); 1248 ~rxvt_term ();
1381 options[opt >> 3] |= (1 << (opt & 7)); 1341 options[opt >> 3] |= (1 << (opt & 7));
1382 else 1342 else
1383 options[opt >> 3] &= ~(1 << (opt & 7)); 1343 options[opt >> 3] &= ~(1 << (opt & 7));
1384 } 1344 }
1385 1345
1386 void PrivMode (int set, unsigned bit) NOTHROW 1346 void set_privmode (unsigned bit, int set) NOTHROW
1387 { 1347 {
1388 if (set) 1348 if (set)
1389 priv_modes |= bit; 1349 priv_modes |= bit;
1390 else 1350 else
1391 priv_modes &= ~bit; 1351 priv_modes &= ~bit;
1393 1353
1394 // modifies first argument(!) 1354 // modifies first argument(!)
1395 void paste (char *data, unsigned int len) NOTHROW; 1355 void paste (char *data, unsigned int len) NOTHROW;
1396 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1356 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1397 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1357 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;
1358 void scr_kill_char (line_t &l, int col) const NOTHROW;
1398 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1359 int scr_scroll_text (int row1, int row2, int count) NOTHROW;
1399 void scr_reset (); 1360 void scr_reset ();
1400 void scr_release () NOTHROW; 1361 void scr_release () NOTHROW;
1401 void scr_clear (bool really = false) NOTHROW; 1362 void scr_clear (bool really = false) NOTHROW;
1402 void scr_refresh () NOTHROW; 1363 void scr_refresh () NOTHROW;
1414 void scr_remap_chars (line_t &l) NOTHROW; 1375 void scr_remap_chars (line_t &l) NOTHROW;
1415 1376
1416 enum cursor_mode { SAVE, RESTORE }; 1377 enum cursor_mode { SAVE, RESTORE };
1417 1378
1418 void scr_poweron (); 1379 void scr_poweron ();
1380 void scr_soft_reset () NOTHROW;
1419 void scr_cursor (cursor_mode mode) NOTHROW; 1381 void scr_cursor (cursor_mode mode) NOTHROW;
1420 void scr_do_wrap () NOTHROW; 1382 void scr_do_wrap () NOTHROW;
1421 void scr_swap_screen () NOTHROW; 1383 void scr_swap_screen () NOTHROW;
1422 void scr_change_screen (int scrn); 1384 void scr_change_screen (int scrn);
1423 void scr_color (unsigned int color, int fgbg) NOTHROW; 1385 void scr_color (unsigned int color, int fgbg) NOTHROW;
1467 void selection_send (const XSelectionRequestEvent &rq) NOTHROW; 1429 void selection_send (const XSelectionRequestEvent &rq) NOTHROW;
1468 void selection_click (int clicks, int x, int y) NOTHROW; 1430 void selection_click (int clicks, int x, int y) NOTHROW;
1469 void selection_extend (int x, int y, int flag) NOTHROW; 1431 void selection_extend (int x, int y, int flag) NOTHROW;
1470 void selection_rotate (int x, int y) NOTHROW; 1432 void selection_rotate (int x, int y) NOTHROW;
1471 1433
1472#if defined(NEXT_SCROLLBAR)
1473 // scrollbar-next.C
1474 Pixmap renderPixmap (const char *const *data, int width, int height);
1475 void init_scrollbar_stuff ();
1476 void drawBevel (Drawable d, int x1, int y1, int w, int h);
1477 int scrollbar_show_next (int update, int last_top, int last_bot, int scrollbar_len);
1478#endif
1479
1480#if defined(RXVT_SCROLLBAR)
1481 // scrollbar-rxvt.C
1482 int scrollbar_show_rxvt (int update, int last_top, int last_bot, int scrollbar_len);
1483#endif
1484
1485#if defined(XTERM_SCROLLBAR)
1486 // scrollbar-xterm.C
1487 int scrollbar_show_xterm (int update, int last_top, int last_bot, int scrollbar_len);
1488#endif
1489
1490#if defined(PLAIN_SCROLLBAR)
1491 // scrollbar-plain.C
1492 int scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len);
1493#endif
1494
1495 // scrollbar.C
1496 void resize_scrollbar ();
1497 int scrollbar_mapping (int map);
1498 int scrollbar_show (int update);
1499 void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness);
1500
1501 // xdefaults.C 1434 // xdefaults.C
1502 void get_options (int argc, const char *const *argv); 1435 void get_options (int argc, const char *const *argv);
1503 int parse_keysym (const char *str, const char *arg); 1436 int parse_keysym (const char *str, const char *arg);
1504 const char *x_resource (const char *name); 1437 const char *x_resource (const char *name);
1505 void extract_resources (); 1438 void extract_resources ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines