… | |
… | |
173 | #endif |
173 | #endif |
174 | |
174 | |
175 | #if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY) |
175 | #if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY) |
176 | # define HAVE_BG_PIXMAP 1/* to simplify further usage */ |
176 | # define HAVE_BG_PIXMAP 1/* to simplify further usage */ |
177 | struct bgPixmap_t { |
177 | struct bgPixmap_t { |
|
|
178 | |
|
|
179 | enum { |
|
|
180 | geometrySet = (1UL<<0), |
|
|
181 | propScale = (1UL<<1), |
|
|
182 | geometryFlags = (geometrySet|propScale), |
|
|
183 | |
|
|
184 | tintSet = (1UL<<8), |
|
|
185 | tintNeeded = (1UL<<9), |
|
|
186 | tintServerSide = (1UL<<10), |
|
|
187 | tintFlags = (tintSet|tintServerSide|tintNeeded), |
|
|
188 | |
|
|
189 | isTransparent = (1UL<<16) |
|
|
190 | }; |
|
|
191 | |
|
|
192 | unsigned long flags; |
|
|
193 | |
178 | # ifdef XPM_BACKGROUND |
194 | # ifdef XPM_BACKGROUND |
179 | |
|
|
180 | # ifdef HAVE_AFTERIMAGE |
195 | # ifdef HAVE_AFTERIMAGE |
181 | ASImage *original_asim; |
196 | ASImage *original_asim; |
|
|
197 | bool render_asim (ASImage *background, ARGB32 background_tint); |
182 | # endif |
198 | # endif |
183 | |
199 | |
184 | #define bgPmap_defaultScale 100 |
200 | enum { defaultScale = 100, defaultAlign = 50 }; |
185 | #define bgPmap_defaultAlign 50 |
201 | |
186 | unsigned int h_scale, v_scale;/* percents of the window size */ |
202 | unsigned int h_scale, v_scale;/* percents of the window size */ |
187 | int h_align, v_align; /* percents of the window size: |
203 | int h_align, v_align; /* percents of the window size: |
188 | 0 - left align, 50 - center, 100 - right */ |
204 | 0 - left align, 50 - center, 100 - right */ |
189 | |
205 | void unset_geometry () { flags = flags & ~geometryFlags; }; |
190 | bool handle_geometry (const char *geom); |
206 | bool set_geometry (const char *geom); |
|
|
207 | void set_defaultGeometry () |
|
|
208 | { |
|
|
209 | h_scale = v_scale = defaultScale; |
|
|
210 | h_align = v_align = defaultAlign; |
|
|
211 | flags |= geometrySet; |
|
|
212 | }; |
191 | |
213 | |
|
|
214 | bool set_file (const char *file); |
|
|
215 | # endif /* XPM_BACKGROUND */ |
|
|
216 | |
|
|
217 | rxvt_term *target; |
|
|
218 | bool set_target (rxvt_term *new_target); |
|
|
219 | |
|
|
220 | # ifdef ENABLE_TRANSPARENCY |
|
|
221 | int root_depth; /* obtained when target is set */ |
|
|
222 | Pixmap root_pixmap; /* current root pixmap set */ |
|
|
223 | rxvt_color tint; |
|
|
224 | int shade; |
|
|
225 | int h_blurRadius, v_blurRadius; |
|
|
226 | |
|
|
227 | bool set_transparent (); |
|
|
228 | bool set_blur_radius (const char *geom); |
|
|
229 | bool set_tint (rxvt_color &new_tint); |
|
|
230 | bool unset_tint (); |
|
|
231 | bool set_shade (const char *shade_str); |
|
|
232 | bool set_root_pixmap (); |
|
|
233 | bool make_transparency_pixmap (); |
192 | # endif |
234 | # endif |
193 | |
|
|
194 | # define bgPmap_geometrySet (1UL<<0) |
|
|
195 | # define bgPmap_propScale (1UL<<1) |
|
|
196 | # define bgPmap_geometryFlags (bgPmap_geometrySet|bgPmap_propScale) |
|
|
197 | |
|
|
198 | # define bgPmap_Transparent (1UL<<16) |
|
|
199 | unsigned long flags; |
|
|
200 | |
235 | |
201 | Pixmap pixmap; |
236 | Pixmap pixmap; |
202 | unsigned int pmap_width, pmap_height; |
237 | unsigned int pmap_width, pmap_height; |
203 | unsigned int pmap_depth; |
238 | unsigned int pmap_depth; |
204 | |
239 | |
205 | bool window_size_sensitive(); |
240 | bool window_size_sensitive (); |
|
|
241 | void apply_background (); |
|
|
242 | bool render_background (); |
206 | |
243 | |
207 | }; |
244 | }; |
208 | #else |
245 | #else |
209 | # undef HAVE_BG_PIXMAP |
246 | # undef HAVE_BG_PIXMAP |
210 | #endif |
247 | #endif |
… | |
… | |
1459 | void get_options (int argc, const char *const *argv); |
1496 | void get_options (int argc, const char *const *argv); |
1460 | int parse_keysym (const char *str, const char *arg); |
1497 | int parse_keysym (const char *str, const char *arg); |
1461 | void get_xdefaults (FILE *stream, const char *name); |
1498 | void get_xdefaults (FILE *stream, const char *name); |
1462 | void extract_resources (); |
1499 | void extract_resources (); |
1463 | // xpm.C |
1500 | // xpm.C |
1464 | //int scale_pixmap (const char *geom); |
1501 | void get_window_origin (int &x, int &y); |
1465 | void resize_pixmap (); |
1502 | Pixmap get_pixmap_property (int prop_id); |
1466 | void set_bgPixmap (const char *file); |
|
|
1467 | }; |
1503 | }; |
1468 | |
1504 | |
1469 | /* |
1505 | /* |
1470 | ***************************************************************************** |
1506 | ***************************************************************************** |
1471 | * PROTOTYPES |
1507 | * PROTOTYPES |