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.352 by ayin, Sun Jan 20 14:12:39 2008 UTC vs.
Revision 1.370 by root, Tue Nov 4 14:25:10 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 {
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 263
282#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR) 264#if !defined (RXVT_SCROLLBAR) && !defined (NEXT_SCROLLBAR)
283# define HAVE_SCROLLBARS 1 265# define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1
284#endif 266#endif
285 267
286enum { 268enum {
287 NO_REFRESH = 0, /* Window not visible at all! */ 269 NO_REFRESH = 0, /* Window not visible at all! */
288 FAST_REFRESH = 1, /* Fully exposed window */ 270 FAST_REFRESH = 1, /* Fully exposed window */
437 URxvt_boldItalicFont = 713, 419 URxvt_boldItalicFont = 713,
438 420
439 URxvt_view_up = 720, 421 URxvt_view_up = 720,
440 URxvt_view_down = 721, 422 URxvt_view_down = 721,
441 423
442 URxvt_perl = 777, 424 URxvt_perl = 777, // for use by perl extensions, starts with "extension-name;"
443}; 425};
444 426
445/* Words starting with `Color_' are colours. Others are counts */ 427/* Words starting with `Color_' are colours. Others are counts */
446/* 428/*
447 * The PixColor and rendition colour usage should probably be decoupled 429 * The PixColor and rendition colour usage should probably be decoupled
497 Color_underline, 479 Color_underline,
498#endif 480#endif
499#ifdef OPTION_HC 481#ifdef OPTION_HC
500 Color_HC, 482 Color_HC,
501#endif 483#endif
502#ifdef KEEP_SCROLLCOLOR
503 Color_scroll, 484 Color_scroll,
485#ifdef RXVT_SCROLLBAR
504 Color_trough, 486 Color_trough,
505#endif 487#endif
506#if ENABLE_TRANSPARENCY 488#if ENABLE_TRANSPARENCY
507 Color_tint, 489 Color_tint,
508#endif 490#endif
509#if OFF_FOCUS_FADING 491#if OFF_FOCUS_FADING
510 Color_fade, 492 Color_fade,
511#endif 493#endif
512 NRS_COLORS, /* */ 494 NRS_COLORS, /* */
513#ifdef KEEP_SCROLLCOLOR 495#ifdef RXVT_SCROLLBAR
514 Color_topShadow = NRS_COLORS, 496 Color_topShadow = NRS_COLORS,
515 Color_bottomShadow, 497 Color_bottomShadow,
516 TOTAL_COLORS 498 TOTAL_COLORS
517#else 499#else
518 TOTAL_COLORS = NRS_COLORS 500 TOTAL_COLORS = NRS_COLORS
568 550
569// do not change these constants lightly, there are many interdependencies 551// do not change these constants lightly, there are many interdependencies
570#define IMBUFSIZ 128 // input modifier buffer sizes 552#define IMBUFSIZ 128 // input modifier buffer sizes
571#define KBUFSZ 512 // size of keyboard mapping buffer 553#define KBUFSZ 512 // size of keyboard mapping buffer
572#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
573#define UBUFSIZ 2048 // character buffer 556#define UBUFSIZ 2048 // character buffer
574 557
575#if ENABLE_FRILLS 558#if ENABLE_FRILLS
576# include <X11/Xmd.h> 559# include <X11/Xmd.h>
577typedef struct _mwmhints { 560typedef struct _mwmhints {
819 * +------------+·display·+·= term_start 802 * +------------+·display·+·= term_start
820 * | terminal | display | 803 * | terminal | display |
821 * | terminal +---------+ 804 * | terminal +---------+
822 * | terminal | 805 * | terminal |
823 * | terminal | 806 * | terminal |
824 * +------------+···········= term_stat + nrow - 1 807 * +------------+···········= term_start + nrow - 1
825 * | 808 * |
826 * | 809 * |
827 * END······················= total_rows 810 * END······················= total_rows
828 */ 811 */
829 812
865 * 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
866 * nothing is selected 849 * nothing is selected
867 * beg: row/column of beginning of selection : never past mark 850 * beg: row/column of beginning of selection : never past mark
868 * mark: row/column of initial click : never past end 851 * mark: row/column of initial click : never past end
869 * end: row/column of one character past end of selection 852 * end: row/column of one character past end of selection
870 * * Note: -nsaved <= beg.row <= mark.row <= end.row < nrow 853 * * Note: top_row <= beg.row <= mark.row <= end.row < nrow
871 * * Note: col == -1 ==> we're left of screen 854 * * Note: col == -1 ==> we're left of screen
872 * 855 *
873 */ 856 */
874typedef struct { 857typedef struct {
875 row_col_t cur; /* cursor position on the screen */ 858 row_col_t cur; /* cursor position on the screen */
961 944
962 unsigned char want_refresh:1, 945 unsigned char want_refresh:1,
963 current_screen:1, /* primary or secondary */ 946 current_screen:1, /* primary or secondary */
964 num_scr_allow:1, 947 num_scr_allow:1,
965 bypass_keystate:1, 948 bypass_keystate:1,
949#ifdef ENABLE_FRILLS
950 urgency_hint:1,
951#endif
966#ifdef CURSOR_BLINK 952#ifdef CURSOR_BLINK
967 hidden_cursor:1, 953 hidden_cursor:1,
968#endif 954#endif
969#ifdef TEXT_BLINK 955#ifdef TEXT_BLINK
970 hidden_text:1, 956 hidden_text:1,
1008 mouse_slip_wheel_speed, 994 mouse_slip_wheel_speed,
1009#endif 995#endif
1010 refresh_count, 996 refresh_count,
1011 window_vt_x, 997 window_vt_x,
1012 window_vt_y, 998 window_vt_y,
1013 window_sb_x,
1014 mouse_row, 999 mouse_row,
1015 mouse_col, 1000 mouse_col,
1016# ifdef POINTER_BLANK 1001# ifdef POINTER_BLANK
1017 pointerBlankDelay, 1002 pointerBlankDelay,
1018# endif 1003# endif
1026 unsigned long priv_modes, 1011 unsigned long priv_modes,
1027 SavedModes; 1012 SavedModes;
1028/* ---------- */ 1013/* ---------- */
1029 Atom *xa; 1014 Atom *xa;
1030/* ---------- */ 1015/* ---------- */
1031#ifdef RXVT_SCROLLBAR
1032 GC scrollbarGC,
1033 topShadowGC,
1034 botShadowGC;
1035#endif
1036#ifdef XTERM_SCROLLBAR
1037 GC xscrollbarGC,
1038 ShadowGC;
1039#endif
1040#ifdef PLAIN_SCROLLBAR
1041 GC pscrollbarGC;
1042#endif
1043#ifdef NEXT_SCROLLBAR
1044 GC blackGC,
1045 whiteGC,
1046 grayGC,
1047 darkGC,
1048 stippleGC;
1049 Pixmap dimple,
1050 upArrow,
1051 downArrow,
1052 upArrowHi,
1053 downArrowHi;
1054#endif
1055/* ---------- */
1056 Time selection_time, 1016 Time selection_time,
1057 selection_request_time; 1017 selection_request_time;
1058 pid_t cmd_pid; /* process id of child */ 1018 pid_t cmd_pid; /* process id of child */
1059 char * incr_buf; 1019 char * incr_buf;
1060 size_t incr_buf_size, incr_buf_fill; 1020 size_t incr_buf_size, incr_buf_fill;
1067 bgPixmap_t bgPixmap; 1027 bgPixmap_t bgPixmap;
1068#endif 1028#endif
1069#ifdef HAVE_AFTERIMAGE 1029#ifdef HAVE_AFTERIMAGE
1070 ASVisual *asv; 1030 ASVisual *asv;
1071 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 }
1072#endif 1038#endif
1073 1039
1074#if ENABLE_OVERLAY 1040#if ENABLE_OVERLAY
1075 int ov_x, ov_y, ov_w, ov_h; // overlay dimensions 1041 int ov_x, ov_y, ov_w, ov_h; // overlay dimensions
1076 text_t **ov_text; 1042 text_t **ov_text;
1120 1086
1121#if ENABLE_FRILLS || ISO_14755 1087#if ENABLE_FRILLS || ISO_14755
1122 // ISO 14755 entry support 1088 // ISO 14755 entry support
1123 unicode_t iso14755buf; 1089 unicode_t iso14755buf;
1124 void commit_iso14755 (); 1090 void commit_iso14755 ();
1125 int hex_keyval (XKeyEvent &ev);
1126# if ISO_14755 1091# if ISO_14755
1127 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);
1128 void iso14755_54 (int x, int y); 1093 void iso14755_54 (int x, int y);
1129# endif 1094# endif
1130#endif 1095#endif
1151#endif 1116#endif
1152 1117
1153 void x_cb (XEvent &xev); 1118 void x_cb (XEvent &xev);
1154 xevent_watcher termwin_ev; 1119 xevent_watcher termwin_ev;
1155 xevent_watcher vt_ev; 1120 xevent_watcher vt_ev;
1156#ifdef HAVE_SCROLLBARS
1157 xevent_watcher scrollbar_ev; 1121 xevent_watcher scrollbar_ev;
1158#endif
1159 1122
1160 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;
1161 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;
1162 void refresh_check (); 1125 void refresh_check ();
1163 void flush (); 1126 void flush ();
1236 wchar_t next_char () NOTHROW; 1199 wchar_t next_char () NOTHROW;
1237 wchar_t cmd_getc () THROW ((class out_of_input)); 1200 wchar_t cmd_getc () THROW ((class out_of_input));
1238 uint32_t next_octet () NOTHROW; 1201 uint32_t next_octet () NOTHROW;
1239 uint32_t cmd_get8 () THROW ((class out_of_input)); 1202 uint32_t cmd_get8 () THROW ((class out_of_input));
1240 1203
1241 bool cmd_parse (); 1204 void cmd_parse ();
1242 void mouse_report (XButtonEvent &ev); 1205 void mouse_report (XButtonEvent &ev);
1243 void button_press (XButtonEvent &ev); 1206 void button_press (XButtonEvent &ev);
1244 void button_release (XButtonEvent &ev); 1207 void button_release (XButtonEvent &ev);
1245 void focus_in (); 1208 void focus_in ();
1246 void focus_out (); 1209 void focus_out ();
1210 void set_urgency (bool enable);
1247 void update_fade_color (unsigned int idx); 1211 void update_fade_color (unsigned int idx);
1248#ifdef PRINTPIPE 1212#ifdef PRINTPIPE
1249 FILE *popen_printer (); 1213 FILE *popen_printer ();
1250 int pclose_printer (FILE *stream); 1214 int pclose_printer (FILE *stream);
1251#endif 1215#endif
1274 void init_command (const char *const *argv); 1238 void init_command (const char *const *argv);
1275 void run_command (const char *const *argv); 1239 void run_command (const char *const *argv);
1276 int run_child (const char *const *argv); 1240 int run_child (const char *const *argv);
1277 void color_aliases (int idx); 1241 void color_aliases (int idx);
1278 void create_windows (int argc, const char *const *argv); 1242 void create_windows (int argc, const char *const *argv);
1279 void Get_Colours (); 1243 void get_colours ();
1280 void get_ourmods (); 1244 void get_ourmods ();
1281 // main.C 1245 // main.C
1282 void tt_winch (); 1246 void tt_winch ();
1283 rxvt_term (); 1247 rxvt_term ();
1284 ~rxvt_term (); 1248 ~rxvt_term ();
1377 options[opt >> 3] |= (1 << (opt & 7)); 1341 options[opt >> 3] |= (1 << (opt & 7));
1378 else 1342 else
1379 options[opt >> 3] &= ~(1 << (opt & 7)); 1343 options[opt >> 3] &= ~(1 << (opt & 7));
1380 } 1344 }
1381 1345
1382 void PrivMode (int set, unsigned bit) NOTHROW 1346 void set_privmode (unsigned bit, int set) NOTHROW
1383 { 1347 {
1384 if (set) 1348 if (set)
1385 priv_modes |= bit; 1349 priv_modes |= bit;
1386 else 1350 else
1387 priv_modes &= ~bit; 1351 priv_modes &= ~bit;
1389 1353
1390 // modifies first argument(!) 1354 // modifies first argument(!)
1391 void paste (char *data, unsigned int len) NOTHROW; 1355 void paste (char *data, unsigned int len) NOTHROW;
1392 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;
1393 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;
1394 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1359 int scr_scroll_text (int row1, int row2, int count) NOTHROW;
1395 void scr_reset (); 1360 void scr_reset ();
1396 void scr_release () NOTHROW; 1361 void scr_release () NOTHROW;
1397 void scr_clear (bool really = false) NOTHROW; 1362 void scr_clear (bool really = false) NOTHROW;
1398 void scr_refresh () NOTHROW; 1363 void scr_refresh () NOTHROW;
1463 void selection_send (const XSelectionRequestEvent &rq) NOTHROW; 1428 void selection_send (const XSelectionRequestEvent &rq) NOTHROW;
1464 void selection_click (int clicks, int x, int y) NOTHROW; 1429 void selection_click (int clicks, int x, int y) NOTHROW;
1465 void selection_extend (int x, int y, int flag) NOTHROW; 1430 void selection_extend (int x, int y, int flag) NOTHROW;
1466 void selection_rotate (int x, int y) NOTHROW; 1431 void selection_rotate (int x, int y) NOTHROW;
1467 1432
1468#if defined(NEXT_SCROLLBAR)
1469 // scrollbar-next.C
1470 Pixmap renderPixmap (const char *const *data, int width, int height);
1471 void init_scrollbar_stuff ();
1472 void drawBevel (Drawable d, int x1, int y1, int w, int h);
1473 int scrollbar_show_next (int update, int last_top, int last_bot, int scrollbar_len);
1474#endif
1475
1476#if defined(RXVT_SCROLLBAR)
1477 // scrollbar-rxvt.C
1478 int scrollbar_show_rxvt (int update, int last_top, int last_bot, int scrollbar_len);
1479#endif
1480
1481#if defined(XTERM_SCROLLBAR)
1482 // scrollbar-xterm.C
1483 int scrollbar_show_xterm (int update, int last_top, int last_bot, int scrollbar_len);
1484#endif
1485
1486#if defined(PLAIN_SCROLLBAR)
1487 // scrollbar-plain.C
1488 int scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len);
1489#endif
1490
1491 // scrollbar.C
1492 void resize_scrollbar ();
1493 int scrollbar_mapping (int map);
1494 int scrollbar_show (int update);
1495 void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness);
1496
1497 // xdefaults.C 1433 // xdefaults.C
1498 void get_options (int argc, const char *const *argv); 1434 void get_options (int argc, const char *const *argv);
1499 int parse_keysym (const char *str, const char *arg); 1435 int parse_keysym (const char *str, const char *arg);
1500 const char *x_resource (const char *name); 1436 const char *x_resource (const char *name);
1501 void extract_resources (); 1437 void extract_resources ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines