ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.198 by root, Thu Jun 14 18:59:39 2012 UTC vs.
Revision 1.201 by sf-exg, Fri Jun 29 13:41:43 2012 UTC

2155 PUSHs (sv_2mortal (newSViv (border ? THIS->vt_height : THIS->szHint.height))); 2155 PUSHs (sv_2mortal (newSViv (border ? THIS->vt_height : THIS->szHint.height)));
2156 2156
2157#if HAVE_IMG 2157#if HAVE_IMG
2158 2158
2159rxvt_img * 2159rxvt_img *
2160rxvt_term::new_img (SV *format, int x = 0, int y = 0, int width = 1, int height = 1) 2160rxvt_term::new_img (SV *format = &PL_sv_undef, int x = 0, int y = 0, int width = 1, int height = 1)
2161 CODE: 2161 CODE:
2162 XRenderPictFormat *f = SvOK (format) 2162 XRenderPictFormat *f = SvOK (format)
2163 ? XRenderFindStandardFormat (THIS->dpy, SvIV (format)) 2163 ? XRenderFindStandardFormat (THIS->dpy, SvIV (format))
2164 : XRenderFindVisualFormat (THIS->dpy, THIS->visual); 2164 : XRenderFindVisualFormat (THIS->dpy, THIS->visual);
2165 RETVAL = new rxvt_img (THIS, f, x, y, width, height); 2165 RETVAL = new rxvt_img (THIS, f, x, y, width, height);
2260 C_ARGS: filename, 0 2260 C_ARGS: filename, 0
2261 2261
2262void 2262void
2263DESTROY (urxvt::pixbuf self) 2263DESTROY (urxvt::pixbuf self)
2264 CODE: 2264 CODE:
2265 gdk_pixbuf_unref (self); 2265 g_object_unref (self);
2266 2266
2267#endif 2267#endif
2268 2268
2269MODULE = urxvt PACKAGE = urxvt::img 2269MODULE = urxvt PACKAGE = urxvt::img
2270 2270
2282 PUSHs (sv_2mortal (newSViv (THIS->w))); 2282 PUSHs (sv_2mortal (newSViv (THIS->w)));
2283 PUSHs (sv_2mortal (newSViv (THIS->h))); 2283 PUSHs (sv_2mortal (newSViv (THIS->h)));
2284 2284
2285int 2285int
2286rxvt_img::x () 2286rxvt_img::x ()
2287 ALIAS:
2288 x = 0
2289 y = 1
2290 w = 2
2291 h = 3
2287 CODE: 2292 CODE:
2288 RETVAL = THIS->x; 2293 switch (ix)
2289 OUTPUT: 2294 {
2290 RETVAL 2295 case 0: RETVAL = THIS->x; break;
2291 2296 case 1: RETVAL = THIS->y; break;
2292int 2297 case 2: RETVAL = THIS->w; break;
2293rxvt_img::y () 2298 case 3: RETVAL = THIS->h; break;
2294 CODE: 2299 }
2295 RETVAL = THIS->y;
2296 OUTPUT:
2297 RETVAL
2298
2299int
2300rxvt_img::w ()
2301 CODE:
2302 RETVAL = THIS->w;
2303 OUTPUT:
2304 RETVAL
2305
2306int
2307rxvt_img::h ()
2308 CODE:
2309 RETVAL = THIS->h;
2310 OUTPUT: 2300 OUTPUT:
2311 RETVAL 2301 RETVAL
2312 2302
2313Pixmap 2303Pixmap
2314rxvt_img::pm () 2304rxvt_img::pm ()
2327rxvt_img::DESTROY () 2317rxvt_img::DESTROY ()
2328 CODE: 2318 CODE:
2329 delete THIS; 2319 delete THIS;
2330 2320
2331void 2321void
2322rxvt_img::add_alpha ()
2323
2324void
2332rxvt_img::unshare () 2325rxvt_img::unshare ()
2333 2326
2334int 2327void
2335rxvt_img::repeat_mode (render_repeat_mode repeat = 0) 2328rxvt_img::repeat_mode (render_repeat_mode repeat = 0)
2336 CODE: 2329 PPCODE:
2337 if (items >= 2) 2330 if (items >= 2)
2338 THIS->repeat_mode (repeat); 2331 THIS->repeat_mode (repeat);
2339 if (GIMME_V != G_VOID) 2332 if (GIMME_V != G_VOID)
2340 XPUSHs (sv_2mortal (newSViv (THIS->repeat))); 2333 XPUSHs (sv_2mortal (newSViv (THIS->repeat)));
2341 2334
2345void 2338void
2346rxvt_img::brightness (rxvt_img::nv r, rxvt_img::nv g, rxvt_img::nv b, rxvt_img::nv a = 1.) 2339rxvt_img::brightness (rxvt_img::nv r, rxvt_img::nv g, rxvt_img::nv b, rxvt_img::nv a = 1.)
2347 2340
2348void 2341void
2349rxvt_img::contrast (rxvt_img::nv r, rxvt_img::nv g, rxvt_img::nv b, rxvt_img::nv a = 1.) 2342rxvt_img::contrast (rxvt_img::nv r, rxvt_img::nv g, rxvt_img::nv b, rxvt_img::nv a = 1.)
2343
2344void
2345rxvt_img::draw (rxvt_img *img, int op = PictOpOver, rxvt_img::nv mask = 1.);
2350 2346
2351rxvt_img * 2347rxvt_img *
2352rxvt_img::clone () 2348rxvt_img::clone ()
2353 2349
2354rxvt_img * 2350rxvt_img *
2374rxvt_img::scale (int new_width, int new_height) 2370rxvt_img::scale (int new_width, int new_height)
2375 2371
2376rxvt_img * 2372rxvt_img *
2377rxvt_img::rotate (int x, int y, rxvt_img::nv phi) 2373rxvt_img::rotate (int x, int y, rxvt_img::nv phi)
2378 2374
2375void
2376rxvt_img::tint (SV *c)
2377 INIT:
2378 rgba cc = parse_rgba (c, THIS->s);
2379 C_ARGS: cc
2380
2381rxvt_img *
2382rxvt_img::filter (octet_string name, SV *params = &PL_sv_undef)
2383 CODE:
2384 rxvt_img::nv *vparams = 0;
2385 int nparams = 0;
2386
2387 if (SvOK (params))
2388 {
2389 // we overlay rxvt_temp_buf, what a hack
2390 assert (sizeof (rxvt_img::nv) >= sizeof (int));
2391
2392 if (!SvROK (params) || SvTYPE (SvRV (params)) != SVt_PVAV)
2393 croak ("rxvt_img::filter: params must be an array reference with parameter values");
2394
2395 nparams = av_len ((AV *)SvRV (params)) + 1;
2396 vparams = rxvt_temp_buf<rxvt_img::nv> (nparams);
2397
2398 for (int i = 0; i < nparams; ++i)
2399 vparams [i] = SvNV (*av_fetch ((AV *)SvRV (params), i, 1));
2400 }
2401
2402 RETVAL = THIS->filter (name, nparams, vparams);
2403 OUTPUT:
2404 RETVAL
2405
2379#endif 2406#endif
2380 2407

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines