--- rxvt-unicode/src/rxvt.h 2006/01/24 16:57:42 1.239 +++ rxvt-unicode/src/rxvt.h 2006/01/25 02:53:13 1.243 @@ -17,6 +17,7 @@ #if ENABLE_FRILLS # define ENABLE_XEMBED 1 # define ENABLE_EWMH 1 +# define ENABLE_XIM_ONTHESPOT 1 # define CURSOR_BLINK 1 #else # define ENABLE_MINIMAL 1 @@ -620,42 +621,6 @@ NUM_RESOURCES }; -// see init.C:xa_names, which must be kept in sync -enum { - XA_TEXT = 0, - XA_COMPOUND_TEXT, - XA_UTF8_STRING, - XA_MULTIPLE, - XA_TARGETS, - XA_TIMESTAMP, - XA_VT_SELECTION, - XA_INCR, - XA_WM_PROTOCOLS, - XA_WM_DELETE_WINDOW, - XA_CLIPBOARD, -#if ENABLE_FRILLS - XA_MOTIF_WM_HINTS, -#endif -#if ENABLE_EWMH - XA_NET_WM_PID, - XA_NET_WM_NAME, - XA_NET_WM_ICON_NAME, - XA_NET_WM_PING, -#endif -#if USE_XIM - XA_WM_LOCALE_NAME, -#endif -#if TRANSPARENT - XA_XROOTPMAP_ID, - XA_ESETROOT_PMAP_ID, -#endif -#if ENABLE_XEMBED - XA_XEMBED, - XA_XEMBED_INFO, -#endif - NUM_XA -}; - /* DEC private modes */ #define PrivMode_132 (1UL<<0) #define PrivMode_132OK (1UL<<1) @@ -738,6 +703,11 @@ #define dLocal(type,name) type const name = this->name #define dDisp Display *disp = this->display->display +// for speed reasons, we assume that all latin1 characters +// are single-width (the first unicdoe combining character +// is actually 0x300, but ascii is what matters most). +#define WCWIDTH(c) ((c) < 0x100 ? 1 : wcwidth (c)) + /* convert pixel dimensions to row/column values. Everything as int32_t */ #define Pixel2Col(x) Pixel2Width((int32_t)(x)) #define Pixel2Row(y) Pixel2Height((int32_t)(y)) @@ -825,27 +795,6 @@ # define XPMClearArea(a, b, c, d, e, f, g) #endif -#ifdef DEBUG_CMD -# define D_CMD(x) fprintf x ; fputc('\n', stderr) -#else -# define D_CMD(x) -#endif -#ifdef DEBUG_INIT -# define D_INIT(x) fprintf x ; fputc('\n', stderr) -#else -# define D_INIT(x) -#endif -#ifdef DEBUG_MAIN -# define D_MAIN(x) fprintf x ; fputc('\n', stderr) -#else -# define D_MAIN(x) -#endif -#ifdef DEBUG_SIZE -# define D_SIZE(x) fprintf x ; fputc('\n', stderr) -#else -# define D_SIZE(x) -#endif - typedef callback1 log_callback; typedef callback1 getfd_callback; @@ -1052,7 +1001,7 @@ unsigned long priv_modes, SavedModes; /* ---------- */ - Atom xa[NUM_XA]; + Atom *xa; /* ---------- */ #ifdef RXVT_SCROLLBAR GC scrollbarGC, @@ -1119,15 +1068,16 @@ vector allocated; // free these memory blocks with free() - char *env_windowid; /* environmental variable WINDOWID */ + char env_windowid[21]; /* environmental variable WINDOWID */ + char env_colorfgbg[sizeof ("COLORFGBG=default;default;bg") + 1]; char *env_display; /* environmental variable DISPLAY */ char *env_term; /* environmental variable TERM */ - char *env_colorfgbg; + char *locale; char charsets[4]; char *v_buffer; /* pointer to physical buffer */ unsigned int v_buflen; /* size of area to write */ - stringvec *argv, *envv; /* if != 0, will be freed on destroy time */ + stringvec *argv, *envv; /* if != 0, will be freed at destroy time */ #ifdef KEYSYM_RESOURCE keyboard_manager *keyboard;