--- rxvt-unicode/src/rxvt.h 2004/08/25 03:52:09 1.121 +++ rxvt-unicode/src/rxvt.h 2004/12/13 01:29:03 1.129 @@ -88,7 +88,10 @@ void * rxvt_malloc (size_t size); void * rxvt_calloc (size_t number, size_t size); void * rxvt_realloc (void *ptr, size_t size); -char * rxvt_wcstombs (const wchar_t *str, int len); +char * rxvt_wcstombs (const wchar_t *str, int len = -1); +wchar_t * rxvt_mbstowcs (const char *str, int len = -1); +char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); +wchar_t * rxvt_utf8towcs (const char *str, int len = -1); char * rxvt_strdup (const char *str); char * rxvt_r_basename (const char *str); void rxvt_vlog (const char *fmt, va_list arg_ptr); @@ -101,6 +104,7 @@ char * rxvt_Str_trim (char *str); int rxvt_Str_escaped (char *str); char ** rxvt_splitcommastring (const char *cs); +void rxvt_freecommastring (char **cs); char * rxvt_File_find (const char *file, const char *ext, const char *path); void rxvt_Draw_Shadow (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int h); void rxvt_Draw_Triangle (Display *display, Window win, GC topShadow, GC botShadow, int x, int y, int w, int type); @@ -133,8 +137,8 @@ #ifdef XPM_BACKGROUND typedef struct { - short w, h, x, y; - Pixmap pixmap; + short w, h, x, y; + Pixmap pixmap; } bgPixmap_t; #endif @@ -143,10 +147,10 @@ * pared down from XButtonEvent */ struct mouse_event { - int clicks; - Time time; /* milliseconds */ - unsigned int state; /* key or button mask */ - unsigned int button; /* detail */ + int clicks; + Time time; /* milliseconds */ + unsigned int state; /* key or button mask */ + unsigned int button; /* detail */ }; #define MAX_IT(current, other) if ((other) > (current)) (current) = (other) @@ -611,6 +615,7 @@ Rs_pointerBlank, Rs_pointerBlankDelay, Rs_imLocale, + Rs_pastableTabs, #ifndef NO_SECONDARY_SCREEN Rs_secondaryScreen, Rs_secondaryScroll, @@ -1003,7 +1008,7 @@ #ifdef POINTER_BLANK hidden_pointer:1, #endif -// enc_utf8:1, /* wether terminal reads/writes utf-8 */ +// enc_utf8:1, /* wether locale uses utf-8 */ seen_input:1, /* wether we have seen some program output yet */ seen_resize:1, /* wether we had a resize event */ parsed_geometry:1; @@ -1017,8 +1022,8 @@ selection_type; /* ---------- */ short rvideo; - int16_t num_scr; /* screen: number lines scrolled */ - unsigned int prev_ncol, /* screen: previous number of columns */ + int num_scr; /* screen: number lines scrolled */ + int prev_ncol, /* screen: previous number of columns */ prev_nrow; /* screen: previous number of rows */ /* ---------- */ rend_t rstyle; @@ -1060,8 +1065,8 @@ allowedxerror; /* ---------- */ unsigned int ModMetaMask, - ModNumLockMask, - old_width, /* last used width in screen resize */ + ModNumLockMask; + int old_width, /* last used width in screen resize */ old_height; /* last used height in screen resize */ unsigned long priv_modes, SavedModes; @@ -1099,6 +1104,8 @@ Time selection_time, selection_request_time; pid_t cmd_pid; /* process id of child */ + char * incr_buf; + size_t incr_buf_size, incr_buf_fill; /* ---------- */ Cursor leftptr_cursor; #ifdef POINTER_BLANK @@ -1111,11 +1118,6 @@ #ifndef NO_DELETE_KEY const char *key_delete; #endif -#ifdef USE_XIM - rxvt_xim *input_method; - XIC Input_Context; - XIMStyle input_style; -#endif struct mouse_event MEvent; XComposeStatus compose; ttymode_t tio; @@ -1172,9 +1174,6 @@ char *env_term; /* environmental variable TERM */ char *env_colorfgbg; char *locale; -#if 0 - char *codeset; -#endif char charsets[4]; unsigned char *v_buffer; /* pointer to physical buffer */ unsigned int v_buflen; /* size of area to write */ @@ -1212,6 +1211,10 @@ xevent_watcher rootwin_ev; #endif + + void sig_term (sig_watcher &w); sig_watcher sw_term; + void sig_chld (sig_watcher &w); sig_watcher sw_chld; + void x_cb (XEvent &xev); xevent_watcher termwin_ev; xevent_watcher vt_ev; @@ -1275,7 +1278,6 @@ void init_command (const char *const *argv); void run_command (const char *const *argv); int run_child (const char *const *argv); - static void child_exited (int pid); void color_aliases (int idx); void recolour_cursor (); @@ -1284,6 +1286,11 @@ void window_calc (unsigned int width, unsigned int height); #if USE_XIM + rxvt_xim *input_method; + XIC Input_Context; + XIMStyle input_style; + XPoint spot; // most recently sent spot position + void im_destroy (); void im_cb (); im_watcher im_ev; void im_set_size (XRectangle &size); @@ -1349,6 +1356,8 @@ // main.C void privileged_utmp (rxvt_privaction action); bool set_fonts (); + void set_string_property (Atom prop, const char *str, int len = -1); + void set_utf8_property (Atom prop, const char *str, int len = -1); void set_title (const char *str); void set_icon_name (const char *str); void set_window_color (int idx, const char *color); @@ -1443,7 +1452,7 @@ void scr_reverse_selection (); void scr_dump (int fd); void selection_check (int check_more); - int selection_paste (Window win, Atom prop, bool delete_prop); + void selection_paste (Window win, Atom prop, bool delete_prop); void selection_property (Window win, Atom prop); void selection_request (Time tm, int x, int y); int selection_request_other (Atom target, int selnum);