… | |
… | |
2042 | PUSHs (sv_2mortal (newSViv (THIS->szHint.width))); |
2042 | PUSHs (sv_2mortal (newSViv (THIS->szHint.width))); |
2043 | PUSHs (sv_2mortal (newSViv (THIS->szHint.height))); |
2043 | PUSHs (sv_2mortal (newSViv (THIS->szHint.height))); |
2044 | |
2044 | |
2045 | #if HAVE_IMG |
2045 | #if HAVE_IMG |
2046 | |
2046 | |
|
|
2047 | #if 0 |
|
|
2048 | |
2047 | rxvt_img * |
2049 | rxvt_img * |
2048 | rxvt_term::new_img (SV *format, int width, int height) |
2050 | rxvt_term::new_img (SV *format, int width, int height) |
2049 | CODE: |
2051 | CODE: |
2050 | XRenderPictFormat *f = SvOK (format) |
2052 | XRenderPictFormat *f = SvOK (format) |
2051 | ? XRenderFindStandardFormat (THIS->dpy, SvIV (format)) |
2053 | ? XRenderFindStandardFormat (THIS->dpy, SvIV (format)) |
2052 | : XRenderFindVisualFormat (THIS->dpy, THIS->visual); |
2054 | : XRenderFindVisualFormat (THIS->dpy, THIS->visual); |
2053 | RETVAL = new rxvt_img (THIS, f, width, height); |
2055 | RETVAL = new rxvt_img (THIS, f, width, height); |
2054 | OUTPUT: |
2056 | OUTPUT: |
2055 | RETVAL |
2057 | RETVAL |
2056 | |
2058 | |
|
|
2059 | #endif |
|
|
2060 | |
2057 | #if ENABLE_TRANSPARENCY |
2061 | #if ENABLE_TRANSPARENCY |
2058 | |
2062 | |
2059 | rxvt_img * |
2063 | rxvt_img * |
2060 | rxvt_term::new_img_from_root () |
2064 | rxvt_term::new_img_from_root () |
2061 | CODE: |
2065 | CODE: |
… | |
… | |
2088 | void |
2092 | void |
2089 | rxvt_term::set_background (rxvt_img *img) |
2093 | rxvt_term::set_background (rxvt_img *img) |
2090 | CODE: |
2094 | CODE: |
2091 | THIS->bg_destroy (); |
2095 | THIS->bg_destroy (); |
2092 | THIS->bg_pixmap = None; |
2096 | THIS->bg_pixmap = None; |
2093 | THIS->bg_flags &= ~rxvt_term::BG_NEEDS_REFRESH; |
2097 | THIS->bg_flags &= ~(rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER); |
2094 | |
2098 | |
2095 | if (img) // TODO: cannot be false |
2099 | if (img) // TODO: cannot be false |
2096 | { |
2100 | { |
2097 | XRenderPictFormat *f = XRenderFindVisualFormat (THIS->dpy, THIS->visual); |
|
|
2098 | rxvt_img *img2 = 0; |
|
|
2099 | rxvt_img *img3 = 0; |
|
|
2100 | |
|
|
2101 | if (f != img->format) |
|
|
2102 | img = img2 = img->convert_to (f, THIS->pix_colors [Color_bg]); |
|
|
2103 | |
|
|
2104 | img->unshare (); |
2101 | img = img->reify (); |
|
|
2102 | rxvt_img *img2 = img->convert_to (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]); |
|
|
2103 | delete img; |
2105 | THIS->bg_pixmap = img->steal (); |
2104 | THIS->bg_pixmap = img2->steal (); |
2106 | THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH; |
2105 | THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; |
2107 | THIS->bg_valid_since = ev::now (); // TODO: extra bloat |
2106 | THIS->bg_valid_since = ev::now (); // TODO: extra bloat |
2108 | |
|
|
2109 | delete img2; |
|
|
2110 | } |
2107 | } |
2111 | |
2108 | |
2112 | #endif |
2109 | #endif |
2113 | |
2110 | |
2114 | #endif |
2111 | #endif |
… | |
… | |
2163 | |
2160 | |
2164 | int |
2161 | int |
2165 | rxvt_img::h () |
2162 | rxvt_img::h () |
2166 | CODE: |
2163 | CODE: |
2167 | RETVAL = THIS->h; |
2164 | RETVAL = THIS->h; |
2168 | OUTPUT: |
|
|
2169 | RETVAL |
|
|
2170 | |
|
|
2171 | bool |
|
|
2172 | rxvt_img::shared () |
|
|
2173 | CODE: |
|
|
2174 | RETVAL = THIS->shared; |
|
|
2175 | OUTPUT: |
2165 | OUTPUT: |
2176 | RETVAL |
2166 | RETVAL |
2177 | |
2167 | |
2178 | Pixmap |
2168 | Pixmap |
2179 | rxvt_img::pm () |
2169 | rxvt_img::pm () |
… | |
… | |
2209 | void |
2199 | void |
2210 | rxvt_img::contrast (NV r, NV g, NV b, NV a = 1.) |
2200 | rxvt_img::contrast (NV r, NV g, NV b, NV a = 1.) |
2211 | |
2201 | |
2212 | rxvt_img * |
2202 | rxvt_img * |
2213 | rxvt_img::clone () |
2203 | rxvt_img::clone () |
|
|
2204 | |
|
|
2205 | rxvt_img * |
|
|
2206 | rxvt_img::reify () |
2214 | |
2207 | |
2215 | rxvt_img * |
2208 | rxvt_img * |
2216 | rxvt_img::sub_rect (int x, int y, int width, int height) |
2209 | rxvt_img::sub_rect (int x, int y, int width, int height) |
2217 | |
2210 | |
2218 | rxvt_img * |
2211 | rxvt_img * |