… | |
… | |
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); |
21 | static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap |
22 | static rxvt_img *new_from_root (rxvt_screen *s); // get root pixmap |
22 | static rxvt_img *new_from_file (const char *filename); // from pixbuf |
23 | static rxvt_img *new_from_file (rxvt_screen *s, const char *filename); // from pixbuf |
23 | |
24 | |
24 | ~rxvt_img (); |
25 | ~rxvt_img (); |
25 | |
26 | |
26 | Pixmap steal () |
27 | Pixmap steal () |
27 | { |
28 | { |
28 | Pixmap res = pm; |
29 | shared = true; |
29 | pm = 0; |
|
|
30 | return res; |
30 | return pm; |
31 | } |
31 | } |
32 | |
32 | |
33 | // inplace |
33 | // inplace |
34 | void fill (const rxvt_color &c); |
34 | void fill (const rxvt_color &c); |
35 | void blur (int rh, int rv); |
35 | void blur (int rh, int rv); |