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

Comparing rxvt-unicode/src/rxvt.h (file contents):
Revision 1.214 by ayin, Tue Jan 17 09:24:53 2006 UTC vs.
Revision 1.224 by root, Thu Jan 19 19:51:08 2006 UTC

37#include "rxvttoolkit.h" 37#include "rxvttoolkit.h"
38#include "iom.h" 38#include "iom.h"
39#include "salloc.h" 39#include "salloc.h"
40 40
41#include "rxvtperl.h" 41#include "rxvtperl.h"
42#include "logging.h"
43 42
44// try to avoid some macros to decrease code size, on some systems 43// try to avoid some macros to decrease code size, on some systems
45#if ENABLE_MINIMAL 44#if ENABLE_MINIMAL
46# define strcmp(a,b) (strcmp)(a,b) 45# define strcmp(a,b) (strcmp)(a,b)
47# define strlen(a) (strlen)(a) 46# define strlen(a) (strlen)(a)
107RETSIGTYPE rxvt_Exit_signal (int sig); 106RETSIGTYPE rxvt_Exit_signal (int sig);
108void rxvt_clean_exit (); 107void rxvt_clean_exit ();
109void * rxvt_malloc (size_t size); 108void * rxvt_malloc (size_t size);
110void * rxvt_calloc (size_t number, size_t size); 109void * rxvt_calloc (size_t number, size_t size);
111void * rxvt_realloc (void *ptr, size_t size); 110void * rxvt_realloc (void *ptr, size_t size);
112void rxvt_privileges (rxvt_privaction action);
113 111
114// util.C 112// util.C
115char * rxvt_wcstombs (const wchar_t *str, int len = -1); 113char * rxvt_wcstombs (const wchar_t *str, int len = -1);
116wchar_t * rxvt_mbstowcs (const char *str, int len = -1); 114wchar_t * rxvt_mbstowcs (const char *str, int len = -1);
117char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); 115char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1);
172typedef struct { 170typedef struct {
173 short w, h, x, y; 171 short w, h, x, y;
174 Pixmap pixmap; 172 Pixmap pixmap;
175} bgPixmap_t; 173} bgPixmap_t;
176#endif 174#endif
175
176struct rxvt_ptytty {
177 int pty; // pty file descriptor; connected to rxvt
178 int tty; // tty file descriptor; connected to child
179
180 virtual ~rxvt_ptytty ()
181 {
182 //
183 }
184
185 virtual bool get () = 0;
186#if UTMP_SUPPORT
187 virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0;
188#endif
189
190 void close_tty ();
191 bool make_controlling_tty ();
192 void set_utf8_mode (bool on);
193};
194
195rxvt_ptytty *rxvt_new_ptytty (); // create a new pty object
196void rxvt_ptytty_server (); // start the ptytty server process
177 197
178/* 198/*
179 * the 'essential' information for reporting Mouse Events 199 * the 'essential' information for reporting Mouse Events
180 * pared down from XButtonEvent 200 * pared down from XButtonEvent
181 */ 201 */
1123 const char *rs[NUM_RESOURCES]; 1143 const char *rs[NUM_RESOURCES];
1124 /* command input buffering */ 1144 /* command input buffering */
1125 char *cmdbuf_ptr, *cmdbuf_endp; 1145 char *cmdbuf_ptr, *cmdbuf_endp;
1126 char cmdbuf_base[CBUFSIZ]; 1146 char cmdbuf_base[CBUFSIZ];
1127 1147
1128 rxvt_ptytty pty; 1148 rxvt_ptytty *pty;
1129 rxvt_session session;
1130 1149
1131 rxvt_salloc *talloc; // text line allocator 1150 rxvt_salloc *talloc; // text line allocator
1132 rxvt_salloc *ralloc; // rend line allocator 1151 rxvt_salloc *ralloc; // rend line allocator
1133 1152
1134 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's 1153 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's
1165 xevent_watcher vt_ev; 1184 xevent_watcher vt_ev;
1166#ifdef HAVE_SCROLLBARS 1185#ifdef HAVE_SCROLLBARS
1167 xevent_watcher scrollbar_ev; 1186 xevent_watcher scrollbar_ev;
1168#endif 1187#endif
1169 1188
1189 void child_cb (child_watcher &w, int status); child_watcher child_ev;
1170 void check_cb (check_watcher &w); check_watcher check_ev; 1190 void check_cb (check_watcher &w); check_watcher check_ev;
1171 void destroy_cb (time_watcher &w); time_watcher destroy_ev; 1191 void destroy_cb (time_watcher &w); time_watcher destroy_ev;
1172 void flush_cb (time_watcher &w); time_watcher flush_ev; 1192 void flush_cb (time_watcher &w); time_watcher flush_ev;
1173 1193
1174 void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; 1194 void pty_cb (io_watcher &w, short revents); io_watcher pty_ev;
1204 1224
1205 void tt_winch (); 1225 void tt_winch ();
1206 1226
1207 rxvt_term (); 1227 rxvt_term ();
1208 ~rxvt_term (); 1228 ~rxvt_term ();
1209 void child_exit (); // child has exited, usually destroys
1210 void destroy (); 1229 void destroy ();
1211 void emergency_cleanup (); 1230 void emergency_cleanup ();
1212 1231
1213 bool init (int argc, const char *const *argv); 1232 bool init (int argc, const char *const *argv);
1214 bool init_vars (); 1233 bool init_vars ();
1304 void process_graphics (); 1323 void process_graphics ();
1305 // init.C 1324 // init.C
1306 void Get_Colours (); 1325 void Get_Colours ();
1307 void get_ourmods (); 1326 void get_ourmods ();
1308 // main.C 1327 // main.C
1309 void privileged_utmp (rxvt_privaction action);
1310 bool set_fonts (); 1328 bool set_fonts ();
1311 void set_string_property (Atom prop, const char *str, int len = -1); 1329 void set_string_property (Atom prop, const char *str, int len = -1);
1312 void set_utf8_property (Atom prop, const char *str, int len = -1); 1330 void set_utf8_property (Atom prop, const char *str, int len = -1);
1313 void set_title (const char *str); 1331 void set_title (const char *str);
1314 void set_icon_name (const char *str); 1332 void set_icon_name (const char *str);
1407 rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE); 1425 rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE);
1408 void scr_recolour (); 1426 void scr_recolour ();
1409 void scr_remap_chars (); 1427 void scr_remap_chars ();
1410 void scr_remap_chars (line_t &l); 1428 void scr_remap_chars (line_t &l);
1411 1429
1430 enum cursor_mode { SAVE, RESTORE };
1431
1412 void scr_poweron (); 1432 void scr_poweron ();
1413 void scr_cursor (int mode); 1433 void scr_cursor (cursor_mode mode);
1414 void scr_do_wrap (); 1434 void scr_do_wrap ();
1415 int scr_change_screen (int scrn); 1435 int scr_change_screen (int scrn);
1416 void scr_color (unsigned int color, int fgbg); 1436 void scr_color (unsigned int color, int fgbg);
1417 void scr_rendition (int set, int style); 1437 void scr_rendition (int set, int style);
1418 void scr_add_lines (const wchar_t *str, int len, int minlines = 0); 1438 void scr_add_lines (const wchar_t *str, int len, int minlines = 0);
1445 void scr_reverse_selection (); 1465 void scr_reverse_selection ();
1446 void scr_dump (int fd); 1466 void scr_dump (int fd);
1447 void selection_check (int check_more); 1467 void selection_check (int check_more);
1448 void selection_paste (Window win, Atom prop, bool delete_prop); 1468 void selection_paste (Window win, Atom prop, bool delete_prop);
1449 void selection_property (Window win, Atom prop); 1469 void selection_property (Window win, Atom prop);
1450 void selection_request (Time tm, int x, int y); 1470 void selection_request (Time tm);
1451 int selection_request_other (Atom target, int selnum); 1471 int selection_request_other (Atom target, int selnum);
1452 void selection_clear (); 1472 void selection_clear ();
1453 void selection_make (Time tm); 1473 void selection_make (Time tm);
1454 bool selection_grab (Time tm); 1474 bool selection_grab (Time tm);
1455 void selection_start_colrow (int col, int row); 1475 void selection_start_colrow (int col, int row);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines