… | |
… | |
16 | #include "rxvtutil.h" |
16 | #include "rxvtutil.h" |
17 | |
17 | |
18 | #include "callback.h" |
18 | #include "callback.h" |
19 | |
19 | |
20 | struct rxvt_term; |
20 | struct rxvt_term; |
|
|
21 | struct rxvt_display; |
21 | |
22 | |
22 | struct im_watcher; |
23 | struct im_watcher; |
23 | struct xevent_watcher; |
24 | struct xevent_watcher; |
24 | |
25 | |
25 | struct refcounted { |
26 | struct refcounted { |
… | |
… | |
33 | |
34 | |
34 | template<class T> |
35 | template<class T> |
35 | struct refcache : vector<T *> { |
36 | struct refcache : vector<T *> { |
36 | T *get (const char *id); |
37 | T *get (const char *id); |
37 | void put (T *obj); |
38 | void put (T *obj); |
|
|
39 | void clear (); |
|
|
40 | |
38 | ~refcache (); |
41 | ~refcache () |
|
|
42 | { |
|
|
43 | clear (); |
|
|
44 | } |
39 | }; |
45 | }; |
40 | |
46 | |
41 | ///////////////////////////////////////////////////////////////////////////// |
47 | ///////////////////////////////////////////////////////////////////////////// |
42 | |
48 | |
43 | #ifdef USE_XIM |
49 | #ifdef USE_XIM |
… | |
… | |
64 | #ifdef USE_XIM |
70 | #ifdef USE_XIM |
65 | refcache<rxvt_xim> xims; |
71 | refcache<rxvt_xim> xims; |
66 | vector<im_watcher *> imw; |
72 | vector<im_watcher *> imw; |
67 | |
73 | |
68 | void im_change_cb (); |
74 | void im_change_cb (); |
|
|
75 | void im_change_check (); |
69 | #endif |
76 | #endif |
70 | |
77 | |
71 | //public |
78 | //public |
72 | Display *display; |
79 | Display *display; |
73 | int depth; |
80 | int depth; |
74 | int screen; |
81 | int screen; |
75 | Visual *visual; |
82 | Visual *visual; |
76 | Colormap cmap; |
83 | Colormap cmap; |
77 | Window root; |
84 | Window root; |
78 | rxvt_term *selection_owner; |
85 | rxvt_term *selection_owner; |
79 | #ifndef NO_SLOW_LINK_SUPPORT |
86 | #ifndef NO_SLOW_LINK_SUPPORT |
80 | bool is_local; |
87 | bool is_local; |
|
|
88 | #endif |
|
|
89 | #ifdef POINTER_BLANK |
|
|
90 | Cursor blank_cursor; |
81 | #endif |
91 | #endif |
82 | |
92 | |
83 | rxvt_display (const char *id); |
93 | rxvt_display (const char *id); |
84 | bool init (); |
94 | bool init (); |
85 | ~rxvt_display (); |
95 | ~rxvt_display (); |
86 | |
96 | |
|
|
97 | operator Display *() const { return display; } |
|
|
98 | |
87 | void flush (); |
99 | void flush (); |
88 | |
100 | Atom atom (const char *name); |
89 | void set_selection_owner (rxvt_term *owner); |
101 | void set_selection_owner (rxvt_term *owner); |
90 | |
102 | |
91 | void reg (xevent_watcher *w); |
103 | void reg (xevent_watcher *w); |
92 | void unreg (xevent_watcher *w); |
104 | void unreg (xevent_watcher *w); |
93 | |
105 | |
… | |
… | |
96 | void unreg (im_watcher *w); |
108 | void unreg (im_watcher *w); |
97 | |
109 | |
98 | rxvt_xim *get_xim (const char *locale, const char *modifiers); |
110 | rxvt_xim *get_xim (const char *locale, const char *modifiers); |
99 | void put_xim (rxvt_xim *xim); |
111 | void put_xim (rxvt_xim *xim); |
100 | #endif |
112 | #endif |
101 | |
|
|
102 | Atom atom (const char *name); |
|
|
103 | }; |
113 | }; |
104 | |
114 | |
105 | #ifdef USE_XIM |
115 | #ifdef USE_XIM |
106 | struct im_watcher : watcher, callback0<void> { |
116 | struct im_watcher : watcher, callback0<void> { |
107 | template<class O1, class O2> |
117 | template<class O1, class O2> |
… | |
… | |
161 | |
171 | |
162 | bool set (rxvt_display *display, Pixel p); |
172 | bool set (rxvt_display *display, Pixel p); |
163 | bool set (rxvt_display *display, const char *name); |
173 | bool set (rxvt_display *display, const char *name); |
164 | bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb); |
174 | bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb); |
165 | |
175 | |
166 | rxvt_color fade (rxvt_display *, int percent); |
176 | rxvt_color fade (rxvt_display *, int percent); // fades to black |
|
|
177 | rxvt_color fade (rxvt_display *, int percent, rxvt_color &fadeto); |
167 | |
178 | |
168 | void free (rxvt_display *display); |
179 | void free (rxvt_display *display); |
169 | }; |
180 | }; |
170 | |
181 | |
171 | #endif |
182 | #endif |