… | |
… | |
106 | RETSIGTYPE rxvt_Exit_signal (int sig); |
106 | RETSIGTYPE rxvt_Exit_signal (int sig); |
107 | void rxvt_clean_exit (); |
107 | void rxvt_clean_exit (); |
108 | void * rxvt_malloc (size_t size); |
108 | void * rxvt_malloc (size_t size); |
109 | void * rxvt_calloc (size_t number, size_t size); |
109 | void * rxvt_calloc (size_t number, size_t size); |
110 | void * rxvt_realloc (void *ptr, size_t size); |
110 | void * rxvt_realloc (void *ptr, size_t size); |
111 | void rxvt_privileges (rxvt_privaction action); |
|
|
112 | |
111 | |
113 | // util.C |
112 | // util.C |
114 | char * rxvt_wcstombs (const wchar_t *str, int len = -1); |
113 | char * rxvt_wcstombs (const wchar_t *str, int len = -1); |
115 | wchar_t * rxvt_mbstowcs (const char *str, int len = -1); |
114 | wchar_t * rxvt_mbstowcs (const char *str, int len = -1); |
116 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
115 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
… | |
… | |
171 | typedef struct { |
170 | typedef struct { |
172 | short w, h, x, y; |
171 | short w, h, x, y; |
173 | Pixmap pixmap; |
172 | Pixmap pixmap; |
174 | } bgPixmap_t; |
173 | } bgPixmap_t; |
175 | #endif |
174 | #endif |
|
|
175 | |
|
|
176 | struct rxvt_ptytty { |
|
|
177 | int pty; // pty file descriptor; connected to rxvt |
|
|
178 | int tty; // tty file descriptor; connected to child |
|
|
179 | |
|
|
180 | rxvt_ptytty () |
|
|
181 | : pty(-1), tty(-1) |
|
|
182 | { |
|
|
183 | } |
|
|
184 | |
|
|
185 | virtual ~rxvt_ptytty () |
|
|
186 | { |
|
|
187 | } |
|
|
188 | |
|
|
189 | virtual bool get () = 0; |
|
|
190 | #if UTMP_SUPPORT |
|
|
191 | virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0; |
|
|
192 | #endif |
|
|
193 | |
|
|
194 | void close_tty (); |
|
|
195 | bool make_controlling_tty (); |
|
|
196 | void set_utf8_mode (bool on); |
|
|
197 | }; |
|
|
198 | |
|
|
199 | rxvt_ptytty *rxvt_new_ptytty (); // create a new pty object |
|
|
200 | void rxvt_ptytty_server (); // start the ptytty server process |
176 | |
201 | |
177 | /* |
202 | /* |
178 | * the 'essential' information for reporting Mouse Events |
203 | * the 'essential' information for reporting Mouse Events |
179 | * pared down from XButtonEvent |
204 | * pared down from XButtonEvent |
180 | */ |
205 | */ |
… | |
… | |
1122 | const char *rs[NUM_RESOURCES]; |
1147 | const char *rs[NUM_RESOURCES]; |
1123 | /* command input buffering */ |
1148 | /* command input buffering */ |
1124 | char *cmdbuf_ptr, *cmdbuf_endp; |
1149 | char *cmdbuf_ptr, *cmdbuf_endp; |
1125 | char cmdbuf_base[CBUFSIZ]; |
1150 | char cmdbuf_base[CBUFSIZ]; |
1126 | |
1151 | |
1127 | rxvt_ptytty pty; |
1152 | rxvt_ptytty *pty; |
1128 | rxvt_session session; |
|
|
1129 | |
1153 | |
1130 | rxvt_salloc *talloc; // text line allocator |
1154 | rxvt_salloc *talloc; // text line allocator |
1131 | rxvt_salloc *ralloc; // rend line allocator |
1155 | rxvt_salloc *ralloc; // rend line allocator |
1132 | |
1156 | |
1133 | static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's |
1157 | static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's |
… | |
… | |
1164 | xevent_watcher vt_ev; |
1188 | xevent_watcher vt_ev; |
1165 | #ifdef HAVE_SCROLLBARS |
1189 | #ifdef HAVE_SCROLLBARS |
1166 | xevent_watcher scrollbar_ev; |
1190 | xevent_watcher scrollbar_ev; |
1167 | #endif |
1191 | #endif |
1168 | |
1192 | |
|
|
1193 | void child_cb (child_watcher &w, int status); child_watcher child_ev; |
1169 | void check_cb (check_watcher &w); check_watcher check_ev; |
1194 | void check_cb (check_watcher &w); check_watcher check_ev; |
1170 | void destroy_cb (time_watcher &w); time_watcher destroy_ev; |
1195 | void destroy_cb (time_watcher &w); time_watcher destroy_ev; |
1171 | void flush_cb (time_watcher &w); time_watcher flush_ev; |
1196 | void flush_cb (time_watcher &w); time_watcher flush_ev; |
1172 | |
1197 | |
1173 | void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; |
1198 | void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; |
… | |
… | |
1203 | |
1228 | |
1204 | void tt_winch (); |
1229 | void tt_winch (); |
1205 | |
1230 | |
1206 | rxvt_term (); |
1231 | rxvt_term (); |
1207 | ~rxvt_term (); |
1232 | ~rxvt_term (); |
1208 | void child_exit (); // child has exited, usually destroys |
|
|
1209 | void destroy (); |
1233 | void destroy (); |
1210 | void emergency_cleanup (); |
1234 | void emergency_cleanup (); |
1211 | |
1235 | |
1212 | bool init (int argc, const char *const *argv); |
1236 | bool init (int argc, const char *const *argv); |
1213 | bool init_vars (); |
1237 | bool init_vars (); |
… | |
… | |
1303 | void process_graphics (); |
1327 | void process_graphics (); |
1304 | // init.C |
1328 | // init.C |
1305 | void Get_Colours (); |
1329 | void Get_Colours (); |
1306 | void get_ourmods (); |
1330 | void get_ourmods (); |
1307 | // main.C |
1331 | // main.C |
1308 | void privileged_utmp (rxvt_privaction action); |
|
|
1309 | bool set_fonts (); |
1332 | bool set_fonts (); |
1310 | void set_string_property (Atom prop, const char *str, int len = -1); |
1333 | void set_string_property (Atom prop, const char *str, int len = -1); |
1311 | void set_utf8_property (Atom prop, const char *str, int len = -1); |
1334 | void set_utf8_property (Atom prop, const char *str, int len = -1); |
1312 | void set_title (const char *str); |
1335 | void set_title (const char *str); |
1313 | void set_icon_name (const char *str); |
1336 | void set_icon_name (const char *str); |
… | |
… | |
1406 | rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE); |
1429 | rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE); |
1407 | void scr_recolour (); |
1430 | void scr_recolour (); |
1408 | void scr_remap_chars (); |
1431 | void scr_remap_chars (); |
1409 | void scr_remap_chars (line_t &l); |
1432 | void scr_remap_chars (line_t &l); |
1410 | |
1433 | |
|
|
1434 | enum cursor_mode { SAVE, RESTORE }; |
|
|
1435 | |
1411 | void scr_poweron (); |
1436 | void scr_poweron (); |
1412 | void scr_cursor (int mode); |
1437 | void scr_cursor (cursor_mode mode); |
1413 | void scr_do_wrap (); |
1438 | void scr_do_wrap (); |
1414 | int scr_change_screen (int scrn); |
1439 | int scr_change_screen (int scrn); |
1415 | void scr_color (unsigned int color, int fgbg); |
1440 | void scr_color (unsigned int color, int fgbg); |
1416 | void scr_rendition (int set, int style); |
1441 | void scr_rendition (int set, int style); |
1417 | void scr_add_lines (const wchar_t *str, int len, int minlines = 0); |
1442 | void scr_add_lines (const wchar_t *str, int len, int minlines = 0); |
… | |
… | |
1444 | void scr_reverse_selection (); |
1469 | void scr_reverse_selection (); |
1445 | void scr_dump (int fd); |
1470 | void scr_dump (int fd); |
1446 | void selection_check (int check_more); |
1471 | void selection_check (int check_more); |
1447 | void selection_paste (Window win, Atom prop, bool delete_prop); |
1472 | void selection_paste (Window win, Atom prop, bool delete_prop); |
1448 | void selection_property (Window win, Atom prop); |
1473 | void selection_property (Window win, Atom prop); |
1449 | void selection_request (Time tm, int x, int y); |
1474 | void selection_request (Time tm, int selnum); |
1450 | int selection_request_other (Atom target, int selnum); |
1475 | int selection_request_other (Atom target, int selnum); |
1451 | void selection_clear (); |
1476 | void selection_clear (); |
1452 | void selection_make (Time tm); |
1477 | void selection_make (Time tm); |
1453 | bool selection_grab (Time tm); |
1478 | bool selection_grab (Time tm); |
1454 | void selection_start_colrow (int col, int row); |
1479 | void selection_start_colrow (int col, int row); |