--- rxvt-unicode/src/rxvt.h 2004/01/31 04:20:20 1.30 +++ rxvt-unicode/src/rxvt.h 2004/02/11 08:13:45 1.33 @@ -547,7 +547,7 @@ NUM_RESOURCES }; -// see init.C:xa_named, which must be kept in sync +// see init.C:xa_names, which must be kept in sync enum { XA_TEXT = 0, XA_COMPOUND_TEXT, @@ -608,9 +608,9 @@ (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor) #endif -#define XDEPTH Xdepth -#define XCMAP Xcmap -#define XVISUAL Xvisual +#define XDEPTH display->depth +#define XCMAP display->cmap +#define XVISUAL display->visual #define IMBUFSIZ 128 /* input modifier buffer sizes */ #ifndef BUFSIZ @@ -652,8 +652,6 @@ #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 Xroot DefaultRootWindow(Xdisplay) - /* how to build & extract colors and attributes */ #define GET_BASEFG(x) (((x) & RS_fgMask)) #define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) @@ -996,6 +994,7 @@ KeySym ks_greekmodeswith; #endif #ifdef USE_XIM + rxvt_xim *input_method; XIC Input_Context; XIMStyle input_style; int event_type; @@ -1075,11 +1074,23 @@ void flush (); + void rootwin_cb (XEvent &xev); + xevent_watcher rootwin_ev; + + void x_cb (XEvent &xev); + xevent_watcher termwin_ev; + xevent_watcher vt_ev; +#ifdef HAVE_SCROLLBARS + xevent_watcher scrollbar_ev; +#endif +#ifdef MENUBAR + xevent_watcher menubar_ev; +#endif + 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; @@ -1111,7 +1122,6 @@ uint32_t next_char (); bool pty_fill (); - void process_x_events (); void *operator new (size_t s); void operator delete (void *p, size_t s); @@ -1130,12 +1140,19 @@ void create_windows (int argc, const char *const *argv); void resize_all_windows (unsigned int width, unsigned int height, int ignoreparent); void window_calc (unsigned int width, unsigned int height); - void set_preedit_area (XRectangle * preedit_rect, XRectangle * status_rect, XRectangle * needed_rect); #if USE_XIM - void set_size (XRectangle *size); - void set_position (XPoint *pos); - void set_color (unsigned long *fg, unsigned long *bg); + void im_destroy (); + void im_cb (); im_watcher im_ev; + void im_set_size (XRectangle *size); + void im_set_position (XPoint *pos); + void im_set_color (unsigned long *fg, unsigned long *bg); + void im_set_preedit_area (XRectangle * preedit_rect, XRectangle * status_rect, XRectangle * needed_rect); + + bool IMisRunning (); + void IMSendSpot (); + bool IM_get_IC (const char *modifiers); + void IMSetStatusPosition (); #endif void resize_scrollbar (); @@ -1163,13 +1180,12 @@ /* autoconvert */ // command.C - void lookup_key (XKeyEvent *ev); + void lookup_key (XKeyEvent &ev); unsigned int cmd_write (const unsigned char *str, unsigned int count); uint32_t cmd_getc (); - void mouse_report (const XButtonEvent *ev); - void process_x_event (XEvent *ev); - void button_press (XButtonEvent *ev); - void button_release (XButtonEvent *ev); + void mouse_report (const XButtonEvent &ev); + void button_press (const XButtonEvent &ev); + void button_release (const XButtonEvent &ev); int check_our_parents (); #ifdef PRINTPIPE FILE * popen_printer (); @@ -1207,10 +1223,6 @@ void set_colorfgbg (); int rXParseAllocColor (rxvt_color * screen_in_out, const char *colour); void set_widthheight (unsigned int width, unsigned int height); - bool IMisRunning (); - void IMSendSpot (); - bool IM_get_IC (); - void IMSetStatusPosition (); #ifdef MENUBAR // menubar.C @@ -1291,7 +1303,7 @@ void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret); void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange); void selection_remove_trailing_spaces (); - void selection_send (const XSelectionRequestEvent *rq); + void selection_send (const XSelectionRequestEvent &rq); #if defined(NEXT_SCROLLBAR) // scrollbar-next.C