… | |
… | |
93 | #ifndef STDIN_FILENO |
93 | #ifndef STDIN_FILENO |
94 | # define STDIN_FILENO 0 |
94 | # define STDIN_FILENO 0 |
95 | # define STDOUT_FILENO 1 |
95 | # define STDOUT_FILENO 1 |
96 | # define STDERR_FILENO 2 |
96 | # define STDERR_FILENO 2 |
97 | #endif |
97 | #endif |
|
|
98 | |
|
|
99 | enum rxvt_privaction { IGNORE = 'i', SAVE = 's', RESTORE = 'r' };//TODO |
98 | |
100 | |
99 | /* |
101 | /* |
100 | ***************************************************************************** |
102 | ***************************************************************************** |
101 | * PROTOTYPES |
103 | * PROTOTYPES |
102 | ***************************************************************************** |
104 | ***************************************************************************** |
… | |
… | |
171 | typedef struct { |
173 | typedef struct { |
172 | short w, h, x, y; |
174 | short w, h, x, y; |
173 | Pixmap pixmap; |
175 | Pixmap pixmap; |
174 | } bgPixmap_t; |
176 | } bgPixmap_t; |
175 | #endif |
177 | #endif |
|
|
178 | |
|
|
179 | struct rxvt_ptytty { |
|
|
180 | int pty; // pty file descriptor; connected to rxvt |
|
|
181 | int tty; // tty file descriptor; connected to child |
|
|
182 | |
|
|
183 | virtual ~rxvt_ptytty () |
|
|
184 | { |
|
|
185 | // |
|
|
186 | } |
|
|
187 | |
|
|
188 | virtual bool get () = 0; |
|
|
189 | #if UTMP_SUPPORT |
|
|
190 | virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0; |
|
|
191 | #endif |
|
|
192 | |
|
|
193 | void close_tty (); |
|
|
194 | bool make_controlling_tty (); |
|
|
195 | void set_utf8_mode (bool on); |
|
|
196 | }; |
|
|
197 | |
|
|
198 | rxvt_ptytty *rxvt_new_ptytty (); // create a new pty object |
|
|
199 | void rxvt_ptytty_server (); // start the ptytty server process |
176 | |
200 | |
177 | /* |
201 | /* |
178 | * the 'essential' information for reporting Mouse Events |
202 | * the 'essential' information for reporting Mouse Events |
179 | * pared down from XButtonEvent |
203 | * pared down from XButtonEvent |
180 | */ |
204 | */ |
… | |
… | |
1122 | const char *rs[NUM_RESOURCES]; |
1146 | const char *rs[NUM_RESOURCES]; |
1123 | /* command input buffering */ |
1147 | /* command input buffering */ |
1124 | char *cmdbuf_ptr, *cmdbuf_endp; |
1148 | char *cmdbuf_ptr, *cmdbuf_endp; |
1125 | char cmdbuf_base[CBUFSIZ]; |
1149 | char cmdbuf_base[CBUFSIZ]; |
1126 | |
1150 | |
1127 | rxvt_ptytty pty; |
1151 | rxvt_ptytty *pty; |
1128 | |
1152 | |
1129 | rxvt_salloc *talloc; // text line allocator |
1153 | rxvt_salloc *talloc; // text line allocator |
1130 | rxvt_salloc *ralloc; // rend line allocator |
1154 | rxvt_salloc *ralloc; // rend line allocator |
1131 | |
1155 | |
1132 | static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's |
1156 | static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's |
… | |
… | |
1163 | xevent_watcher vt_ev; |
1187 | xevent_watcher vt_ev; |
1164 | #ifdef HAVE_SCROLLBARS |
1188 | #ifdef HAVE_SCROLLBARS |
1165 | xevent_watcher scrollbar_ev; |
1189 | xevent_watcher scrollbar_ev; |
1166 | #endif |
1190 | #endif |
1167 | |
1191 | |
|
|
1192 | void child_cb (child_watcher &w, int status); child_watcher child_ev; |
1168 | void check_cb (check_watcher &w); check_watcher check_ev; |
1193 | void check_cb (check_watcher &w); check_watcher check_ev; |
1169 | void destroy_cb (time_watcher &w); time_watcher destroy_ev; |
1194 | void destroy_cb (time_watcher &w); time_watcher destroy_ev; |
1170 | void flush_cb (time_watcher &w); time_watcher flush_ev; |
1195 | void flush_cb (time_watcher &w); time_watcher flush_ev; |
1171 | |
1196 | |
1172 | void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; |
1197 | void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; |
… | |
… | |
1202 | |
1227 | |
1203 | void tt_winch (); |
1228 | void tt_winch (); |
1204 | |
1229 | |
1205 | rxvt_term (); |
1230 | rxvt_term (); |
1206 | ~rxvt_term (); |
1231 | ~rxvt_term (); |
1207 | void child_exit (); // child has exited, usually destroys |
|
|
1208 | void destroy (); |
1232 | void destroy (); |
1209 | void emergency_cleanup (); |
1233 | void emergency_cleanup (); |
1210 | |
1234 | |
1211 | bool init (int argc, const char *const *argv); |
1235 | bool init (int argc, const char *const *argv); |
1212 | bool init_vars (); |
1236 | bool init_vars (); |
… | |
… | |
1443 | void scr_reverse_selection (); |
1467 | void scr_reverse_selection (); |
1444 | void scr_dump (int fd); |
1468 | void scr_dump (int fd); |
1445 | void selection_check (int check_more); |
1469 | void selection_check (int check_more); |
1446 | void selection_paste (Window win, Atom prop, bool delete_prop); |
1470 | void selection_paste (Window win, Atom prop, bool delete_prop); |
1447 | void selection_property (Window win, Atom prop); |
1471 | void selection_property (Window win, Atom prop); |
1448 | void selection_request (Time tm, int x, int y); |
1472 | void selection_request (Time tm); |
1449 | int selection_request_other (Atom target, int selnum); |
1473 | int selection_request_other (Atom target, int selnum); |
1450 | void selection_clear (); |
1474 | void selection_clear (); |
1451 | void selection_make (Time tm); |
1475 | void selection_make (Time tm); |
1452 | bool selection_grab (Time tm); |
1476 | bool selection_grab (Time tm); |
1453 | void selection_start_colrow (int col, int row); |
1477 | void selection_start_colrow (int col, int row); |