… | |
… | |
105 | } |
105 | } |
106 | }; |
106 | }; |
107 | |
107 | |
108 | ///////////////////////////////////////////////////////////////////////////// |
108 | ///////////////////////////////////////////////////////////////////////////// |
109 | |
109 | |
|
|
110 | struct rxvt_screen; |
|
|
111 | |
|
|
112 | struct rxvt_drawable { |
|
|
113 | rxvt_screen *screen; |
|
|
114 | Drawable drawable; |
|
|
115 | operator Drawable() { return drawable; } |
|
|
116 | |
|
|
117 | #if XFT |
|
|
118 | XftDraw *xftdrawable; |
|
|
119 | operator XftDraw *(); |
|
|
120 | #endif |
|
|
121 | |
|
|
122 | rxvt_drawable (rxvt_screen *screen, Drawable drawable) |
|
|
123 | : screen(screen), |
|
|
124 | #if XFT |
|
|
125 | xftdrawable(0), |
|
|
126 | #endif |
|
|
127 | drawable(drawable) |
|
|
128 | { } |
|
|
129 | |
|
|
130 | #if XFT |
|
|
131 | ~rxvt_drawable (); |
|
|
132 | #endif |
|
|
133 | }; |
|
|
134 | |
|
|
135 | ///////////////////////////////////////////////////////////////////////////// |
|
|
136 | |
110 | #ifdef USE_XIM |
137 | #ifdef USE_XIM |
111 | struct rxvt_xim : refcounted { |
138 | struct rxvt_xim : refcounted { |
112 | void destroy (); |
139 | void destroy (); |
113 | rxvt_display *display; |
140 | rxvt_display *display; |
114 | |
141 | |
… | |
… | |
121 | }; |
148 | }; |
122 | #endif |
149 | #endif |
123 | |
150 | |
124 | struct rxvt_screen { |
151 | struct rxvt_screen { |
125 | rxvt_display *display; |
152 | rxvt_display *display; |
126 | Display *xdisp; |
153 | Display *dpy; |
127 | int depth; |
154 | int depth; |
128 | Visual *visual; |
155 | Visual *visual; |
129 | Colormap cmap; |
156 | Colormap cmap; |
130 | |
157 | |
|
|
158 | #if XFT |
|
|
159 | // scratch pixmap |
|
|
160 | rxvt_drawable *scratch_area; |
|
|
161 | int scratch_w, scratch_h; |
|
|
162 | |
|
|
163 | rxvt_drawable &scratch_drawable (int w, int h); |
|
|
164 | |
|
|
165 | rxvt_screen (); |
|
|
166 | #endif |
|
|
167 | |
131 | void set (rxvt_display *disp); |
168 | void set (rxvt_display *disp); |
132 | void set (rxvt_display *disp, int bitdepth); |
169 | void set (rxvt_display *disp, int bitdepth); |
133 | void clear (); |
170 | void clear (); |
134 | }; |
171 | }; |
135 | |
172 | |
… | |
… | |
145 | void im_change_cb (); |
182 | void im_change_cb (); |
146 | void im_change_check (); |
183 | void im_change_check (); |
147 | #endif |
184 | #endif |
148 | |
185 | |
149 | //public |
186 | //public |
150 | Display *display; |
187 | Display *dpy; |
151 | int screen; |
188 | int screen; |
152 | Window root; |
189 | Window root; |
153 | rxvt_term *selection_owner; |
190 | rxvt_term *selection_owner; |
154 | Atom xa[NUM_XA]; |
191 | Atom xa[NUM_XA]; |
155 | #ifndef NO_SLOW_LINK_SUPPORT |
192 | #ifndef NO_SLOW_LINK_SUPPORT |
… | |
… | |
158 | #ifdef POINTER_BLANK |
195 | #ifdef POINTER_BLANK |
159 | Cursor blank_cursor; |
196 | Cursor blank_cursor; |
160 | #endif |
197 | #endif |
161 | |
198 | |
162 | rxvt_display (const char *id); |
199 | rxvt_display (const char *id); |
163 | XrmDatabase get_resources (); |
200 | XrmDatabase get_resources (bool refresh); |
164 | bool ref_init (); |
201 | bool ref_init (); |
165 | void ref_next (); |
202 | void ref_next (); |
166 | ~rxvt_display (); |
203 | ~rxvt_display (); |
167 | |
204 | |
168 | void flush (); |
205 | void flush (); |
… | |
… | |
250 | bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); } |
287 | bool operator != (const rxvt_color &b) const { return Pixel (*this) != Pixel (b); } |
251 | |
288 | |
252 | bool alloc (rxvt_screen *screen, const rgba &color); |
289 | bool alloc (rxvt_screen *screen, const rgba &color); |
253 | void free (rxvt_screen *screen); |
290 | void free (rxvt_screen *screen); |
254 | |
291 | |
255 | void get (rxvt_screen *screen, rgba &color); |
292 | void get (rgba &color); |
|
|
293 | void get (XColor &color); |
256 | |
294 | |
257 | bool set (rxvt_screen *screen, const char *name); |
295 | bool set (rxvt_screen *screen, const char *name); |
258 | bool set (rxvt_screen *screen, const rgba &color); |
296 | bool set (rxvt_screen *screen, const rgba &color); |
259 | |
297 | |
260 | void fade (rxvt_screen *screen, int percent, rxvt_color &result, const rgba &to = rgba (0, 0, 0)); |
298 | void fade (rxvt_screen *screen, int percent, rxvt_color &result, const rgba &to = rgba (0, 0, 0)); |