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.211 by root, Mon Jan 16 18:09:28 2006 UTC vs.
Revision 1.218 by root, Tue Jan 17 12:22:59 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 virtual void put () = 0;
190
191 virtual void login (int cmd_pid, bool login_shell, const char *hostname) = 0;
192 virtual void logout () = 0;
193
194 void close_tty ();
195
196 bool make_controlling_tty ();
197 void set_utf8_mode (bool on);
198};
199
200// a "factory" *g*
201rxvt_ptytty *rxvt_new_ptytty ();
176 202
177/* 203/*
178 * the 'essential' information for reporting Mouse Events 204 * the 'essential' information for reporting Mouse Events
179 * pared down from XButtonEvent 205 * pared down from XButtonEvent
180 */ 206 */
336 * | 362 * |
337 * +---< SB_WIDTH_NEXT 363 * +---< SB_WIDTH_NEXT
338 */ 364 */
339 365
340enum { 366enum {
341 NO_REFRESH = 0 , /* Window not visible at all! */ 367 NO_REFRESH = 0, /* Window not visible at all! */
342 FAST_REFRESH = 1<<0, /* Fully exposed window */ 368 FAST_REFRESH = 1, /* Fully exposed window */
343 SLOW_REFRESH = 1<<1, /* Partially exposed window */ 369 SLOW_REFRESH = 2, /* Partially exposed window */
344 SMOOTH_REFRESH = 1<<2, /* Do sync'ing to make it smooth */
345}; 370};
346 371
347#ifdef NO_SECONDARY_SCREEN 372#ifdef NO_SECONDARY_SCREEN
348# define NSCREENS 0 373# define NSCREENS 0
349#else 374#else
700/* 725/*
701 ***************************************************************************** 726 *****************************************************************************
702 * MACRO DEFINES 727 * MACRO DEFINES
703 ***************************************************************************** 728 *****************************************************************************
704 */ 729 */
730#define dLocal(type,name) type const name = this->name
705#define dDisp Display *disp = display->display 731#define dDisp Display *disp = this->display->display
706 732
707/* convert pixel dimensions to row/column values. Everything as int32_t */ 733/* convert pixel dimensions to row/column values. Everything as int32_t */
708#define Pixel2Col(x) Pixel2Width((int32_t)(x)) 734#define Pixel2Col(x) Pixel2Width((int32_t)(x))
709#define Pixel2Row(y) Pixel2Height((int32_t)(y)) 735#define Pixel2Row(y) Pixel2Height((int32_t)(y))
710#define Pixel2Width(x) ((int32_t)(x) / (int32_t)fwidth) 736#define Pixel2Width(x) ((int32_t)(x) / (int32_t)fwidth)
787 813
788#ifdef XPM_BACKGROUND 814#ifdef XPM_BACKGROUND
789# define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g)) 815# define XPMClearArea(a, b, c, d, e, f, g) XClearArea((a), (b), (c), (d), (e), (f), (g))
790#else 816#else
791# define XPMClearArea(a, b, c, d, e, f, g) 817# define XPMClearArea(a, b, c, d, e, f, g)
792#endif
793
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 818#endif
811 819
812#ifdef DEBUG_CMD 820#ifdef DEBUG_CMD
813# define D_CMD(x) fprintf x ; fputc('\n', stderr) 821# define D_CMD(x) fprintf x ; fputc('\n', stderr)
814#else 822#else
1098 const char *key_delete; 1106 const char *key_delete;
1099#endif 1107#endif
1100 struct mouse_event MEvent; 1108 struct mouse_event MEvent;
1101 XComposeStatus compose; 1109 XComposeStatus compose;
1102 ttymode_t tio; 1110 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; 1111 row_col_t oldcursor;
1116#ifdef XPM_BACKGROUND 1112#ifdef XPM_BACKGROUND
1117 bgPixmap_t bgPixmap; 1113 bgPixmap_t bgPixmap;
1118 XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */ 1114 XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */
1119#endif 1115#endif
1151 1147
1152 const char *rs[NUM_RESOURCES]; 1148 const char *rs[NUM_RESOURCES];
1153 /* command input buffering */ 1149 /* command input buffering */
1154 char *cmdbuf_ptr, *cmdbuf_endp; 1150 char *cmdbuf_ptr, *cmdbuf_endp;
1155 char cmdbuf_base[CBUFSIZ]; 1151 char cmdbuf_base[CBUFSIZ];
1152
1153 rxvt_ptytty *pty;
1156 1154
1157 rxvt_salloc *talloc; // text line allocator 1155 rxvt_salloc *talloc; // text line allocator
1158 rxvt_salloc *ralloc; // rend line allocator 1156 rxvt_salloc *ralloc; // rend line allocator
1159 1157
1160 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's 1158 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's
1329 void process_sgr_mode (unsigned int nargs, const int *arg); 1327 void process_sgr_mode (unsigned int nargs, const int *arg);
1330 void process_graphics (); 1328 void process_graphics ();
1331 // init.C 1329 // init.C
1332 void Get_Colours (); 1330 void Get_Colours ();
1333 void get_ourmods (); 1331 void get_ourmods ();
1334 // logging.C
1335 void makeutent (const char *pty, const char *hostname);
1336 void cleanutent ();
1337 // main.C 1332 // main.C
1338 void privileged_utmp (rxvt_privaction action); 1333 void privileged_utmp (rxvt_privaction action);
1339 bool set_fonts (); 1334 bool set_fonts ();
1340 void set_string_property (Atom prop, const char *str, int len = -1); 1335 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); 1336 void set_utf8_property (Atom prop, const char *str, int len = -1);
1421 void scr_blank_screen_mem (line_t &l, rend_t efs) const; 1416 void scr_blank_screen_mem (line_t &l, rend_t efs) const;
1422 int scr_scroll_text (int row1, int row2, int count); 1417 int scr_scroll_text (int row1, int row2, int count);
1423 void scr_reset (); 1418 void scr_reset ();
1424 void scr_release (); 1419 void scr_release ();
1425 void scr_clear (bool really = false); 1420 void scr_clear (bool really = false);
1426 void scr_refresh (unsigned char refresh_type); 1421 void scr_refresh ();
1427 bool scr_refresh_rend (rend_t mask, rend_t value); 1422 bool scr_refresh_rend (rend_t mask, rend_t value);
1428 void scr_erase_screen (int mode); 1423 void scr_erase_screen (int mode);
1429#if ENABLE_FRILLS 1424#if ENABLE_FRILLS
1430 void scr_erase_savelines (); 1425 void scr_erase_savelines ();
1431 void scr_backindex (); 1426 void scr_backindex ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines