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