… | |
… | |
95 | { |
95 | { |
96 | rxvt_color rc; |
96 | rxvt_color rc; |
97 | rc.set (s, SvPVbyte_nolen (sv)); |
97 | rc.set (s, SvPVbyte_nolen (sv)); |
98 | rc.get (c); |
98 | rc.get (c); |
99 | } |
99 | } |
|
|
100 | else |
|
|
101 | croak ("unable to parse colour,"); |
100 | |
102 | |
101 | return c; |
103 | return c; |
102 | } |
104 | } |
103 | |
105 | |
104 | ///////////////////////////////////////////////////////////////////////////// |
106 | ///////////////////////////////////////////////////////////////////////////// |
… | |
… | |
2094 | PUSHs (sv_2mortal (newSViv (border ? THIS->vt_height : THIS->szHint.height))); |
2096 | PUSHs (sv_2mortal (newSViv (border ? THIS->vt_height : THIS->szHint.height))); |
2095 | |
2097 | |
2096 | #if HAVE_IMG |
2098 | #if HAVE_IMG |
2097 | |
2099 | |
2098 | rxvt_img * |
2100 | rxvt_img * |
2099 | rxvt_term::new_img (SV *format, int width = 1, int height = 1) |
2101 | rxvt_term::new_img (SV *format, int x = 0, int y = 0, int width = 1, int height = 1) |
2100 | CODE: |
2102 | CODE: |
2101 | XRenderPictFormat *f = SvOK (format) |
2103 | XRenderPictFormat *f = SvOK (format) |
2102 | ? XRenderFindStandardFormat (THIS->dpy, SvIV (format)) |
2104 | ? XRenderFindStandardFormat (THIS->dpy, SvIV (format)) |
2103 | : XRenderFindVisualFormat (THIS->dpy, THIS->visual); |
2105 | : XRenderFindVisualFormat (THIS->dpy, THIS->visual); |
2104 | RETVAL = new rxvt_img (THIS, f, 0, 0, width, height); |
2106 | RETVAL = new rxvt_img (THIS, f, x, y, width, height); |
2105 | RETVAL->alloc (); |
2107 | RETVAL->alloc (); |
2106 | OUTPUT: |
2108 | OUTPUT: |
2107 | RETVAL |
2109 | RETVAL |
2108 | |
2110 | |
2109 | #if ENABLE_TRANSPARENCY |
2111 | #if ENABLE_TRANSPARENCY |
… | |
… | |
2209 | |
2211 | |
2210 | #if HAVE_IMG |
2212 | #if HAVE_IMG |
2211 | |
2213 | |
2212 | # rxvt_img *new (rxvt_screen *screen, XRenderPictFormat *format, int width, int height) |
2214 | # rxvt_img *new (rxvt_screen *screen, XRenderPictFormat *format, int width, int height) |
2213 | # rxvt_img *rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); |
2215 | # rxvt_img *rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); |
|
|
2216 | |
|
|
2217 | void |
|
|
2218 | rxvt_img::geometry () |
|
|
2219 | PPCODE: |
|
|
2220 | EXTEND (SP, 4); |
|
|
2221 | PUSHs (sv_2mortal (newSViv (THIS->x))); |
|
|
2222 | PUSHs (sv_2mortal (newSViv (THIS->y))); |
|
|
2223 | PUSHs (sv_2mortal (newSViv (THIS->w))); |
|
|
2224 | PUSHs (sv_2mortal (newSViv (THIS->h))); |
|
|
2225 | |
|
|
2226 | int |
|
|
2227 | rxvt_img::x () |
|
|
2228 | CODE: |
|
|
2229 | RETVAL = THIS->x; |
|
|
2230 | OUTPUT: |
|
|
2231 | RETVAL |
|
|
2232 | |
|
|
2233 | int |
|
|
2234 | rxvt_img::y () |
|
|
2235 | CODE: |
|
|
2236 | RETVAL = THIS->y; |
|
|
2237 | OUTPUT: |
|
|
2238 | RETVAL |
2214 | |
2239 | |
2215 | int |
2240 | int |
2216 | rxvt_img::w () |
2241 | rxvt_img::w () |
2217 | CODE: |
2242 | CODE: |
2218 | RETVAL = THIS->w; |
2243 | RETVAL = THIS->w; |