ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/rxvt-unicode/src/rxvt.h
(Generate patch)

Comparing cvsroot/rxvt-unicode/src/rxvt.h (file contents):
Revision 1.212 by root, Tue Jan 17 05:47:42 2006 UTC vs.
Revision 1.223 by root, Thu Jan 19 16:22:13 2006 UTC

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
99enum rxvt_privaction { IGNORE = 'i', SAVE = 's', RESTORE = 'r' };//TODO
98 100
99/* 101/*
100 ***************************************************************************** 102 *****************************************************************************
101 * PROTOTYPES 103 * PROTOTYPES
102 ***************************************************************************** 104 *****************************************************************************
171typedef struct { 173typedef 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
179struct 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
198rxvt_ptytty *rxvt_new_ptytty (); // create a new pty object
199void 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 */
789# define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g)) 813# define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g))
790#else 814#else
791# define XPMClearArea(a, b, c, d, e, f, g) 815# define XPMClearArea(a, b, c, d, e, f, g)
792#endif 816#endif
793 817
794#ifdef UTMP_SUPPORT
795# if !defined(RXVT_UTMPX_FILE) || !defined(HAVE_STRUCT_UTMPX)
796# undef HAVE_UTMPX_H
797# undef HAVE_STRUCT_UTMPX
798# endif
799# if !defined(RXVT_UTMP_FILE) || !defined(HAVE_STRUCT_UTMP)
800# undef HAVE_UTMP_H
801# undef HAVE_STRUCT_UTMP
802# endif
803
804# ifdef HAVE_UTMPX_H
805# include <utmpx.h>
806# endif
807# ifdef HAVE_UTMP_H
808# include <utmp.h>
809# endif
810#endif
811
812#ifdef DEBUG_CMD 818#ifdef DEBUG_CMD
813# define D_CMD(x) fprintf x ; fputc('\n', stderr) 819# define D_CMD(x) fprintf x ; fputc('\n', stderr)
814#else 820#else
815# define D_CMD(x) 821# define D_CMD(x)
816#endif 822#endif
1098 const char *key_delete; 1104 const char *key_delete;
1099#endif 1105#endif
1100 struct mouse_event MEvent; 1106 struct mouse_event MEvent;
1101 XComposeStatus compose; 1107 XComposeStatus compose;
1102 ttymode_t tio; 1108 ttymode_t tio;
1103#ifdef UTMP_SUPPORT
1104# ifdef HAVE_STRUCT_UTMP
1105 struct utmp ut;
1106# endif
1107# ifdef HAVE_STRUCT_UTMPX
1108 struct utmpx utx;
1109# endif
1110# if (defined(HAVE_STRUCT_UTMP) && defined(HAVE_UTMP_PID)) || defined(HAVE_STRUCT_UTMPX)
1111 char ut_id[5];
1112# endif
1113 int utmp_pos;
1114#endif
1115 row_col_t oldcursor; 1109 row_col_t oldcursor;
1116#ifdef XPM_BACKGROUND 1110#ifdef XPM_BACKGROUND
1117 bgPixmap_t bgPixmap; 1111 bgPixmap_t bgPixmap;
1118 XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */ 1112 XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */
1119#endif 1113#endif
1152 const char *rs[NUM_RESOURCES]; 1146 const char *rs[NUM_RESOURCES];
1153 /* command input buffering */ 1147 /* command input buffering */
1154 char *cmdbuf_ptr, *cmdbuf_endp; 1148 char *cmdbuf_ptr, *cmdbuf_endp;
1155 char cmdbuf_base[CBUFSIZ]; 1149 char cmdbuf_base[CBUFSIZ];
1156 1150
1151 rxvt_ptytty *pty;
1152
1157 rxvt_salloc *talloc; // text line allocator 1153 rxvt_salloc *talloc; // text line allocator
1158 rxvt_salloc *ralloc; // rend line allocator 1154 rxvt_salloc *ralloc; // rend line allocator
1159 1155
1160 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
1161 1157
1191 xevent_watcher vt_ev; 1187 xevent_watcher vt_ev;
1192#ifdef HAVE_SCROLLBARS 1188#ifdef HAVE_SCROLLBARS
1193 xevent_watcher scrollbar_ev; 1189 xevent_watcher scrollbar_ev;
1194#endif 1190#endif
1195 1191
1192 void child_cb (child_watcher &w, int status); child_watcher child_ev;
1196 void check_cb (check_watcher &w); check_watcher check_ev; 1193 void check_cb (check_watcher &w); check_watcher check_ev;
1197 void destroy_cb (time_watcher &w); time_watcher destroy_ev; 1194 void destroy_cb (time_watcher &w); time_watcher destroy_ev;
1198 void flush_cb (time_watcher &w); time_watcher flush_ev; 1195 void flush_cb (time_watcher &w); time_watcher flush_ev;
1199 1196
1200 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;
1230 1227
1231 void tt_winch (); 1228 void tt_winch ();
1232 1229
1233 rxvt_term (); 1230 rxvt_term ();
1234 ~rxvt_term (); 1231 ~rxvt_term ();
1235 void child_exit (); // child has exited, usually destroys
1236 void destroy (); 1232 void destroy ();
1237 void emergency_cleanup (); 1233 void emergency_cleanup ();
1238 1234
1239 bool init (int argc, const char *const *argv); 1235 bool init (int argc, const char *const *argv);
1240 bool init_vars (); 1236 bool init_vars ();
1329 void process_sgr_mode (unsigned int nargs, const int *arg); 1325 void process_sgr_mode (unsigned int nargs, const int *arg);
1330 void process_graphics (); 1326 void process_graphics ();
1331 // init.C 1327 // init.C
1332 void Get_Colours (); 1328 void Get_Colours ();
1333 void get_ourmods (); 1329 void get_ourmods ();
1334 // logging.C
1335 void makeutent (const char *pty, const char *hostname);
1336 void cleanutent ();
1337 // main.C 1330 // main.C
1338 void privileged_utmp (rxvt_privaction action); 1331 void privileged_utmp (rxvt_privaction action);
1339 bool set_fonts (); 1332 bool set_fonts ();
1340 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);
1341 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);
1474 void scr_reverse_selection (); 1467 void scr_reverse_selection ();
1475 void scr_dump (int fd); 1468 void scr_dump (int fd);
1476 void selection_check (int check_more); 1469 void selection_check (int check_more);
1477 void selection_paste (Window win, Atom prop, bool delete_prop); 1470 void selection_paste (Window win, Atom prop, bool delete_prop);
1478 void selection_property (Window win, Atom prop); 1471 void selection_property (Window win, Atom prop);
1479 void selection_request (Time tm, int x, int y); 1472 void selection_request (Time tm);
1480 int selection_request_other (Atom target, int selnum); 1473 int selection_request_other (Atom target, int selnum);
1481 void selection_clear (); 1474 void selection_clear ();
1482 void selection_make (Time tm); 1475 void selection_make (Time tm);
1483 bool selection_grab (Time tm); 1476 bool selection_grab (Time tm);
1484 void selection_start_colrow (int col, int row); 1477 void selection_start_colrow (int col, int row);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines