… | |
… | |
13 | { |
13 | { |
14 | rxvt_screen *s; |
14 | rxvt_screen *s; |
15 | Pixmap pm; |
15 | Pixmap pm; |
16 | int w, h; |
16 | int w, h; |
17 | XRenderPictFormat *format; |
17 | XRenderPictFormat *format; |
|
|
18 | bool shared; // true if we don't own it |
18 | |
19 | |
19 | rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height); |
20 | rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height); |
20 | rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); |
21 | rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); |
|
|
22 | static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap |
|
|
23 | static rxvt_img *new_from_file (rxvt_screen *s, const char *filename); // from pixbuf |
|
|
24 | |
21 | ~rxvt_img (); |
25 | ~rxvt_img (); |
22 | |
26 | |
23 | Pixmap steal () |
27 | Pixmap steal () |
24 | { |
28 | { |
25 | Pixmap res = pm; |
29 | shared = true; |
26 | pm = 0; |
|
|
27 | return res; |
30 | return pm; |
28 | } |
31 | } |
29 | |
32 | |
30 | // inplace |
33 | // inplace |
31 | void fill (const rxvt_color &c); |
34 | void fill (const rxvt_color &c); |
32 | void blur (int rh, int rv); |
35 | void blur (int rh, int rv); |