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.230 by root, Fri Jan 20 22:49:34 2006 UTC vs.
Revision 1.234 by root, Sun Jan 22 00:48:13 2006 UTC

35#include "encoding.h" 35#include "encoding.h"
36#include "rxvtfont.h" 36#include "rxvtfont.h"
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#include "libptytty.h"
40 41
41#include "rxvtperl.h" 42#include "rxvtperl.h"
42 43
43// try to avoid some macros to decrease code size, on some systems 44// try to avoid some macros to decrease code size, on some systems
44#if ENABLE_MINIMAL 45#if ENABLE_MINIMAL
141// misc.C 142// misc.C
142char * rxvt_wcstombs (const wchar_t *str, int len = -1); 143char * rxvt_wcstombs (const wchar_t *str, int len = -1);
143wchar_t * rxvt_mbstowcs (const char *str, int len = -1); 144wchar_t * rxvt_mbstowcs (const char *str, int len = -1);
144char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); 145char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1);
145wchar_t * rxvt_utf8towcs (const char *str, int len = -1); 146wchar_t * rxvt_utf8towcs (const char *str, int len = -1);
147char * rxvt_strdup_cpp (const char *str);
146 148
147#define rxvt_strdup(s) ((s) ? strdup(s) : 0) 149#define rxvt_strdup(s) ((s) ? strdup(s) : 0)
148 150
149char * rxvt_r_basename (const char *str) NOTHROW; 151char * rxvt_r_basename (const char *str) NOTHROW;
150void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; 152void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW;
158char * rxvt_Str_trim (char *str) NOTHROW; 160char * rxvt_Str_trim (char *str) NOTHROW;
159int rxvt_Str_escaped (char *str) NOTHROW; 161int rxvt_Str_escaped (char *str) NOTHROW;
160char ** rxvt_splitcommastring (const char *cs) NOTHROW; 162char ** rxvt_splitcommastring (const char *cs) NOTHROW;
161void rxvt_freecommastring (char **cs) NOTHROW; 163void rxvt_freecommastring (char **cs) NOTHROW;
162char * rxvt_File_find (const char *file, const char *ext, const char *path) NOTHROW; 164char * rxvt_File_find (const char *file, const char *ext, const char *path) NOTHROW;
163void rxvt_usleep (int usecs) NOTHROW;
164 165
165///////////////////////////////////////////////////////////////////////////// 166/////////////////////////////////////////////////////////////////////////////
166 167
167// temporarily replace the process environment 168// temporarily replace the process environment
168extern char **environ; 169extern char **environ;
200typedef struct { 201typedef struct {
201 short w, h, x, y; 202 short w, h, x, y;
202 Pixmap pixmap; 203 Pixmap pixmap;
203} bgPixmap_t; 204} bgPixmap_t;
204#endif 205#endif
205
206struct rxvt_ptytty {
207 int pty; // pty file descriptor; connected to rxvt
208 int tty; // tty file descriptor; connected to child
209
210 rxvt_ptytty ()
211 : pty(-1), tty(-1)
212 {
213 }
214
215 virtual ~rxvt_ptytty ()
216 {
217 }
218
219 virtual bool get () = 0;
220#if UTMP_SUPPORT
221 virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0;
222#endif
223
224 void close_tty ();
225 bool make_controlling_tty ();
226 void set_utf8_mode (bool on);
227};
228
229rxvt_ptytty *rxvt_new_ptytty (); // create a new pty object
230void rxvt_ptytty_server (); // start the ptytty server process
231 206
232/* 207/*
233 * the 'essential' information for reporting Mouse Events 208 * the 'essential' information for reporting Mouse Events
234 * pared down from XButtonEvent 209 * pared down from XButtonEvent
235 */ 210 */
1020#endif 995#endif
1021 scrollbar_align, 996 scrollbar_align,
1022 selection_wait, 997 selection_wait,
1023 selection_type; 998 selection_type;
1024/* ---------- */ 999/* ---------- */
1000 bool rvideo_state, rvideo_mode;
1001#ifndef NO_BELL
1025 short rvideo; 1002 bool rvideo_bell;
1003#endif
1026 int num_scr; /* screen: number lines scrolled */ 1004 int num_scr; /* screen: number lines scrolled */
1027 int prev_ncol, /* screen: previous number of columns */ 1005 int prev_ncol, /* screen: previous number of columns */
1028 prev_nrow; /* screen: previous number of rows */ 1006 prev_nrow; /* screen: previous number of rows */
1029/* ---------- */ 1007/* ---------- */
1030 rend_t rstyle; 1008 rend_t rstyle;
1150 const char *rs[NUM_RESOURCES]; 1128 const char *rs[NUM_RESOURCES];
1151 /* command input buffering */ 1129 /* command input buffering */
1152 char *cmdbuf_ptr, *cmdbuf_endp; 1130 char *cmdbuf_ptr, *cmdbuf_endp;
1153 char cmdbuf_base[CBUFSIZ]; 1131 char cmdbuf_base[CBUFSIZ];
1154 1132
1155 rxvt_ptytty *pty; 1133 ptytty *pty;
1156 1134
1157 rxvt_salloc *talloc; // text line allocator 1135 rxvt_salloc *talloc; // text line allocator
1158 rxvt_salloc *ralloc; // rend line allocator 1136 rxvt_salloc *ralloc; // rend line allocator
1159 1137
1160 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's 1138 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's
1195 1173
1196 void child_cb (child_watcher &w, int status); child_watcher child_ev; 1174 void child_cb (child_watcher &w, int status); child_watcher child_ev;
1197 void check_cb (check_watcher &w); check_watcher check_ev; 1175 void check_cb (check_watcher &w); check_watcher check_ev;
1198 void destroy_cb (time_watcher &w); time_watcher destroy_ev; 1176 void destroy_cb (time_watcher &w); time_watcher destroy_ev;
1199 void flush_cb (time_watcher &w); time_watcher flush_ev; 1177 void flush_cb (time_watcher &w); time_watcher flush_ev;
1200
1201 void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; 1178 void pty_cb (io_watcher &w, short revents); io_watcher pty_ev;
1202
1203 void incr_cb (time_watcher &w) NOTHROW; time_watcher incr_ev; 1179 void incr_cb (time_watcher &w) NOTHROW; time_watcher incr_ev;
1204 1180
1205#ifdef CURSOR_BLINK 1181#ifdef CURSOR_BLINK
1206 void cursor_blink_cb (time_watcher &w); time_watcher cursor_blink_ev; 1182 void cursor_blink_cb (time_watcher &w); time_watcher cursor_blink_ev;
1207#endif 1183#endif
1208#ifdef TEXT_BLINK 1184#ifdef TEXT_BLINK
1209 void text_blink_cb (time_watcher &w); time_watcher text_blink_ev; 1185 void text_blink_cb (time_watcher &w); time_watcher text_blink_ev;
1186#endif
1187#ifndef NO_BELL
1188 void bell_cb (time_watcher &w); time_watcher bell_ev;
1210#endif 1189#endif
1211 1190
1212#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1191#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
1213 void cont_scroll_cb (time_watcher &w); time_watcher cont_scroll_ev; 1192 void cont_scroll_cb (time_watcher &w); time_watcher cont_scroll_ev;
1214#endif 1193#endif
1234 rxvt_term (); 1213 rxvt_term ();
1235 ~rxvt_term (); 1214 ~rxvt_term ();
1236 void destroy (); 1215 void destroy ();
1237 void emergency_cleanup (); 1216 void emergency_cleanup ();
1238 1217
1239 bool init (int argc, const char *const *argv); 1218 bool init (int argc, const char *const *argv, stringvec *envv);
1219
1220 bool init (stringvec *argv, stringvec *envv)
1221 {
1222 this->argv = argv;
1223 return init (argv->size (), argv->begin (), envv);
1224 }
1225
1240 bool init_vars (); 1226 bool init_vars ();
1241 1227
1242 bool pty_fill (); 1228 bool pty_fill ();
1243 1229
1244 void make_current () const // make this the "currently active" urxvt instance 1230 void make_current () const // make this the "currently active" urxvt instance
1447 void scr_cursor_visible (int mode) NOTHROW; 1433 void scr_cursor_visible (int mode) NOTHROW;
1448 void scr_autowrap (int mode) NOTHROW; 1434 void scr_autowrap (int mode) NOTHROW;
1449 void scr_relative_origin (int mode) NOTHROW; 1435 void scr_relative_origin (int mode) NOTHROW;
1450 void scr_insert_mode (int mode) NOTHROW; 1436 void scr_insert_mode (int mode) NOTHROW;
1451 void scr_set_tab (int mode) NOTHROW; 1437 void scr_set_tab (int mode) NOTHROW;
1452 void scr_rvideo_mode (int mode) NOTHROW; 1438 void scr_rvideo_mode (bool on) NOTHROW;
1453 void scr_report_position () NOTHROW; 1439 void scr_report_position () NOTHROW;
1454 void set_font_style () NOTHROW; 1440 void set_font_style () NOTHROW;
1455 void scr_charset_choose (int set) NOTHROW; 1441 void scr_charset_choose (int set) NOTHROW;
1456 void scr_charset_set (int set, unsigned int ch) NOTHROW; 1442 void scr_charset_set (int set, unsigned int ch) NOTHROW;
1457 void scr_move_to (int y, int len) NOTHROW; 1443 void scr_move_to (int y, int len) NOTHROW;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines