--- rxvt-unicode/src/rxvt.h 2006/01/17 06:06:42 1.213 +++ rxvt-unicode/src/rxvt.h 2006/01/19 23:14:39 1.226 @@ -108,7 +108,6 @@ void * rxvt_malloc (size_t size); void * rxvt_calloc (size_t number, size_t size); void * rxvt_realloc (void *ptr, size_t size); -void rxvt_privileges (rxvt_privaction action); // util.C char * rxvt_wcstombs (const wchar_t *str, int len = -1); @@ -174,6 +173,32 @@ } bgPixmap_t; #endif +struct rxvt_ptytty { + int pty; // pty file descriptor; connected to rxvt + int tty; // tty file descriptor; connected to child + + rxvt_ptytty () + : pty(-1), tty(-1) + { + } + + virtual ~rxvt_ptytty () + { + } + + virtual bool get () = 0; +#if UTMP_SUPPORT + virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0; +#endif + + void close_tty (); + bool make_controlling_tty (); + void set_utf8_mode (bool on); +}; + +rxvt_ptytty *rxvt_new_ptytty (); // create a new pty object +void rxvt_ptytty_server (); // start the ptytty server process + /* * the 'essential' information for reporting Mouse Events * pared down from XButtonEvent @@ -1124,8 +1149,7 @@ char *cmdbuf_ptr, *cmdbuf_endp; char cmdbuf_base[CBUFSIZ]; - rxvt_ptytty pty; - rxvt_session session; + rxvt_ptytty *pty; rxvt_salloc *talloc; // text line allocator rxvt_salloc *ralloc; // rend line allocator @@ -1166,6 +1190,7 @@ xevent_watcher scrollbar_ev; #endif + void child_cb (child_watcher &w, int status); child_watcher child_ev; void check_cb (check_watcher &w); check_watcher check_ev; void destroy_cb (time_watcher &w); time_watcher destroy_ev; void flush_cb (time_watcher &w); time_watcher flush_ev; @@ -1205,7 +1230,6 @@ rxvt_term (); ~rxvt_term (); - void child_exit (); // child has exited, usually destroys void destroy (); void emergency_cleanup (); @@ -1305,7 +1329,6 @@ void Get_Colours (); void get_ourmods (); // main.C - void privileged_utmp (rxvt_privaction action); bool set_fonts (); void set_string_property (Atom prop, const char *str, int len = -1); void set_utf8_property (Atom prop, const char *str, int len = -1); @@ -1408,8 +1431,10 @@ void scr_remap_chars (); void scr_remap_chars (line_t &l); + enum cursor_mode { SAVE, RESTORE }; + void scr_poweron (); - void scr_cursor (int mode); + void scr_cursor (cursor_mode mode); void scr_do_wrap (); int scr_change_screen (int scrn); void scr_color (unsigned int color, int fgbg); @@ -1446,7 +1471,7 @@ void selection_check (int check_more); void selection_paste (Window win, Atom prop, bool delete_prop); void selection_property (Window win, Atom prop); - void selection_request (Time tm, int x, int y); + void selection_request (Time tm, int selnum); int selection_request_other (Atom target, int selnum); void selection_clear (); void selection_make (Time tm);