--- rxvt-unicode/src/rxvtlib.h.in 2006/01/09 19:01:56 1.64 +++ rxvt-unicode/src/rxvtlib.h.in 2007/12/11 09:10:56 1.80 @@ -11,7 +11,6 @@ @include_unistd_h@ @include_string_h@ @include_fcntl_h@ -@include_util_h@ @include_assert_h@ @include_sys_ioctl_h@ @include_sys_time_h@ @@ -30,10 +29,12 @@ // stdlib.h might provide it #endif -#include "ptytty.h" +using namespace std; extern "C" { -#include /* Xlib, Xutil, Xresource, Xfuncproto */ +#include +#include +#include } /* @@ -45,16 +46,10 @@ @rxvt_int32_typedef@ @rxvt_uint32_typedef@ -/* whatever normal size corresponds to a integer pointer */ -@rxvt_intp_define@ -/* whatever normal size corresponds to a unsigned integer pointer */ -@rxvt_u_intp_define@ - struct rxvt_fontset; struct rxvt_color; struct rxvt_vars; /* defined later on */ struct rxvt_term; -struct rxvt_display; struct rxvt_im; struct rxvt_drawable; @@ -62,12 +57,9 @@ extern rxvt_t rxvt_current_term; -#define SET_R(r) rxvt_current_term = (r) +#define SET_R(r) rxvt_current_term = const_cast(r) #define GET_R rxvt_current_term -#define scrollbar_visible() scrollBar.state -#define menubar_visible() menuBar.state - typedef struct { int row; int col; @@ -92,10 +84,11 @@ * ncol : 1 <= ncol <= MAX(tlen_t) * nrow : 1 <= nrow <= MAX(int) * saveLines : 0 <= saveLines <= MAX(int) - * total_rows : nrow + saveLines - * nsaved : 0 <= nsaved <= saveLines * term_start : 0 <= term_start < saveLines - * view_start : 0 <= view_start < saveLines + * total_rows : nrow + saveLines + * + * top_row : -saveLines <= top_row <= 0 + * view_start : top_row <= view_start <= 0 * * | most coordinates are stored relative to term_start, * ROW_BUF | which is the first line of the terminal screen @@ -103,9 +96,9 @@ * |························= row_buf[1] * |························= row_buf[2] etc. * | - * +------------+···········= term_start - nsaved - * | scrollback | - * | scrollback +---------+·= term_start - view_start + * +------------+···········= term_start + top_row + * | scrollback | + * | scrollback +---------+·= term_start + view_start * | scrollback | display | * | scrollback | display | * +------------+·display·+·= term_start @@ -134,9 +127,9 @@ int lineSpace; /* number of extra pixels between rows */ int saveLines; /* number of lines that fit in scrollback */ int total_rows; /* total number of rows in this terminal */ - int nsaved; /* number of rows saved to scrollback */ int term_start; /* term lines start here */ int view_start; /* scrollback view starts here */ + int top_row; /* topmost row index of scrollback */ Window parent[6]; /* parent identifiers - we're parent[0] */ Window vt; /* vt100 window */ GC gc; /* GC for drawing */ @@ -189,7 +182,7 @@ unsigned int screen; /* screen being used */ unsigned int clicks; /* number of clicks */ selection_op_t op; /* current operation */ - bool rect; /* rectangluar selection? */ + bool rect; /* rectangular selection? */ row_col_t beg; /* beginning of selection <= mark */ row_col_t mark; /* point of initial click <= end */ row_col_t end; /* one character past end point */ @@ -207,22 +200,17 @@ /* rxvt_vars.options */ enum { -# define def(name,idx) Opt_ ## name = 1UL << (idx), +# define def(name,idx) Opt_ ## name = idx, # define nodef(name) Opt_ ## name = 0, # include "optinc.h" # undef nodef # undef def +Opt_count }; /* ------------------------------------------------------------------------- */ typedef struct { - short state; - Window win; - struct rxvt_drawable *drawable; -} menuBar_t; - -typedef struct { char state; /* scrollbar state */ char init; /* scrollbar has been initialised */ unsigned int beg; /* slider sub-window begin height */ @@ -242,10 +230,8 @@ struct rxvt_vars : TermWin_t { scrollBar_t scrollBar; - menuBar_t menuBar; - uint32_t options; + uint8_t options[(Opt_count + 7) >> 3]; XSizeHints szHint; - rxvt_display *display; rxvt_color *pix_colors; rxvt_color *pix_colors_focused; #ifdef OFF_FOCUS_FADING @@ -254,7 +240,6 @@ short numpix_colors; Cursor TermWin_cursor; /* cursor for vt window */ int sb_shadow; /* scrollbar shadow width */ - rxvt_ptytty pty; int numlock_state; line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf line_t *drawn_buf; // text on screen @@ -266,7 +251,6 @@ }; void rxvt_init (); -bool rxvt_tainted (); #endif /* _RXVTLIB_H_ */