… | |
… | |
34 | |
34 | |
35 | template<class T> |
35 | template<class T> |
36 | struct refcache : vector<T *> { |
36 | struct refcache : vector<T *> { |
37 | T *get (const char *id); |
37 | T *get (const char *id); |
38 | void put (T *obj); |
38 | void put (T *obj); |
|
|
39 | void clear (); |
|
|
40 | |
39 | ~refcache (); |
41 | ~refcache () |
|
|
42 | { |
|
|
43 | clear (); |
|
|
44 | } |
40 | }; |
45 | }; |
41 | |
46 | |
42 | ///////////////////////////////////////////////////////////////////////////// |
47 | ///////////////////////////////////////////////////////////////////////////// |
43 | |
48 | |
44 | #ifdef USE_XIM |
49 | #ifdef USE_XIM |
… | |
… | |
65 | #ifdef USE_XIM |
70 | #ifdef USE_XIM |
66 | refcache<rxvt_xim> xims; |
71 | refcache<rxvt_xim> xims; |
67 | vector<im_watcher *> imw; |
72 | vector<im_watcher *> imw; |
68 | |
73 | |
69 | void im_change_cb (); |
74 | void im_change_cb (); |
|
|
75 | void im_change_check (); |
70 | #endif |
76 | #endif |
71 | |
77 | |
72 | //public |
78 | //public |
73 | Display *display; |
79 | Display *display; |
74 | int depth; |
80 | int depth; |
75 | int screen; |
81 | int screen; |
76 | Visual *visual; |
82 | Visual *visual; |
77 | Colormap cmap; |
83 | Colormap cmap; |
78 | Window root; |
84 | Window root; |
79 | rxvt_term *selection_owner; |
85 | rxvt_term *selection_owner; |
80 | #ifndef NO_SLOW_LINK_SUPPORT |
86 | #ifndef NO_SLOW_LINK_SUPPORT |
81 | bool is_local; |
87 | bool is_local; |
|
|
88 | #endif |
|
|
89 | #ifdef POINTER_BLANK |
|
|
90 | Cursor blank_cursor; |
82 | #endif |
91 | #endif |
83 | |
92 | |
84 | rxvt_display (const char *id); |
93 | rxvt_display (const char *id); |
85 | bool init (); |
94 | bool init (); |
86 | ~rxvt_display (); |
95 | ~rxvt_display (); |
87 | |
96 | |
|
|
97 | operator Display *() const { return display; } |
|
|
98 | |
88 | void flush (); |
99 | void flush (); |
89 | |
100 | Atom atom (const char *name); |
90 | void set_selection_owner (rxvt_term *owner); |
101 | void set_selection_owner (rxvt_term *owner); |
91 | |
102 | |
92 | void reg (xevent_watcher *w); |
103 | void reg (xevent_watcher *w); |
93 | void unreg (xevent_watcher *w); |
104 | void unreg (xevent_watcher *w); |
94 | |
105 | |
… | |
… | |
97 | void unreg (im_watcher *w); |
108 | void unreg (im_watcher *w); |
98 | |
109 | |
99 | rxvt_xim *get_xim (const char *locale, const char *modifiers); |
110 | rxvt_xim *get_xim (const char *locale, const char *modifiers); |
100 | void put_xim (rxvt_xim *xim); |
111 | void put_xim (rxvt_xim *xim); |
101 | #endif |
112 | #endif |
102 | |
|
|
103 | Atom atom (const char *name); |
|
|
104 | }; |
113 | }; |
105 | |
114 | |
106 | #ifdef USE_XIM |
115 | #ifdef USE_XIM |
107 | struct im_watcher : watcher, callback0<void> { |
116 | struct im_watcher : watcher, callback0<void> { |
108 | template<class O1, class O2> |
117 | template<class O1, class O2> |