--- rxvt-unicode/src/rxvt.h 2003/11/25 15:44:39 1.5 +++ rxvt-unicode/src/rxvt.h 2003/12/18 00:29:29 1.13 @@ -1,5 +1,5 @@ /* - * $Id: rxvt.h,v 1.5 2003/11/25 15:44:39 pcg Exp $ + * $Id: rxvt.h,v 1.13 2003/12/18 00:29:29 pcg Exp $ */ #ifndef _RXVT_H_ /* include once only */ @@ -17,6 +17,7 @@ #include "defaultfont.h" #include "rxvtcolor.h" #include "iom.h" +#include "salloc.h" /* ***************************************************************************** @@ -553,15 +554,11 @@ Rs_cursorBlink, Rs_pointerBlank, Rs_pointerBlankDelay, + Rs_imLocale, NUM_RESOURCES }; enum { - TIMEOUT_INCR = 0, - NUM_TIMEOUTS -}; - -enum { XA_COMPOUND_TEXT = 0, XA_MULTIPLE, XA_TARGETS, @@ -856,47 +853,27 @@ struct rxvt_term : rxvt_vars { struct mbstate mbstate; -#ifdef __GNUC__ + unsigned char want_refresh:1, - want_full_refresh:1, - am_transparent:1, - am_pixmap_trans:1, - current_screen:1, - hate_those_clicks:1, +#ifdef TRANSPARENT + want_full_refresh:1, /* awaiting full screen refresh */ +#endif +#if defined(XPM_BACKGROUND) || defined(TRANSPARENT) + am_transparent:1, /* is a transparent term */ + am_pixmap_trans:1, /* transparency w/known root pixmap */ +#endif + current_screen:1, /* primary or secondary */ + hate_those_clicks:1, /* a.k.a. keep mark position */ num_scr_allow:1, - bypass_keystate:1; - unsigned char chstat:1, - lost_multi:1, - multi_byte:1, + bypass_keystate:1, +#ifdef CURSOR_BLINK hidden_cursor:1, +#endif +#ifdef POINTER_BLANK hidden_pointer:1, - parsed_geometry:1; -#else - unsigned char want_refresh, -# ifdef TRANSPARENT - want_full_refresh, /* awaiting full screen refresh */ -# endif -# if defined(XPM_BACKGROUND) || defined(TRANSPARENT) - am_transparent, /* is a transparent term */ - am_pixmap_trans, /* transparency w/known root pixmap */ -# endif - current_screen, /* primary or secondary */ - hate_those_clicks, /* a.k.a. keep mark position */ - num_scr_allow, - bypass_keystate, -# ifdef MULTICHAR_SET - chstat, - lost_multi, /* set ==> we only got half a glyph */ - multi_byte, /* set ==> currently using 2 bytes per glyph */ -# endif -# ifdef CURSOR_BLINK - hidden_cursor, -# endif -# ifdef POINTER_BLANK - hidden_pointer, -# endif - parsed_geometry; -#endif /* !__GNUC__ */ +#endif + parsed_geometry:1, + seen_input:1; /* wether any input has been seen so far */ unsigned char refresh_type, #ifdef UTMP_SUPPORT @@ -958,7 +935,7 @@ menu_readonly, /* okay to alter menu? */ Arrows_x, #endif -#if (MENUBAR_MAX > 1) +#if MENUBAR_MAX > 1 Nbars, #endif window_vt_x, @@ -1020,9 +997,9 @@ gid_t egid; #endif /* ---------- */ - Cursor pointer_leftptr; + Cursor leftptr_cursor; #ifdef POINTER_BLANK - Cursor pointer_blank; + Cursor blank_cursor; #endif /* ---------- */ const char *ttydev; /* pty/tty name */ @@ -1091,7 +1068,6 @@ #ifdef POINTER_BLANK struct timeval lastmotion; #endif - struct timeval timeout[NUM_TIMEOUTS]; /* these three don't need to be kept but do so to placate some mem checkers */ char *env_windowid; /* environmental variable WINDOWID */ @@ -1102,9 +1078,7 @@ char *locale; char charsets[4]; unsigned char *v_buffer; /* pointer to physical buffer */ - unsigned char *v_bufstr; /* beginning of area to write */ - unsigned char *v_bufptr; /* end of area to write */ - unsigned char *v_bufend; /* end of physical buffer */ + unsigned int v_buflen; /* size of area to write */ char *newfont[MAX_NFONTS]; #ifdef KEYSYM_RESOURCE const unsigned char *Keysym_map[256]; @@ -1115,28 +1089,58 @@ unsigned char cmdbuf_base[BUFSIZ]; unsigned char kbuf[KBUFSZ]; + rxvt_salloc *ralloc; + rxvt_salloc *talloc; + + void paste (const unsigned char *data, unsigned int len); + + void flush (); + + void check_cb (check_watcher &w); check_watcher check_ev; + void destroy_cb (time_watcher &w); time_watcher destroy_ev; + void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; void x_cb (io_watcher &w, short revents); io_watcher x_ev; + void incr_cb (time_watcher &w); time_watcher incr_ev; + #ifdef CURSOR_BLINK void blink_cb (time_watcher &w); time_watcher blink_ev; #endif - void flush (); +#ifdef POINTER_BLANK + void pointer_cb (time_watcher &w); time_watcher pointer_ev; + void pointer_blank (); + void pointer_unblank (); +#endif + + void tt_printf (const char *fmt,...); + void tt_write (const unsigned char *data, unsigned int len); + + void tt_winch (); rxvt_term (); ~rxvt_term (); + void destroy (); bool init (int argc, const char *const *argv); bool init_vars (); uint32_t next_char (); - bool pty_fill (size_t count); + bool pty_fill (); void process_x_events (); void *operator new (size_t s); void operator delete (void *p, size_t s); + + /* screen(!) */ + void scr_blank_line (text_t *et, rend_t *er, unsigned int width, rend_t efs); + void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs); + int scr_scroll_text (int row1, int row2, int count, int spec); + void scr_reset (); + void scr_reset_realloc (); + void scr_release (); }; #ifndef __attribute__