… | |
… | |
110 | |
110 | |
111 | #ifndef STDIN_FILENO |
111 | #ifndef STDIN_FILENO |
112 | # define STDIN_FILENO 0 |
112 | # define STDIN_FILENO 0 |
113 | # define STDOUT_FILENO 1 |
113 | # define STDOUT_FILENO 1 |
114 | # define STDERR_FILENO 2 |
114 | # define STDERR_FILENO 2 |
115 | #endif |
|
|
116 | |
|
|
117 | #if !defined (EACCESS) && defined(EAGAIN) |
|
|
118 | # define EACCESS EAGAIN |
|
|
119 | #endif |
115 | #endif |
120 | |
116 | |
121 | #ifndef EXIT_SUCCESS /* missing from <stdlib.h> */ |
117 | #ifndef EXIT_SUCCESS /* missing from <stdlib.h> */ |
122 | # define EXIT_SUCCESS 0 /* exit function success */ |
118 | # define EXIT_SUCCESS 0 /* exit function success */ |
123 | # define EXIT_FAILURE 1 /* exit function failure */ |
119 | # define EXIT_FAILURE 1 /* exit function failure */ |
… | |
… | |
151 | char * rxvt_wcstombs (const wchar_t *str, int len = -1); |
147 | char * rxvt_wcstombs (const wchar_t *str, int len = -1); |
152 | wchar_t * rxvt_mbstowcs (const char *str, int len = -1); |
148 | wchar_t * rxvt_mbstowcs (const char *str, int len = -1); |
153 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
149 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
154 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
150 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
155 | |
151 | |
156 | char * rxvt_basename (const char *str) NOTHROW; |
152 | const char * rxvt_basename (const char *str) NOTHROW; |
157 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
153 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
158 | void rxvt_log (const char *fmt,...) NOTHROW; |
154 | void rxvt_log (const char *fmt,...) NOTHROW; |
159 | void rxvt_warn (const char *fmt,...) NOTHROW; |
155 | void rxvt_warn (const char *fmt,...) NOTHROW; |
160 | void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; |
156 | void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; |
161 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
157 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
… | |
… | |
340 | #define RS_styleShift 14 |
336 | #define RS_styleShift 14 |
341 | |
337 | |
342 | #define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline) |
338 | #define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline) |
343 | #define RS_attrMask (RS_baseattrMask | RS_fontMask) |
339 | #define RS_attrMask (RS_baseattrMask | RS_fontMask) |
344 | |
340 | |
345 | #define RS_fontCount 127 // not 127 or 256, see rxvtfont.h |
341 | #define RS_fontCount rxvt_fontset::fontCount |
346 | #define RS_fontMask 0xff000000UL // plenty(?) of fonts, includes RS_Careful |
342 | #define RS_fontMask 0xff000000UL // plenty(?) of fonts, includes RS_Careful |
347 | #define RS_fontShift 24 |
343 | #define RS_fontShift 24 |
348 | |
344 | |
349 | #define DEFAULT_RSTYLE (RS_None | Color_fg | (Color_bg << Color_Bits)) |
345 | #define DEFAULT_RSTYLE (RS_None | Color_fg | (Color_bg << Color_Bits)) |
350 | #define OVERLAY_RSTYLE (RS_None | Color_Black | (Color_Yellow << Color_Bits)) |
346 | #define OVERLAY_RSTYLE (RS_None | Color_Black | (Color_Yellow << Color_Bits)) |
… | |
… | |
847 | int focus; /* window has focus */ |
843 | int focus; /* window has focus */ |
848 | int mapped; /* window state mapped? */ |
844 | int mapped; /* window state mapped? */ |
849 | int int_bwidth; /* internal border width */ |
845 | int int_bwidth; /* internal border width */ |
850 | int ext_bwidth; /* external border width */ |
846 | int ext_bwidth; /* external border width */ |
851 | int lineSpace; /* number of extra pixels between rows */ |
847 | int lineSpace; /* number of extra pixels between rows */ |
|
|
848 | int letterSpace; /* number of extra pixels between columns */ |
852 | int saveLines; /* number of lines that fit in scrollback */ |
849 | int saveLines; /* number of lines that fit in scrollback */ |
853 | int total_rows; /* total number of rows in this terminal */ |
850 | int total_rows; /* total number of rows in this terminal */ |
854 | int term_start; /* term lines start here */ |
851 | int term_start; /* term lines start here */ |
855 | int view_start; /* scrollback view starts here */ |
852 | int view_start; /* scrollback view starts here */ |
856 | int top_row; /* topmost row index of scrollback */ |
853 | int top_row; /* topmost row index of scrollback */ |
… | |
… | |
911 | selection_op_t op; /* current operation */ |
908 | selection_op_t op; /* current operation */ |
912 | bool rect; /* rectangular selection? */ |
909 | bool rect; /* rectangular selection? */ |
913 | row_col_t beg; /* beginning of selection <= mark */ |
910 | row_col_t beg; /* beginning of selection <= mark */ |
914 | row_col_t mark; /* point of initial click <= end */ |
911 | row_col_t mark; /* point of initial click <= end */ |
915 | row_col_t end; /* one character past end point */ |
912 | row_col_t end; /* one character past end point */ |
|
|
913 | wchar_t *clip_text; /* text copied to the clipboard */ |
|
|
914 | unsigned int clip_len; /* length of clipboard text */ |
916 | }; |
915 | }; |
917 | |
916 | |
918 | /* ------------------------------------------------------------------------- */ |
917 | /* ------------------------------------------------------------------------- */ |
919 | |
918 | |
920 | /* screen_t flags */ |
919 | /* screen_t flags */ |
… | |
… | |
975 | |
974 | |
976 | unsigned char want_refresh:1, |
975 | unsigned char want_refresh:1, |
977 | current_screen:1, /* primary or secondary */ |
976 | current_screen:1, /* primary or secondary */ |
978 | num_scr_allow:1, |
977 | num_scr_allow:1, |
979 | bypass_keystate:1, |
978 | bypass_keystate:1, |
980 | #ifdef ENABLE_FRILLS |
979 | #if ENABLE_FRILLS |
981 | urgency_hint:1, |
980 | urgency_hint:1, |
982 | #endif |
981 | #endif |
983 | #ifdef CURSOR_BLINK |
982 | #if CURSOR_BLINK |
984 | hidden_cursor:1, |
983 | hidden_cursor:1, |
985 | #endif |
984 | #endif |
986 | #ifdef TEXT_BLINK |
985 | #if TEXT_BLINK |
987 | hidden_text:1, |
986 | hidden_text:1, |
988 | #endif |
987 | #endif |
989 | #ifdef POINTER_BLANK |
988 | #if POINTER_BLANK |
990 | hidden_pointer:1, |
989 | hidden_pointer:1, |
991 | #endif |
990 | #endif |
992 | enc_utf8:1, /* wether locale uses utf-8 */ |
991 | enc_utf8:1, /* wether locale uses utf-8 */ |
993 | seen_input:1, /* wether we have seen some program output yet */ |
992 | seen_input:1, /* wether we have seen some program output yet */ |
994 | seen_resize:1, /* wether we had a resize event */ |
993 | seen_resize:1, /* wether we had a resize event */ |
… | |
… | |
1003 | /* ---------- */ |
1002 | /* ---------- */ |
1004 | bool rvideo_state, rvideo_mode; |
1003 | bool rvideo_state, rvideo_mode; |
1005 | #ifndef NO_BELL |
1004 | #ifndef NO_BELL |
1006 | bool rvideo_bell; |
1005 | bool rvideo_bell; |
1007 | #endif |
1006 | #endif |
1008 | int num_scr; /* screen: number lines scrolled */ |
1007 | int num_scr; /* screen: number of lines scrolled */ |
1009 | int prev_ncol, /* screen: previous number of columns */ |
1008 | int prev_ncol, /* screen: previous number of columns */ |
1010 | prev_nrow; /* screen: previous number of rows */ |
1009 | prev_nrow; /* screen: previous number of rows */ |
1011 | /* ---------- */ |
1010 | /* ---------- */ |
1012 | rend_t rstyle; |
1011 | rend_t rstyle; |
1013 | /* ---------- */ |
1012 | /* ---------- */ |
… | |
… | |
1043 | SavedModes; |
1042 | SavedModes; |
1044 | /* ---------- */ |
1043 | /* ---------- */ |
1045 | Atom *xa; |
1044 | Atom *xa; |
1046 | /* ---------- */ |
1045 | /* ---------- */ |
1047 | Time selection_time, |
1046 | Time selection_time, |
1048 | selection_request_time; |
1047 | selection_request_time, |
|
|
1048 | clipboard_time; |
1049 | pid_t cmd_pid; /* process id of child */ |
1049 | pid_t cmd_pid; /* process id of child */ |
1050 | char * incr_buf; |
1050 | char * incr_buf; |
1051 | size_t incr_buf_size, incr_buf_fill; |
1051 | size_t incr_buf_size, incr_buf_fill; |
1052 | /* ---------- */ |
1052 | /* ---------- */ |
1053 | struct mouse_event MEvent; |
1053 | struct mouse_event MEvent; |
… | |
… | |
1234 | void mouse_report (XButtonEvent &ev); |
1234 | void mouse_report (XButtonEvent &ev); |
1235 | void button_press (XButtonEvent &ev); |
1235 | void button_press (XButtonEvent &ev); |
1236 | void button_release (XButtonEvent &ev); |
1236 | void button_release (XButtonEvent &ev); |
1237 | void focus_in (); |
1237 | void focus_in (); |
1238 | void focus_out (); |
1238 | void focus_out (); |
|
|
1239 | #if ENABLE_FRILLS |
1239 | void set_urgency (bool enable); |
1240 | void set_urgency (bool enable); |
|
|
1241 | #else |
|
|
1242 | void set_urgency (bool enable) { } |
|
|
1243 | #endif |
1240 | void update_fade_color (unsigned int idx); |
1244 | void update_fade_color (unsigned int idx); |
1241 | #ifdef PRINTPIPE |
1245 | #ifdef PRINTPIPE |
1242 | FILE *popen_printer (); |
1246 | FILE *popen_printer (); |
1243 | int pclose_printer (FILE *stream); |
1247 | int pclose_printer (FILE *stream); |
1244 | #endif |
1248 | #endif |
… | |
… | |
1250 | void process_window_ops (const int *args, unsigned int nargs); |
1254 | void process_window_ops (const int *args, unsigned int nargs); |
1251 | char *get_to_st (unicode_t &ends_how); |
1255 | char *get_to_st (unicode_t &ends_how); |
1252 | void process_dcs_seq (); |
1256 | void process_dcs_seq (); |
1253 | void process_osc_seq (); |
1257 | void process_osc_seq (); |
1254 | void process_color_seq (int report, int color, const char *str, char resp); |
1258 | void process_color_seq (int report, int color, const char *str, char resp); |
1255 | void process_xterm_seq (int op, const char *str, char resp); |
1259 | void process_xterm_seq (int op, char *str, char resp); |
1256 | int privcases (int mode, unsigned long bit); |
1260 | int privcases (int mode, unsigned long bit); |
1257 | void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); |
1261 | void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); |
1258 | void process_sgr_mode (unsigned int nargs, const int *arg); |
1262 | void process_sgr_mode (unsigned int nargs, const int *arg); |
1259 | void process_graphics (); |
1263 | void process_graphics (); |
1260 | // init.C |
1264 | // init.C |
… | |
… | |
1446 | void selection_check (int check_more) NOTHROW; |
1450 | void selection_check (int check_more) NOTHROW; |
1447 | void selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW; |
1451 | void selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW; |
1448 | void selection_property (Window win, Atom prop) NOTHROW; |
1452 | void selection_property (Window win, Atom prop) NOTHROW; |
1449 | void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW; |
1453 | void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW; |
1450 | int selection_request_other (Atom target, int selnum) NOTHROW; |
1454 | int selection_request_other (Atom target, int selnum) NOTHROW; |
1451 | void selection_clear () NOTHROW; |
1455 | void selection_clear (bool clipboard = false) NOTHROW; |
|
|
1456 | void clipboard_copy (Time tm); |
1452 | void selection_make (Time tm); |
1457 | void selection_make (Time tm); |
1453 | bool selection_grab (Time tm) NOTHROW; |
1458 | bool selection_grab (Time tm, bool clipboard = false) NOTHROW; |
1454 | void selection_start_colrow (int col, int row) NOTHROW; |
1459 | void selection_start_colrow (int col, int row) NOTHROW; |
1455 | void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW; |
1460 | void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW; |
1456 | void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW; |
1461 | void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW; |
1457 | void selection_remove_trailing_spaces () NOTHROW; |
1462 | void selection_remove_trailing_spaces () NOTHROW; |
1458 | void selection_send (const XSelectionRequestEvent &rq) NOTHROW; |
1463 | void selection_send (const XSelectionRequestEvent &rq) NOTHROW; |