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.306 by sasha, Wed Sep 12 21:06:08 2007 UTC vs.
Revision 1.314 by sasha, Fri Oct 26 17:26:16 2007 UTC

72typedef char *XPointer; 72typedef char *XPointer;
73#endif 73#endif
74 74
75#include <termios.h> 75#include <termios.h>
76typedef struct termios ttymode_t; 76typedef struct termios ttymode_t;
77
78#ifdef HAVE_AFTERIMAGE
79# include <afterimage.h>
80#undef min
81#undef max
82#endif
83 77
84#include "background.h" 78#include "background.h"
85 79
86#ifndef STDIN_FILENO 80#ifndef STDIN_FILENO
87# define STDIN_FILENO 0 81# define STDIN_FILENO 0
598#define PrivMode_TtyOutputInh (1UL<<15) 592#define PrivMode_TtyOutputInh (1UL<<15)
599#define PrivMode_Keypress (1UL<<16) 593#define PrivMode_Keypress (1UL<<16)
600#define PrivMode_smoothScroll (1UL<<17) 594#define PrivMode_smoothScroll (1UL<<17)
601#define PrivMode_vt52 (1UL<<18) 595#define PrivMode_vt52 (1UL<<18)
602#define PrivMode_LFNL (1UL<<19) 596#define PrivMode_LFNL (1UL<<19)
597#define PrivMode_MouseBtnEvent (1UL<<20)
598#define PrivMode_MouseAnyEvent (1UL<<21)
603/* too annoying to implement X11 highlight tracking */ 599/* too annoying to implement X11 highlight tracking */
604/* #define PrivMode_MouseX11Track (1LU<<20) */ 600/* #define PrivMode_MouseX11Track (1LU<<20) */
605 601
606#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) 602#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent)
607 603
608#ifdef ALLOW_132_MODE 604#ifdef ALLOW_132_MODE
609# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) 605# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
610#else 606#else
611# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) 607# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
924 last_state, /* scrollbar last state */ 920 last_state, /* scrollbar last state */
925 scrollbar_len, 921 scrollbar_len,
926 window_vt_x, 922 window_vt_x,
927 window_vt_y, 923 window_vt_y,
928 window_sb_x, 924 window_sb_x,
925 mouse_row,
926 mouse_col,
929# ifdef POINTER_BLANK 927# ifdef POINTER_BLANK
930 pointerBlankDelay, 928 pointerBlankDelay,
931# endif 929# endif
932 allowedxerror; 930 allowedxerror;
933/* ---------- */ 931/* ---------- */
1039 void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); 1037 void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1);
1040 void iso14755_54 (int x, int y); 1038 void iso14755_54 (int x, int y);
1041# endif 1039# endif
1042#endif 1040#endif
1043 1041
1044 // modifies first argument(!)
1045 void paste (char *data, unsigned int len) NOTHROW;
1046
1047 long vt_emask, vt_emask_perl, vt_emask_xim; 1042 long vt_emask, vt_emask_perl, vt_emask_xim, vt_emask_mouse;
1048 1043
1049 void vt_select_input () const NOTHROW 1044 void vt_select_input () const NOTHROW
1050 { 1045 {
1051 XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim); 1046 XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim | vt_emask_mouse);
1052 } 1047 }
1053 1048
1054#if ENABLE_TRANSPARENCY || ENABLE_PERL 1049#if ENABLE_TRANSPARENCY || ENABLE_PERL
1055 void rootwin_cb (XEvent &xev); 1050 void rootwin_cb (XEvent &xev);
1056 xevent_watcher rootwin_ev; 1051 xevent_watcher rootwin_ev;
1060 void update_background_cb (time_watcher &w); 1055 void update_background_cb (time_watcher &w);
1061 time_watcher update_background_ev; 1056 time_watcher update_background_ev;
1062#endif 1057#endif
1063 1058
1064 void x_cb (XEvent &xev); 1059 void x_cb (XEvent &xev);
1065 void flush ();
1066 xevent_watcher termwin_ev; 1060 xevent_watcher termwin_ev;
1067 xevent_watcher vt_ev; 1061 xevent_watcher vt_ev;
1068#ifdef HAVE_SCROLLBARS 1062#ifdef HAVE_SCROLLBARS
1069 xevent_watcher scrollbar_ev; 1063 xevent_watcher scrollbar_ev;
1070#endif 1064#endif
1071 1065
1072 void child_cb (child_watcher &w, int status); child_watcher child_ev; 1066 void child_cb (child_watcher &w, int status); child_watcher child_ev;
1073 void check_cb (check_watcher &w); check_watcher check_ev; 1067 void check_cb (check_watcher &w); check_watcher check_ev;
1074 void destroy_cb (time_watcher &w); time_watcher destroy_ev; 1068 void destroy_cb (time_watcher &w); time_watcher destroy_ev;
1069 void flush ();
1075 void flush_cb (time_watcher &w); time_watcher flush_ev; 1070 void flush_cb (time_watcher &w); time_watcher flush_ev;
1071 bool pty_fill ();
1076 void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; 1072 void pty_cb (io_watcher &w, short revents); io_watcher pty_ev;
1077 void incr_cb (time_watcher &w) NOTHROW; time_watcher incr_ev; 1073 void incr_cb (time_watcher &w) NOTHROW; time_watcher incr_ev;
1078 1074
1079#ifdef CURSOR_BLINK 1075#ifdef CURSOR_BLINK
1080 void cursor_blink_cb (time_watcher &w); time_watcher cursor_blink_ev; 1076 void cursor_blink_cb (time_watcher &w); time_watcher cursor_blink_ev;
1103 void pointer_unblank (); 1099 void pointer_unblank ();
1104 1100
1105 void tt_printf (const char *fmt,...); 1101 void tt_printf (const char *fmt,...);
1106 void tt_write (const char *data, unsigned int len); 1102 void tt_write (const char *data, unsigned int len);
1107 void pty_write (); 1103 void pty_write ();
1108
1109 void tt_winch ();
1110
1111 rxvt_term ();
1112 ~rxvt_term ();
1113 void destroy ();
1114 void emergency_cleanup ();
1115
1116 bool init (int argc, const char *const *argv, stringvec *envv);
1117 1104
1118 bool init (stringvec *argv, stringvec *envv) 1105 bool init (stringvec *argv, stringvec *envv)
1119 { 1106 {
1120 this->argv = argv; 1107 this->argv = argv;
1121 return init (argv->size (), argv->begin (), envv); 1108 return init (argv->size (), argv->begin (), envv);
1122 } 1109 }
1123
1124 bool init_vars ();
1125
1126 bool pty_fill ();
1127 1110
1128 void make_current () const // make this the "currently active" urxvt instance 1111 void make_current () const // make this the "currently active" urxvt instance
1129 { 1112 {
1130 SET_R (this); 1113 SET_R (this);
1131 set_environ (envv); 1114 set_environ (envv);
1132 rxvt_set_locale (locale); 1115 rxvt_set_locale (locale);
1133 } 1116 }
1134 1117
1135 void init_secondary ();
1136 const char **init_resources (int argc, const char *const *argv);
1137 const char *x_resource (const char *name);
1138 void init_env ();
1139 void set_locale (const char *locale);
1140 void init_xlocale ();
1141 void init_command (const char *const *argv);
1142 void run_command (const char *const *argv);
1143 int run_child (const char *const *argv);
1144
1145 void color_aliases (int idx);
1146 void recolour_cursor ();
1147 void create_windows (int argc, const char *const *argv);
1148 void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent);
1149 void window_calc (unsigned int newwidth, unsigned int newheight);
1150
1151#if USE_XIM 1118#if USE_XIM
1152 rxvt_xim *input_method; 1119 rxvt_xim *input_method;
1153 XIC Input_Context; 1120 XIC Input_Context;
1154 XIMStyle input_style; 1121 XIMStyle input_style;
1155 XPoint spot; // most recently sent spot position 1122 XPoint spot; // most recently sent spot position
1164 bool IMisRunning (); 1131 bool IMisRunning ();
1165 void IMSendSpot (); 1132 void IMSendSpot ();
1166 bool IM_get_IC (const char *modifiers); 1133 bool IM_get_IC (const char *modifiers);
1167 void IMSetPosition (); 1134 void IMSetPosition ();
1168#endif 1135#endif
1169
1170 void resize_scrollbar ();
1171 1136
1172 // command.C 1137 // command.C
1173 void key_press (XKeyEvent &ev); 1138 void key_press (XKeyEvent &ev);
1174 void key_release (XKeyEvent &ev); 1139 void key_release (XKeyEvent &ev);
1175 unsigned int cmd_write (const char *str, unsigned int count); 1140 unsigned int cmd_write (const char *str, unsigned int count);
1204 int privcases (int mode, unsigned long bit); 1169 int privcases (int mode, unsigned long bit);
1205 void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); 1170 void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg);
1206 void process_sgr_mode (unsigned int nargs, const int *arg); 1171 void process_sgr_mode (unsigned int nargs, const int *arg);
1207 void process_graphics (); 1172 void process_graphics ();
1208 // init.C 1173 // init.C
1174 bool init_vars ();
1175 void init_secondary ();
1176 const char **init_resources (int argc, const char *const *argv);
1177 void init_env ();
1178 void set_locale (const char *locale);
1179 void init_xlocale ();
1180 void init_command (const char *const *argv);
1181 void run_command (const char *const *argv);
1182 int run_child (const char *const *argv);
1183 void color_aliases (int idx);
1184 void create_windows (int argc, const char *const *argv);
1209 void Get_Colours (); 1185 void Get_Colours ();
1210 void get_ourmods (); 1186 void get_ourmods ();
1211 // main.C 1187 // main.C
1188 void tt_winch ();
1189 rxvt_term ();
1190 ~rxvt_term ();
1191 void destroy ();
1192 void emergency_cleanup ();
1193 bool init (int argc, const char *const *argv, stringvec *envv);
1194 void recolour_cursor ();
1195 void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent);
1196 void window_calc (unsigned int newwidth, unsigned int newheight);
1212 bool set_fonts (); 1197 bool set_fonts ();
1213 void set_string_property (Atom prop, const char *str, int len = -1); 1198 void set_string_property (Atom prop, const char *str, int len = -1);
1214 void set_utf8_property (Atom prop, const char *str, int len = -1); 1199 void set_utf8_property (Atom prop, const char *str, int len = -1);
1215 void set_title (const char *str); 1200 void set_title (const char *str);
1216 void set_icon_name (const char *str); 1201 void set_icon_name (const char *str);
1299 priv_modes |= bit; 1284 priv_modes |= bit;
1300 else 1285 else
1301 priv_modes &= ~bit; 1286 priv_modes &= ~bit;
1302 } 1287 }
1303 1288
1289 // modifies first argument(!)
1290 void paste (char *data, unsigned int len) NOTHROW;
1304 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1291 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1305 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1292 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;
1306 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1293 int scr_scroll_text (int row1, int row2, int count) NOTHROW;
1307 void scr_reset (); 1294 void scr_reset ();
1308 void scr_release () NOTHROW; 1295 void scr_release () NOTHROW;
1315 void scr_backindex () NOTHROW; 1302 void scr_backindex () NOTHROW;
1316 void scr_forwardindex () NOTHROW; 1303 void scr_forwardindex () NOTHROW;
1317#endif 1304#endif
1318 void scr_touch (bool refresh) NOTHROW; 1305 void scr_touch (bool refresh) NOTHROW;
1319 void scr_expose (int x, int y, int width, int height, bool refresh) NOTHROW; 1306 void scr_expose (int x, int y, int width, int height, bool refresh) NOTHROW;
1320 rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE);
1321 void scr_recolour () NOTHROW; 1307 void scr_recolour () NOTHROW;
1322 void scr_remap_chars () NOTHROW; 1308 void scr_remap_chars () NOTHROW;
1323 void scr_remap_chars (line_t &l) NOTHROW; 1309 void scr_remap_chars (line_t &l) NOTHROW;
1324 1310
1325 enum cursor_mode { SAVE, RESTORE }; 1311 enum cursor_mode { SAVE, RESTORE };
1376 void selection_send (const XSelectionRequestEvent &rq) NOTHROW; 1362 void selection_send (const XSelectionRequestEvent &rq) NOTHROW;
1377 void selection_click (int clicks, int x, int y) NOTHROW; 1363 void selection_click (int clicks, int x, int y) NOTHROW;
1378 void selection_extend (int x, int y, int flag) NOTHROW; 1364 void selection_extend (int x, int y, int flag) NOTHROW;
1379 void selection_rotate (int x, int y) NOTHROW; 1365 void selection_rotate (int x, int y) NOTHROW;
1380 1366
1381 void pixel_position (int *x, int *y) NOTHROW;
1382
1383#if defined(NEXT_SCROLLBAR) 1367#if defined(NEXT_SCROLLBAR)
1384 // scrollbar-next.C 1368 // scrollbar-next.C
1385 Pixmap renderPixmap (const char *const *data, int width, int height); 1369 Pixmap renderPixmap (const char *const *data, int width, int height);
1386 void init_scrollbar_stuff (); 1370 void init_scrollbar_stuff ();
1387 void drawBevel (Drawable d, int x1, int y1, int w, int h); 1371 void drawBevel (Drawable d, int x1, int y1, int w, int h);
1402 // scrollbar-plain.C 1386 // scrollbar-plain.C
1403 int scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len); 1387 int scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len);
1404#endif 1388#endif
1405 1389
1406 // scrollbar.C 1390 // scrollbar.C
1391 void resize_scrollbar ();
1407 int scrollbar_mapping (int map); 1392 int scrollbar_mapping (int map);
1408 int scrollbar_show (int update); 1393 int scrollbar_show (int update);
1409 void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness); 1394 void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness);
1410 1395
1411 // xdefaults.C 1396 // xdefaults.C
1412 void get_options (int argc, const char *const *argv); 1397 void get_options (int argc, const char *const *argv);
1413 int parse_keysym (const char *str, const char *arg); 1398 int parse_keysym (const char *str, const char *arg);
1414 void get_xdefaults (FILE *stream, const char *name); 1399 const char *x_resource (const char *name);
1415 void extract_resources (); 1400 void extract_resources ();
1416}; 1401};
1417 1402
1418#endif /* _RXVT_H_ */ 1403#endif /* _RXVT_H_ */
1419 1404

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines