--- rxvt-unicode/src/rxvt.h 2004/05/09 18:19:49 1.71 +++ rxvt-unicode/src/rxvt.h 2004/08/04 03:29:28 1.87 @@ -11,6 +11,9 @@ #include #include #include +#ifndef NO_FRILLS +#include +#endif #include "encoding.h" #include "defaultfont.h" @@ -133,6 +136,16 @@ ? 0 \ : min ((val), (((uint16_t)-1)>>1))) +#ifndef NO_FRILLS +typedef struct _mwmhints { + CARD32 flags; + CARD32 functions; + CARD32 decorations; + INT32 input_mode; + CARD32 status; +} MWMHints; +#endif + /* ***************************************************************************** * NORMAL DEFINES @@ -268,7 +281,10 @@ FAST_REFRESH = 1<<0, /* Fully exposed window */ SLOW_REFRESH = 1<<1, /* Partially exposed window */ SMOOTH_REFRESH = 1<<2, /* Do sync'ing to make it smooth */ +#if 0 REFRESH_BOUNDS = 1<<3 +#endif + REFRESH_BOUNDS = 0 /* only required for old int_bwidth code. */ //TODO: remove this and all depending code }; #ifdef NO_SECONDARY_SCREEN @@ -532,6 +548,7 @@ #ifndef NO_FRILLS Rs_ext_bwidth, Rs_int_bwidth, + Rs_borderLess, #endif Rs_scrollBar_thickness, #ifndef NO_LINESPACE @@ -550,6 +567,15 @@ Rs_secondaryScreen, Rs_secondaryScroll, #endif +#ifndef NO_BOLD_UNDERLINE_REVERSE + Rs_realBold, +#endif +#ifdef OFF_FOCUS_FADING + Rs_fade, +#endif +#ifdef TINTING + Rs_shade, +#endif NUM_RESOURCES }; @@ -613,10 +639,7 @@ # define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor) #endif -#define XDEPTH display->depth -#define XCMAP display->cmap -#define XVISUAL display->visual - +// do not change these constants lightly, there are many interdependencies #define IMBUFSIZ 128 // input modifier buffer sizes #define KBUFSZ 512 // size of keyboard mapping buffer #define CBUFSIZ 4096 // size of command buffer @@ -626,6 +649,33 @@ # define PATH_MAX 16384 #endif +/* Motif window hints */ +#define MWM_HINTS_FUNCTIONS (1L << 0) +#define MWM_HINTS_DECORATIONS (1L << 1) +#define MWM_HINTS_INPUT_MODE (1L << 2) +#define MWM_HINTS_STATUS (1L << 3) +/* bit definitions for MwmHints.functions */ +#define MWM_FUNC_ALL (1L << 0) +#define MWM_FUNC_RESIZE (1L << 1) +#define MWM_FUNC_MOVE (1L << 2) +#define MWM_FUNC_MINIMIZE (1L << 3) +#define MWM_FUNC_MAXIMIZE (1L << 4) +#define MWM_FUNC_CLOSE (1L << 5) +/* bit definitions for MwmHints.decorations */ +#define MWM_DECOR_ALL (1L << 0) +#define MWM_DECOR_BORDER (1L << 1) +#define MWM_DECOR_RESIZEH (1L << 2) +#define MWM_DECOR_TITLE (1L << 3) +#define MWM_DECOR_MENU (1L << 4) +#define MWM_DECOR_MINIMIZE (1L << 5) +#define MWM_DECOR_MAXIMIZE (1L << 6) +/* bit definitions for MwmHints.inputMode */ +#define MWM_INPUT_MODELESS 0 +#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1 +#define MWM_INPUT_SYSTEM_MODAL 2 +#define MWM_INPUT_FULL_APPLICATION_MODAL 3 +#define PROP_MWM_HINTS_ELEMENTS 5 + /* ***************************************************************************** * MACRO DEFINES @@ -648,17 +698,17 @@ #define STRRCHR(x, y) strrchr((const char *)(x), (int)(y)) /* convert pixel dimensions to row/column values. Everything as int32_t */ -#define Pixel2Col(x) Pixel2Width((int32_t)(x) - (int32_t)TermWin.int_bwidth) -#define Pixel2Row(y) Pixel2Height((int32_t)(y) - (int32_t)TermWin.int_bwidth) +#define Pixel2Col(x) Pixel2Width((int32_t)(x)) +#define Pixel2Row(y) Pixel2Height((int32_t)(y)) #define Pixel2Width(x) ((int32_t)(x) / (int32_t)TermWin.fwidth) #define Pixel2Height(y) ((int32_t)(y) / (int32_t)TermWin.fheight) -#define Col2Pixel(col) ((int32_t)Width2Pixel(col) + (int32_t)TermWin.int_bwidth) -#define Row2Pixel(row) ((int32_t)Height2Pixel(row) + (int32_t)TermWin.int_bwidth) +#define Col2Pixel(col) ((int32_t)Width2Pixel(col)) +#define Row2Pixel(row) ((int32_t)Height2Pixel(row)) #define Width2Pixel(n) ((int32_t)(n) * (int32_t)TermWin.fwidth) #define Height2Pixel(n) ((int32_t)(n) * (int32_t)TermWin.fheight) -#define TermWin_TotalWidth() ((int32_t)TermWin.width + 2 * (int32_t)TermWin.int_bwidth) -#define TermWin_TotalHeight() ((int32_t)TermWin.height + 2 * (int32_t)TermWin.int_bwidth) +#define TermWin_TotalWidth() ((int32_t)TermWin.width) +#define TermWin_TotalHeight() ((int32_t)TermWin.height) /* how to build & extract colors and attributes */ #define GET_BASEFG(x) (((x) & RS_fgMask)) @@ -938,27 +988,20 @@ uint32_t pixcolor_set[NPIXCLR_SETS]; /* ---------- */ #ifdef SELECTION_SCROLLING - int scroll_selection_delay, - scroll_selection_lines; + int scroll_selection_lines; enum page_dirn scroll_selection_dir; int selection_save_x, selection_save_y, - selection_save_state, - pending_scroll_selection; + selection_save_state; #endif /* ---------- */ int csrO, /* Hops - csr offset in thumb/slider to */ /* give proper Scroll behaviour */ -#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING - scroll_arrow_delay, -#endif #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) - mouse_slip_wheel_delay, mouse_slip_wheel_speed, #endif refresh_count, refresh_limit, - fnum, /* logical font number */ last_bot, /* scrollbar last bottom position */ last_top, /* scrollbar last top position */ last_state, /* scrollbar last state */ @@ -1128,8 +1171,9 @@ xevent_watcher menubar_ev; #endif - void check_cb (check_watcher &w); check_watcher check_ev; + void check_cb (check_watcher &w); check_watcher check_ev; void destroy_cb (time_watcher &w); time_watcher destroy_ev; + void flush_cb (time_watcher &w); time_watcher flush_ev; void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; @@ -1142,11 +1186,21 @@ void text_blink_cb (time_watcher &w); time_watcher text_blink_ev; #endif +#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING + void cont_scroll_cb (time_watcher &w); time_watcher cont_scroll_ev; +#endif +#ifdef SELECTION_SCROLLING + void sel_scroll_cb (time_watcher &w); time_watcher sel_scroll_ev; +#endif +#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) + void slip_wheel_cb (time_watcher &w); time_watcher slip_wheel_ev; +#endif + #ifdef POINTER_BLANK void pointer_cb (time_watcher &w); time_watcher pointer_ev; void pointer_blank (); - void pointer_unblank (); #endif + void pointer_unblank (); void tt_printf (const char *fmt,...); void tt_write (const unsigned char *data, unsigned int len); @@ -1160,8 +1214,6 @@ bool init (int argc, const char *const *argv); bool init_vars (); - unicode_t next_char (); - bool pty_fill (); void *operator new (size_t s); @@ -1226,7 +1278,12 @@ // command.C void lookup_key (XKeyEvent &ev); unsigned int cmd_write (const unsigned char *str, unsigned int count); + + unicode_t next_char (); unicode_t cmd_getc (); + unicode_t next_octet (); + unicode_t cmd_get8 (); + bool cmd_parse (); void mouse_report (XButtonEvent &ev); void button_press (XButtonEvent &ev);