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.128 by root, Sat Dec 26 09:42:16 2009 UTC vs.
Revision 1.173 by root, Wed Jun 6 11:46:11 2012 UTC

1/*----------------------------------------------------------------------* 1/*----------------------------------------------------------------------*
2 * File: rxvtperl.xs 2 * File: rxvtperl.xs
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * 4 *
5 * All portions of code are copyright by their respective author/s. 5 * All portions of code are copyright by their respective author/s.
6 * Copyright (c) 2005-2008 Marc Lehmann <pcg@goof.com> 6 * Copyright (c) 2005-2008,2011 Marc Lehmann <schmorp@schmorp.de>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
23#define line_t perl_line_t 23#define line_t perl_line_t
24#include <EXTERN.h> 24#include <EXTERN.h>
25#include <perl.h> 25#include <perl.h>
26#include <XSUB.h> 26#include <XSUB.h>
27#undef line_t 27#undef line_t
28#undef bool // perl defines it's own bool type, except with g++... what a trap
28 29
29#include "../config.h" 30#include "../config.h"
30 31
31#include <cstddef> 32#include <stddef.h>
32#include <cstdarg> 33#include <stdarg.h>
33 34
34#include "unistd.h" 35#include "unistd.h"
35 36
36#include "ev_cpp.h" 37#include "ev_cpp.h"
37#include "rxvt.h" 38#include "rxvt.h"
45 46
46#undef LINENO 47#undef LINENO
47#define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) 48#define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows)
48#undef ROW 49#undef ROW
49#define ROW(n) THIS->row_buf [LINENO (n)] 50#define ROW(n) THIS->row_buf [LINENO (n)]
51
52/////////////////////////////////////////////////////////////////////////////
53
54typedef char * octet_string;
55typedef char * utf8_string;
56
57typedef int render_repeat_mode;
58
59typedef GdkPixbuf * urxvt__pixbuf;
60typedef rxvt_img * urxvt__img;
61
62/////////////////////////////////////////////////////////////////////////////
63
64static void
65parse_color (rxvt_screen *s, rxvt_color &c, SV *sv)
66{
67 //TODO: support component stuff
68 c.set (s, SvPVbyte_nolen (sv));
69}
50 70
51///////////////////////////////////////////////////////////////////////////// 71/////////////////////////////////////////////////////////////////////////////
52 72
53static wchar_t * 73static wchar_t *
54sv2wcs (SV *sv) 74sv2wcs (SV *sv)
302 THIS->refresh_check (); 322 THIS->refresh_check ();
303} 323}
304 324
305///////////////////////////////////////////////////////////////////////////// 325/////////////////////////////////////////////////////////////////////////////
306 326
307#define IOM_CLASS "urxvt"
308#define IOM_WARN rxvt_warn
309#include "iom_perl.h" 327#include "iom_perl.h"
310 328
311///////////////////////////////////////////////////////////////////////////// 329/////////////////////////////////////////////////////////////////////////////
312 330
313struct rxvt_perl_interp rxvt_perl; 331struct rxvt_perl_interp rxvt_perl;
329{ 347{
330 if (!perl) 348 if (!perl)
331 { 349 {
332 rxvt_push_locale (""); // perl init destroys current locale 350 rxvt_push_locale (""); // perl init destroys current locale
333 351
352 {
334 perl_environ = rxvt_environ; 353 perl_environ = rxvt_environ;
335 swap (perl_environ, environ); 354 localise_env set_environ (perl_environ);
336 355
337 char *args[] = { 356 char *args[] = {
338 "", 357 "",
339 "-e" 358 "-e"
340 "BEGIN {" 359 "BEGIN {"
341 " urxvt->bootstrap;" 360 " urxvt->bootstrap;"
342 " unshift @INC, '" LIBDIR "';" 361 " unshift @INC, '" LIBDIR "';"
343 "}" 362 "}"
344 "" 363 ""
345 "use urxvt;" 364 "use urxvt;"
346 }; 365 };
347 int argc = sizeof (args) / sizeof (args[0]); 366 int argc = ecb_array_length (args);
348 char **argv = args; 367 char **argv = args;
349 368
350 PERL_SYS_INIT3 (&argc, &argv, &environ); 369 PERL_SYS_INIT3 (&argc, &argv, &environ);
351 perl = perl_alloc (); 370 perl = perl_alloc ();
352 perl_construct (perl); 371 perl_construct (perl);
353 372
354 if (perl_parse (perl, xs_init, argc, argv, (char **)NULL) 373 if (perl_parse (perl, xs_init, argc, argv, (char **)NULL)
355 || perl_run (perl)) 374 || perl_run (perl))
356 { 375 {
357 rxvt_warn ("unable to initialize perl-interpreter, continuing without.\n"); 376 rxvt_warn ("unable to initialize perl-interpreter, continuing without.\n");
358 377
359 perl_destruct (perl); 378 perl_destruct (perl);
360 perl_free (perl); 379 perl_free (perl);
361 perl = 0; 380 perl = 0;
362 } 381 }
363 382 }
364 swap (perl_environ, environ);
365 383
366 rxvt_pop_locale (); 384 rxvt_pop_locale ();
367 } 385 }
368 386
369 if (perl) 387 if (perl)
370 { 388 {
371 // runs outside of perls ENV 389 // runs outside of perls ENV
372 term->perl.self = (void *)newSVptr ((void *)term, "urxvt::term"); 390 term->perl.self = (void *)newSVptr ((void *)term, "urxvt::term");
373 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, newRV_noinc ((SV *)newAV ()), 0); 391 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, newRV_noinc ((SV *)newAV ()), 0);
392 hv_store ((HV *)SvRV ((SV *)term->perl.self), "_selection", 10, newRV_noinc ((SV *)newAV ()), 0);
374 } 393 }
394}
395
396void
397rxvt_perl_interp::usage (rxvt_term *term, int type)
398{
399 localise_env set_environ (perl_environ);
400
401 ENTER;
402 SAVETMPS;
403
404 dSP;
405 EXTEND (SP, 2);
406 PUSHs (sv_2mortal (newSVterm (term)));
407 PUSHs (sv_2mortal (newSViv (type)));
408 PUTBACK;
409 call_pv ("urxvt::usage", G_VOID | G_DISCARD);
410
411 FREETMPS;
412 LEAVE;
413}
414
415uint8_t
416rxvt_perl_interp::parse_resource (rxvt_term *term, const char *name, bool arg, bool longopt, bool flag, const char *value)
417{
418 localise_env set_environ (perl_environ);
419
420 ENTER;
421 SAVETMPS;
422
423 dSP;
424 EXTEND (SP, 6);
425 PUSHs (sv_2mortal (newSVterm (term)));
426 PUSHs (sv_2mortal (newSVpv (name, 0)));
427 PUSHs (arg ? &PL_sv_yes : &PL_sv_no);
428 PUSHs (longopt ? &PL_sv_yes : &PL_sv_no);
429 PUSHs (flag ? &PL_sv_yes : &PL_sv_no);
430 PUSHs (value ? sv_2mortal (newSVpv (value, 0)) : &PL_sv_undef);
431 PUTBACK;
432 call_pv ("urxvt::parse_resource", G_SCALAR);
433 SPAGAIN;
434
435 uint8_t ret = POPi;
436
437 FREETMPS;
438 LEAVE;
439
440 return ret;
375} 441}
376 442
377static void 443static void
378ungrab (rxvt_term *THIS) 444ungrab (rxvt_term *THIS)
379{ 445{
389rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) 455rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...)
390{ 456{
391 if (!perl || !term->perl.self) 457 if (!perl || !term->perl.self)
392 return false; 458 return false;
393 459
460 localise_env set_environ (perl_environ);
461
394 // pre-handling of some events 462 // pre-handling of some events
395 if (htype == HOOK_REFRESH_END) 463 if (htype == HOOK_REFRESH_END)
396 { 464 {
397 AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0)); 465 AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0));
398 466
399 for (int i = 0; i <= AvFILL (av); i++) 467 for (int i = 0; i <= AvFILL (av); i++)
400 ((overlay *)SvIV (*av_fetch (av, i, 0)))->swap (); 468 ((overlay *)SvIV (*av_fetch (av, i, 0)))->swap ();
401 } 469 }
470 else if (htype == HOOK_DESTROY)
471 {
472 AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_selection", 10, 0));
402 473
403 swap (perl_environ, environ); 474 for (int i = AvFILL (av); i >= 0; i--)
475 {
476 rxvt_selection *req = (rxvt_selection *)SvIV (*av_fetch (av, i, 0));
477 delete req;
478 }
479 }
404 480
405 bool event_consumed; 481 bool event_consumed;
406 482
407 if (htype == HOOK_INIT || htype == HOOK_DESTROY // must be called always
408 || term->perl.should_invoke [htype]) 483 if (term->perl.should_invoke [htype])
409 try
410 { 484 {
411 dSP; 485 dSP;
412 va_list ap; 486 va_list ap;
413 487
414 va_start (ap, htype); 488 va_start (ap, htype);
415 489
416 ENTER; 490 ENTER;
417 SAVETMPS; 491 SAVETMPS;
418 492
419 PUSHMARK (SP); 493 PUSHMARK (SP);
420 494
495 EXTEND (SP, 2);
421 XPUSHs (sv_2mortal (newSVterm (term))); 496 PUSHs (sv_2mortal (newSVterm (term)));
422 XPUSHs (sv_2mortal (newSViv (htype))); 497 PUSHs (sv_2mortal (newSViv (htype)));
423 498
424 for (;;) { 499 for (;;) {
425 data_type dt = (data_type)va_arg (ap, int); 500 data_type dt = (data_type)va_arg (ap, int);
426 501
427 switch (dt) 502 switch (dt)
428 { 503 {
429 case DT_INT: 504 case DT_INT:
430 XPUSHs (sv_2mortal (newSViv (va_arg (ap, int)))); 505 XPUSHs (sv_2mortal (newSViv (va_arg (ap, int))));
431 break; 506 break;
432 507
433 case DT_LONG: 508 case DT_LONG:
434 XPUSHs (sv_2mortal (newSViv (va_arg (ap, long)))); 509 XPUSHs (sv_2mortal (newSViv (va_arg (ap, long))));
435 break; 510 break;
436 511
437 case DT_STR: 512 case DT_STR:
438 XPUSHs (sv_2mortal (newSVpv (va_arg (ap, char *), 0))); 513 XPUSHs (sv_2mortal (newSVpv (va_arg (ap, char *), 0)));
439 break; 514 break;
440 515
441 case DT_STR_LEN: 516 case DT_STR_LEN:
442 { 517 {
443 char *str = va_arg (ap, char *); 518 char *str = va_arg (ap, char *);
444 int len = va_arg (ap, int); 519 int len = va_arg (ap, int);
445 520
446 XPUSHs (sv_2mortal (newSVpvn (str, len))); 521 XPUSHs (sv_2mortal (newSVpvn (str, len)));
447 } 522 }
448 break; 523 break;
449 524
450 case DT_WCS_LEN: 525 case DT_WCS_LEN:
451 { 526 {
452 wchar_t *wstr = va_arg (ap, wchar_t *); 527 wchar_t *wstr = va_arg (ap, wchar_t *);
453 int wlen = va_arg (ap, int); 528 int wlen = va_arg (ap, int);
454 529
455 XPUSHs (sv_2mortal (wcs2sv (wstr, wlen))); 530 XPUSHs (sv_2mortal (wcs2sv (wstr, wlen)));
456 } 531 }
457 break; 532 break;
458 533
459 case DT_LCS_LEN: 534 case DT_LCS_LEN:
460 { 535 {
461 long *lstr = va_arg (ap, long *); 536 long *lstr = va_arg (ap, long *);
462 int llen = va_arg (ap, int); 537 int llen = va_arg (ap, int);
463 538
464 XPUSHs (sv_2mortal (newSVpvn ((char *)lstr, llen * sizeof (long)))); 539 XPUSHs (sv_2mortal (newSVpvn ((char *)lstr, llen * sizeof (long))));
465 } 540 }
466 break; 541 break;
467 542
468 case DT_XEVENT: 543 case DT_XEVENT:
469 { 544 {
470 XEvent *xe = va_arg (ap, XEvent *); 545 XEvent *xe = va_arg (ap, XEvent *);
471 HV *hv = newHV (); 546 HV *hv = newHV ();
472 547
473# define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0) 548# define set(name, sv) hv_store (hv, # name, sizeof (# name) - 1, sv, 0)
474# define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0) 549# define setiv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSViv (val), 0)
475# define setuv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSVuv (val), 0) 550# define setuv(name, val) hv_store (hv, # name, sizeof (# name) - 1, newSVuv (val), 0)
476# undef set 551# undef set
477 552
478 setiv (type, xe->type); 553 setiv (type, xe->type);
479 setiv (send_event, xe->xany.send_event); 554 setiv (send_event, xe->xany.send_event);
480 setiv (serial, xe->xany.serial); 555 setiv (serial, xe->xany.serial);
481 556
482 switch (xe->type) 557 switch (xe->type)
483 { 558 {
484 case KeyPress: 559 case KeyPress:
485 case KeyRelease: 560 case KeyRelease:
486 case ButtonPress: 561 case ButtonPress:
487 case ButtonRelease: 562 case ButtonRelease:
488 case MotionNotify: 563 case MotionNotify:
489 setuv (window, xe->xmotion.window); 564 setuv (window, xe->xmotion.window);
490 setuv (root, xe->xmotion.root); 565 setuv (root, xe->xmotion.root);
491 setuv (subwindow, xe->xmotion.subwindow); 566 setuv (subwindow, xe->xmotion.subwindow);
492 setuv (time, xe->xmotion.time); 567 setuv (time, xe->xmotion.time);
493 setiv (x, xe->xmotion.x); 568 setiv (x, xe->xmotion.x);
494 setiv (y, xe->xmotion.y); 569 setiv (y, xe->xmotion.y);
495 setiv (row, xe->xmotion.y / term->fheight + term->view_start); 570 setiv (row, xe->xmotion.y / term->fheight + term->view_start);
496 setiv (col, xe->xmotion.x / term->fwidth); 571 setiv (col, xe->xmotion.x / term->fwidth);
497 setiv (x_root, xe->xmotion.x_root); 572 setiv (x_root, xe->xmotion.x_root);
498 setiv (y_root, xe->xmotion.y_root); 573 setiv (y_root, xe->xmotion.y_root);
499 setuv (state, xe->xmotion.state); 574 setuv (state, xe->xmotion.state);
500 575
501 switch (xe->type) 576 switch (xe->type)
502 { 577 {
503 case KeyPress: 578 case KeyPress:
504 case KeyRelease: 579 case KeyRelease:
505 setuv (keycode, xe->xkey.keycode); 580 setuv (keycode, xe->xkey.keycode);
506 break; 581 break;
507 582
508 case ButtonPress: 583 case ButtonPress:
509 case ButtonRelease: 584 case ButtonRelease:
510 setuv (button, xe->xbutton.button); 585 setuv (button, xe->xbutton.button);
511 break; 586 break;
512 587
513 case MotionNotify: 588 case MotionNotify:
514 setiv (is_hint, xe->xmotion.is_hint); 589 setiv (is_hint, xe->xmotion.is_hint);
515 break; 590 break;
516 } 591 }
517 592
518 break; 593 break;
519 594
520 case MapNotify: 595 case MapNotify:
521 case UnmapNotify: 596 case UnmapNotify:
522 case ConfigureNotify: 597 case ConfigureNotify:
523 setuv (event, xe->xconfigure.event); 598 setuv (event, xe->xconfigure.event);
524 setuv (window, xe->xconfigure.window); 599 setuv (window, xe->xconfigure.window);
525 600
526 switch (xe->type) 601 switch (xe->type)
527 { 602 {
528 case ConfigureNotify: 603 case ConfigureNotify:
529 setiv (x, xe->xconfigure.x); 604 setiv (x, xe->xconfigure.x);
530 setiv (y, xe->xconfigure.y); 605 setiv (y, xe->xconfigure.y);
531 setiv (width, xe->xconfigure.width); 606 setiv (width, xe->xconfigure.width);
532 setiv (height, xe->xconfigure.height); 607 setiv (height, xe->xconfigure.height);
533 setuv (above, xe->xconfigure.above); 608 setuv (above, xe->xconfigure.above);
534 break; 609 break;
535 } 610 }
536 611
537 break; 612 break;
538 613
539 case PropertyNotify: 614 case PropertyNotify:
540 setuv (window, xe->xproperty.window); 615 setuv (window, xe->xproperty.window);
541 setuv (atom, xe->xproperty.atom); 616 setuv (atom, xe->xproperty.atom);
542 setuv (time, xe->xproperty.time); 617 setuv (time, xe->xproperty.time);
543 setiv (state, xe->xproperty.state); 618 setiv (state, xe->xproperty.state);
544 break; 619 break;
545 620
546 case ClientMessage: 621 case ClientMessage:
547 setuv (window, xe->xclient.window); 622 setuv (window, xe->xclient.window);
548 setuv (message_type, xe->xclient.message_type); 623 setuv (message_type, xe->xclient.message_type);
549 setuv (format, xe->xclient.format); 624 setuv (format, xe->xclient.format);
550 setuv (l0, xe->xclient.data.l[0]); 625 setuv (l0, xe->xclient.data.l[0]);
551 setuv (l1, xe->xclient.data.l[1]); 626 setuv (l1, xe->xclient.data.l[1]);
552 setuv (l2, xe->xclient.data.l[2]); 627 setuv (l2, xe->xclient.data.l[2]);
553 setuv (l3, xe->xclient.data.l[3]); 628 setuv (l3, xe->xclient.data.l[3]);
554 setuv (l4, xe->xclient.data.l[4]); 629 setuv (l4, xe->xclient.data.l[4]);
555 break; 630 break;
556 } 631 }
557 632
558 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); 633 XPUSHs (sv_2mortal (newRV_noinc ((SV *)hv)));
559 } 634 }
560 break; 635 break;
561 636
562 case DT_END: 637 case DT_END:
563 goto call; 638 goto call;
564 639
565 default: 640 default:
566 rxvt_fatal ("FATAL: unable to pass data type %d\n", dt); 641 rxvt_fatal ("FATAL: unable to pass data type %d\n", dt);
567 } 642 }
643 }
644
645 call:
646 va_end (ap);
647
648 PUTBACK;
649 int count = call_pv ("urxvt::invoke", G_ARRAY | G_EVAL);
650 SPAGAIN;
651
652 if (count)
653 {
654 SV *status = POPs;
655 count = SvTRUE (status);
568 } 656 }
569 657
570 call:
571 va_end (ap);
572
573 PUTBACK; 658 PUTBACK;
574 int count = call_pv ("urxvt::invoke", G_ARRAY | G_EVAL);
575 SPAGAIN;
576
577 if (count)
578 {
579 SV *status = POPs;
580 count = SvTRUE (status);
581 }
582
583 PUTBACK;
584 FREETMPS; 659 FREETMPS;
585 LEAVE; 660 LEAVE;
586 661
587 if (SvTRUE (ERRSV)) 662 if (SvTRUE (ERRSV))
588 { 663 {
589 rxvt_warn ("perl hook %d evaluation error: %s", htype, SvPV_nolen (ERRSV)); 664 rxvt_warn ("perl hook %d evaluation error: %s", htype, SvPVbyte_nolen (ERRSV));
590 ungrab (term); // better lose the grab than the session 665 ungrab (term); // better lose the grab than the session
591 } 666 }
592 667
593 event_consumed = !!count; 668 event_consumed = !!count;
594 } 669 }
595 catch (...)
596 {
597 swap (perl_environ, environ);
598 throw;
599 }
600 else 670 else
601 event_consumed = false; 671 event_consumed = false;
602 672
603 // post-handling of some events 673 // post-handling of some events
604 if (htype == HOOK_REFRESH_BEGIN) 674 if (htype == HOOK_REFRESH_BEGIN)
615 685
616 // don't allow further calls 686 // don't allow further calls
617 term->perl.self = 0; 687 term->perl.self = 0;
618 } 688 }
619 689
620 swap (perl_environ, environ);
621
622 return event_consumed; 690 return event_consumed;
691}
692
693void
694rxvt_perl_interp::selection_finish (rxvt_selection *sel, char *data, unsigned int len)
695{
696 localise_env set_environ (perl_environ);
697
698 ENTER;
699 SAVETMPS;
700
701 dSP;
702 XPUSHs (sv_2mortal (newSVpvn (data, len)));
703 PUTBACK;
704 call_sv ((SV *)sel->cb_sv, G_VOID | G_DISCARD | G_EVAL);
705
706 if (SvTRUE (ERRSV))
707 rxvt_warn ("perl selection callback evaluation error: %s", SvPVbyte_nolen (ERRSV));
708
709 FREETMPS;
710 LEAVE;
623} 711}
624 712
625///////////////////////////////////////////////////////////////////////////// 713/////////////////////////////////////////////////////////////////////////////
626 714
627MODULE = urxvt PACKAGE = urxvt 715MODULE = urxvt PACKAGE = urxvt
639# define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0)); 727# define def(sym) av_store (hookname, HOOK_ ## sym, newSVpv (# sym, 0));
640# include "hookinc.h" 728# include "hookinc.h"
641# undef def 729# undef def
642 730
643 HV *option = get_hv ("urxvt::OPTION", 1); 731 HV *option = get_hv ("urxvt::OPTION", 1);
644# define def(name,val) hv_store (option, # name, sizeof (# name) - 1, newSVuv (Opt_ ## name), 0); 732# define def(name) hv_store (option, # name, sizeof (# name) - 1, newSVuv (Opt_ ## name), 0);
645# define nodef(name) 733# define nodef(name)
646# include "optinc.h" 734# include "optinc.h"
647# undef nodef 735# undef nodef
648# undef def 736# undef def
649 737
654 } *civ, const_iv[] = { 742 } *civ, const_iv[] = {
655# define const_iv(name) { # name, (IV)name } 743# define const_iv(name) { # name, (IV)name }
656 const_iv (NUM_RESOURCES), 744 const_iv (NUM_RESOURCES),
657 const_iv (DEFAULT_RSTYLE), 745 const_iv (DEFAULT_RSTYLE),
658 const_iv (OVERLAY_RSTYLE), 746 const_iv (OVERLAY_RSTYLE),
747 const_iv (Color_Bits),
748 const_iv (RS_bgShift), const_iv (RS_bgMask),
749 const_iv (RS_fgShift), const_iv (RS_fgMask),
750 const_iv (RS_Careful),
751 const_iv (RS_fontCount),
752 const_iv (RS_fontShift),
753 const_iv (RS_fontMask),
754 const_iv (RS_baseattrMask),
755 const_iv (RS_attrMask),
756 const_iv (RS_redraw),
757 const_iv (RS_Sel),
659 const_iv (RS_Bold), 758 const_iv (RS_Bold),
660 const_iv (RS_Italic), 759 const_iv (RS_Italic),
661 const_iv (RS_Blink), 760 const_iv (RS_Blink),
662 const_iv (RS_RVid), 761 const_iv (RS_RVid),
663 const_iv (RS_Uline), 762 const_iv (RS_Uline),
750 const_iv (XIMSecondary), 849 const_iv (XIMSecondary),
751 const_iv (XIMTertiary), 850 const_iv (XIMTertiary),
752 const_iv (XIMVisibleToForward), 851 const_iv (XIMVisibleToForward),
753 const_iv (XIMVisibleToBackword), 852 const_iv (XIMVisibleToBackword),
754 const_iv (XIMVisibleToCenter), 853 const_iv (XIMVisibleToCenter),
854#if XRENDER
855 const_iv (PictStandardARGB32),
856 const_iv (PictStandardRGB24),
857 const_iv (PictStandardA8),
858 const_iv (PictStandardA4),
859 const_iv (PictStandardA1),
860 const_iv (RepeatNone),
861 const_iv (RepeatNormal),
862 const_iv (RepeatPad),
863 const_iv (RepeatReflect),
864#endif
755# if 0 865# if 0
756 const_iv (XIMForwardChar), 866 const_iv (XIMForwardChar),
757 const_iv (XIMBackwardChar), 867 const_iv (XIMBackwardChar),
758 const_iv (XIMForwardWord), 868 const_iv (XIMForwardWord),
759 const_iv (XIMBackwardWord), 869 const_iv (XIMBackwardWord),
767 const_iv (XIMDontChange), 877 const_iv (XIMDontChange),
768# endif 878# endif
769# endif 879# endif
770 }; 880 };
771 881
772 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 882 for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--)
773 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 883 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
774} 884}
885
886void
887log (const char *msg)
888 CODE:
889 rxvt_log ("%s", msg);
775 890
776void 891void
777warn (const char *msg) 892warn (const char *msg)
778 CODE: 893 CODE:
779 rxvt_warn ("%s", msg); 894 rxvt_warn ("%s", msg);
783 CODE: 898 CODE:
784 rxvt_fatal ("%s", msg); 899 rxvt_fatal ("%s", msg);
785 900
786void 901void
787_exit (int status) 902_exit (int status)
903
904void
905catch_fatal (SV *block)
906 PROTOTYPE: &
907 CODE:
908 try
909 {
910 PUSHMARK (SP);
911 PUTBACK;
912 call_sv (block, G_VOID | G_DISCARD);
913 SPAGAIN;
914 }
915 catch (const rxvt_failure_exception &e)
916 {
917 croak ("rxvt_fatal exception caught, trying to continue.");
918 }
788 919
789NV 920NV
790NOW () 921NOW ()
791 CODE: 922 CODE:
792 RETVAL = ev::now (); 923 RETVAL = ev::now ();
850 for (rxvt_term **t = rxvt_term::termlist.begin (); t < rxvt_term::termlist.end (); t++) 981 for (rxvt_term **t = rxvt_term::termlist.begin (); t < rxvt_term::termlist.end (); t++)
851 if ((*t)->perl.self) 982 if ((*t)->perl.self)
852 PUSHs (sv_2mortal (newSVterm (*t))); 983 PUSHs (sv_2mortal (newSVterm (*t)));
853} 984}
854 985
986IV
987_new_selection_request (rxvt_term *term, int selnum, Time tm, Window win, Atom prop, SV *cb)
988 CODE:
989 rxvt_selection *req = new rxvt_selection (term->display, selnum, tm, win, prop, term);
990 req->cb_sv = newSVsv (cb);
991 AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_selection", 10, 0));
992 av_push (av, newSViv ((IV)req));
993 RETVAL = (IV)req;
994 OUTPUT:
995 RETVAL
996
997void
998_delete_selection_request (IV req_)
999 CODE:
1000 rxvt_selection *req = (rxvt_selection *)req_;
1001 AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)req->term->perl.self), "_selection", 10, 0));
1002 int i;
1003
1004 for (i = AvFILL (av); i >= 0; i--)
1005 if (SvIV (*av_fetch (av, i, 1)) == req_)
1006 break;
1007
1008 for (; i < AvFILL (av); i++)
1009 av_store (av, i, SvREFCNT_inc (*av_fetch (av, i + 1, 0)));
1010
1011 av_pop (av);
1012
1013 delete req;
1014
855MODULE = urxvt PACKAGE = urxvt::term 1015MODULE = urxvt PACKAGE = urxvt::term
856 1016
857SV * 1017SV *
858_new (AV *env, AV *arg) 1018_new (AV *env, AV *arg)
859 CODE: 1019 CODE:
860{ 1020{
861 rxvt_term *term = new rxvt_term; 1021 rxvt_term *term = new rxvt_term;
862 1022
863 stringvec *argv = new stringvec; 1023 stringvec *argv = new stringvec;
864 stringvec *envv = new stringvec;
865
866 for (int i = 0; i <= AvFILL (arg); i++) 1024 for (int i = 0; i <= AvFILL (arg); i++)
867 argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1)))); 1025 argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1))));
868 1026
1027 stringvec *envv = new stringvec;
869 for (int i = AvFILL (env) + 1; i--; ) 1028 for (int i = AvFILL (env) + 1; i--; )
870 envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1)))); 1029 envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1))));
871 1030
872 envv->push_back (0);
873
874 try 1031 try
875 { 1032 {
876 term->init (argv, envv); 1033 term->init (argv, envv);
877 } 1034 }
878 catch (const class rxvt_failure_exception &e) 1035 catch (const class rxvt_failure_exception &e)
891rxvt_term::destroy () 1048rxvt_term::destroy ()
892 1049
893void 1050void
894rxvt_term::set_should_invoke (int htype, int inc) 1051rxvt_term::set_should_invoke (int htype, int inc)
895 CODE: 1052 CODE:
896 THIS->perl.should_invoke [htype] += inc; 1053 uint8_t &count = THIS->perl.should_invoke [htype];
1054 uint8_t prev = count;
1055 count += inc;
1056 if (!prev != !count)
1057 {
1058 // hook status changed, react
1059 switch (htype)
1060 {
1061 case HOOK_POSITION_CHANGE:
1062 if (count)
1063 THIS->get_window_origin (THIS->parent_x, THIS->parent_y);
1064 }
1065 }
1066
1067void
1068rxvt_term::put_option_db (octet_string specifier, octet_string value)
1069 CODE:
1070 XrmPutStringResource (&THIS->option_db, specifier, value);
897 1071
898int 1072int
899rxvt_term::grab_button (int button, U32 modifiers, Window window = THIS->vt) 1073rxvt_term::grab_button (int button, U32 modifiers, Window window = THIS->vt)
900 CODE: 1074 CODE:
901 RETVAL = XGrabButton (THIS->dpy, button, modifiers, window, 1, 1075 RETVAL = XGrabButton (THIS->dpy, button, modifiers, window, 1,
917 1091
918void 1092void
919rxvt_term::XUngrabKey (int keycode, U32 modifiers, Window window = THIS->vt) 1093rxvt_term::XUngrabKey (int keycode, U32 modifiers, Window window = THIS->vt)
920 CODE: 1094 CODE:
921 XUngrabKey (THIS->dpy, keycode, modifiers, window); 1095 XUngrabKey (THIS->dpy, keycode, modifiers, window);
922
923void
924rxvt_term::XUngrabKeyboard (Time eventtime)
925 CODE:
926 XUngrabKeyboard (THIS->dpy, eventtime);
927 1096
928bool 1097bool
929rxvt_term::grab (Time eventtime, int sync = 0) 1098rxvt_term::grab (Time eventtime, int sync = 0)
930 CODE: 1099 CODE:
931{ 1100{
1043 rxvt_pop_locale (); 1212 rxvt_pop_locale ();
1044 1213
1045 RETVAL = wcs2sv (wstr); 1214 RETVAL = wcs2sv (wstr);
1046 free (wstr); 1215 free (wstr);
1047} 1216}
1048 OUTPUT:
1049 RETVAL
1050
1051char *
1052rxvt_term::locale ()
1053 CODE:
1054 RETVAL = THIS->locale;
1055 OUTPUT: 1217 OUTPUT:
1056 RETVAL 1218 RETVAL
1057 1219
1058#define TERM_OFFSET(sym) offsetof (TermWin_t, sym) 1220#define TERM_OFFSET(sym) offsetof (TermWin_t, sym)
1059 1221
1166 RETVAL 1328 RETVAL
1167 1329
1168Window 1330Window
1169rxvt_term::parent () 1331rxvt_term::parent ()
1170 CODE: 1332 CODE:
1171 RETVAL = THIS->parent [0]; 1333 RETVAL = THIS->parent;
1172 OUTPUT: 1334 OUTPUT:
1173 RETVAL 1335 RETVAL
1174 1336
1175Window 1337int
1176rxvt_term::vt () 1338rxvt_term::parent_x ()
1177 CODE: 1339 CODE:
1178 RETVAL = THIS->vt; 1340 RETVAL = THIS->parent_x;
1341 OUTPUT:
1342 RETVAL
1343
1344int
1345rxvt_term::parent_y ()
1346 CODE:
1347 RETVAL = THIS->parent_y;
1179 OUTPUT: 1348 OUTPUT:
1180 RETVAL 1349 RETVAL
1181 1350
1182void 1351void
1183rxvt_term::vt_emask_add (U32 emask) 1352rxvt_term::vt_emask_add (U32 emask)
1203 if (newval <= 0) 1372 if (newval <= 0)
1204 THIS->scr_changeview (max (newval, THIS->top_row)); 1373 THIS->scr_changeview (max (newval, THIS->top_row));
1205} 1374}
1206 OUTPUT: 1375 OUTPUT:
1207 RETVAL 1376 RETVAL
1377
1378void
1379rxvt_term::set_urgency (bool enable)
1208 1380
1209void 1381void
1210rxvt_term::focus_in () 1382rxvt_term::focus_in ()
1211 1383
1212void 1384void
1445# include "rsinc.h" 1617# include "rsinc.h"
1446# undef def 1618# undef def
1447# undef reserve 1619# undef reserve
1448 }; 1620 };
1449 1621
1450 rs = rslist + sizeof (rslist) / sizeof (rslist [0]); 1622 rs = rslist + ecb_array_length (rslist);
1451 1623
1452 if (*name) 1624 if (*name)
1453 { 1625 {
1454 do { 1626 do {
1455 if (rs-- == rslist) 1627 if (rs-- == rslist)
1494 1666
1495 if (set >= 0) 1667 if (set >= 0)
1496 { 1668 {
1497 THIS->set_option (optval, set); 1669 THIS->set_option (optval, set);
1498 1670
1499 if (THIS->env_colorfgbg [0]) // avoid doing this before START 1671 if (THIS->init_done) // avoid doing this before START
1500 switch (optval) 1672 switch (optval)
1501 { 1673 {
1502 case Opt_skipBuiltinGlyphs: 1674 case Opt_skipBuiltinGlyphs:
1503 THIS->set_fonts (); 1675 THIS->set_fonts ();
1504 THIS->scr_remap_chars (); 1676 THIS->scr_remap_chars ();
1505 THIS->scr_touch (true); 1677 THIS->scr_touch (true);
1506 THIS->want_refresh = 1; 1678 THIS->want_refresh = 1;
1507 THIS->refresh_check (); 1679 THIS->refresh_check ();
1508 break; 1680 break;
1681#ifdef CURSOR_BLINK
1682 case Opt_cursorBlink:
1683 THIS->cursor_blink_reset ();
1684 break;
1685#endif
1509 1686
1510 case Opt_cursorUnderline: 1687 case Opt_cursorUnderline:
1511 THIS->want_refresh = 1; 1688 THIS->want_refresh = 1;
1512 THIS->refresh_check (); 1689 THIS->refresh_check ();
1513 break; 1690 break;
1527 CODE: 1704 CODE:
1528 RETVAL = 0 < THIS->parse_keysym (keysym, str); 1705 RETVAL = 0 < THIS->parse_keysym (keysym, str);
1529 THIS->keyboard->register_done (); 1706 THIS->keyboard->register_done ();
1530 OUTPUT: 1707 OUTPUT:
1531 RETVAL 1708 RETVAL
1709
1710void
1711rxvt_term::register_command (int keysym, unsigned int state, SV *str)
1712 CODE:
1713 wchar_t *wstr = sv2wcs (str);
1714 THIS->keyboard->register_user_translation (keysym, state, wstr);
1715 free (wstr);
1532 1716
1533void 1717void
1534rxvt_term::screen_cur (...) 1718rxvt_term::screen_cur (...)
1535 PROTOTYPE: $;$$ 1719 PROTOTYPE: $;$$
1536 ALIAS: 1720 ALIAS:
1594 THIS->selection.screen = screen; 1778 THIS->selection.screen = screen;
1595 OUTPUT: 1779 OUTPUT:
1596 RETVAL 1780 RETVAL
1597 1781
1598void 1782void
1599rxvt_term::selection_clear () 1783rxvt_term::selection_clear (bool clipboard = false)
1600 1784
1601void 1785void
1602rxvt_term::selection_make (Time eventtime, bool rect = false) 1786rxvt_term::selection_make (Time eventtime, bool rect = false)
1603 CODE: 1787 CODE:
1604 THIS->selection.op = SELECTION_CONT; 1788 THIS->selection.op = SELECTION_CONT;
1605 THIS->selection.rect = rect; 1789 THIS->selection.rect = rect;
1606 THIS->selection_make (eventtime); 1790 THIS->selection_make (eventtime);
1607 1791
1608int 1792int
1609rxvt_term::selection_grab (Time eventtime) 1793rxvt_term::selection_grab (Time eventtime, bool clipboard = false)
1610 1794
1611void 1795void
1612rxvt_term::selection (SV *newtext = 0) 1796rxvt_term::selection (SV *newtext = 0, bool clipboard = false)
1613 PPCODE: 1797 PPCODE:
1614{ 1798{
1799 wchar_t * &text = clipboard ? THIS->selection.clip_text : THIS->selection.text;
1800 unsigned int &len = clipboard ? THIS->selection.clip_len : THIS->selection.len;
1801
1615 if (GIMME_V != G_VOID) 1802 if (GIMME_V != G_VOID)
1616 XPUSHs (THIS->selection.text 1803 XPUSHs (text
1617 ? sv_2mortal (wcs2sv (THIS->selection.text, THIS->selection.len)) 1804 ? sv_2mortal (wcs2sv (text, len))
1618 : &PL_sv_undef); 1805 : &PL_sv_undef);
1619 1806
1620 if (newtext) 1807 if (newtext)
1621 { 1808 {
1622 free (THIS->selection.text); 1809 free (text);
1623 1810
1624 THIS->selection.text = sv2wcs (newtext); 1811 text = sv2wcs (newtext);
1625 THIS->selection.len = wcslen (THIS->selection.text); 1812 len = wcslen (text);
1626 } 1813 }
1627} 1814}
1628 1815
1629char 1816char
1630rxvt_term::cur_charset () 1817rxvt_term::cur_charset ()
1639void 1826void
1640rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid) 1827rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, U32 rstyle = RS_RVid)
1641 1828
1642void 1829void
1643rxvt_term::scr_bell () 1830rxvt_term::scr_bell ()
1831
1832void
1833rxvt_term::scr_recolour (bool refresh = true);
1644 1834
1645void 1835void
1646rxvt_term::scr_change_screen (int screen) 1836rxvt_term::scr_change_screen (int screen)
1647 1837
1648void 1838void
1661 char *str = SvPVbyte (octets, len); 1851 char *str = SvPVbyte (octets, len);
1662 C_ARGS: 1852 C_ARGS:
1663 str, len 1853 str, len
1664 1854
1665void 1855void
1856rxvt_term::tt_paste (SV *octets)
1857 INIT:
1858 STRLEN len;
1859 char *str = SvPVbyte (octets, len);
1860 C_ARGS:
1861 str, len
1862
1863void
1666rxvt_term::cmd_parse (SV *octets) 1864rxvt_term::cmd_parse (SV *octets)
1667 CODE: 1865 CODE:
1668{ 1866{
1669 STRLEN len; 1867 STRLEN len;
1670 char *str = SvPVbyte (octets, len); 1868 char *str = SvPVbyte (octets, len);
1755 type, format, PropModeReplace, 1953 type, format, PropModeReplace,
1756 (unsigned char *)data_, len / elemsize); 1954 (unsigned char *)data_, len / elemsize);
1757} 1955}
1758 1956
1759Atom 1957Atom
1760XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE) 1958XInternAtom (rxvt_term *term, octet_string atom_name, int only_if_exists = FALSE)
1761 C_ARGS: term->dpy, atom_name, only_if_exists 1959 C_ARGS: term->dpy, atom_name, only_if_exists
1762 1960
1763char * 1961char *
1764XGetAtomName (rxvt_term *term, Atom atom) 1962XGetAtomName (rxvt_term *term, Atom atom)
1765 C_ARGS: term->dpy, atom 1963 C_ARGS: term->dpy, atom
1766 CLEANUP: 1964 CLEANUP:
1767 XFree (RETVAL); 1965 XFree (RETVAL);
1768 1966
1769void 1967void
1770XDeleteProperty (rxvt_term *term, Window window, Atom property) 1968XDeleteProperty (rxvt_term *term, Window window, Atom property)
1771 C_ARGS: term->dpy, window, property 1969 C_ARGS: term->dpy, window, property
1772 1970
1773Window 1971Window
1774rxvt_term::DefaultRootWindow () 1972rxvt_term::DefaultRootWindow ()
1775 CODE: 1973 CODE:
1776 RETVAL = THIS->display->root; 1974 RETVAL = THIS->display->root;
1828 PUSHs (newSVuv (child)); 2026 PUSHs (newSVuv (child));
1829 } 2027 }
1830} 2028}
1831 2029
1832############################################################################# 2030#############################################################################
2031# fancy bg bloatstuff (TODO: should be moved up somewhere)
2032
2033# TODO: ugly
2034void
2035rxvt_term::get_geometry ()
2036 PPCODE:
2037 EXTEND (SP, 4);
2038 PUSHs (sv_2mortal (newSViv (THIS->parent_x)));
2039 PUSHs (sv_2mortal (newSViv (THIS->parent_y)));
2040 PUSHs (sv_2mortal (newSViv (THIS->szHint.width)));
2041 PUSHs (sv_2mortal (newSViv (THIS->szHint.height)));
2042
2043#if HAVE_IMG
2044
2045rxvt_img *
2046rxvt_term::new_img (SV *format, int width, int height)
2047 CODE:
2048 XRenderPictFormat *f = SvOK (format)
2049 ? XRenderFindStandardFormat (THIS->dpy, SvIV (format))
2050 : XRenderFindVisualFormat (THIS->dpy, THIS->visual);
2051 RETVAL = new rxvt_img (THIS, f, width, height);
2052 OUTPUT:
2053 RETVAL
2054
2055#if ENABLE_TRANSPARENCY
2056
2057rxvt_img *
2058rxvt_term::new_img_from_root ()
2059 CODE:
2060 RETVAL = rxvt_img::new_from_root (THIS);
2061 OUTPUT:
2062 RETVAL
2063
2064#endif
2065
2066#if HAVE_PIXBUF
2067
2068rxvt_img *
2069rxvt_term::new_img_from_file (octet_string filename)
2070 CODE:
2071 try
2072 {
2073 RETVAL = rxvt_img::new_from_file (THIS, filename);
2074 }
2075 catch (const class rxvt_failure_exception &e)
2076 {
2077 croak ("new_img_from_file failed");
2078 }
2079 OUTPUT:
2080 RETVAL
2081
2082#endif
2083
2084#if HAVE_BG_PIXMAP
2085
2086void
2087rxvt_term::set_background (rxvt_img *img)
2088 CODE:
2089 THIS->bg_destroy ();
2090 THIS->bg_pixmap = None;
2091 THIS->bg_flags &= ~rxvt_term::BG_NEEDS_REFRESH;
2092
2093 if (img) // TODO: cannot be false
2094 {
2095 img->unshare ();
2096 //TODO: convetr to visual, possibly precompose with colour
2097 THIS->bg_pixmap = img->steal ();
2098 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH;
2099 THIS->bg_valid_since = ev::now (); // TODO: extra bloat
2100 }
2101
2102#endif
2103
2104#endif
2105
2106#############################################################################
1833# urxvt::overlay 2107# urxvt::overlay
1834############################################################################# 2108#############################################################################
1835 2109
1836MODULE = urxvt PACKAGE = urxvt::overlay 2110MODULE = urxvt PACKAGE = urxvt::overlay
1837 2111
1847void 2121void
1848overlay::DESTROY () 2122overlay::DESTROY ()
1849 2123
1850INCLUDE: $PERL <iom_perl.xs -pe s/IOM_MODULE/urxvt/g,s/IOM_CLASS/urxvt/g | 2124INCLUDE: $PERL <iom_perl.xs -pe s/IOM_MODULE/urxvt/g,s/IOM_CLASS/urxvt/g |
1851 2125
2126MODULE = urxvt PACKAGE = urxvt::pixbuf PREFIX = gdk_pixbuf_
2127
2128#if HAVE_PIXBUF
2129
2130urxvt::pixbuf gdk_pixbuf_new_from_file (SV *klass, octet_string filename)
2131 C_ARGS: filename, 0
2132
2133void
2134DESTROY (urxvt::pixbuf self)
2135 CODE:
2136 gdk_pixbuf_unref (self);
2137
2138#endif
2139
2140MODULE = urxvt PACKAGE = urxvt::img
2141
2142#if HAVE_IMG
2143
2144# rxvt_img *new (rxvt_screen *screen, XRenderPictFormat *format, int width, int height)
2145# rxvt_img *rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap);
2146
2147int
2148rxvt_img::w ()
2149 CODE:
2150 RETVAL = THIS->w;
2151 OUTPUT:
2152 RETVAL
2153
2154int
2155rxvt_img::h ()
2156 CODE:
2157 RETVAL = THIS->h;
2158 OUTPUT:
2159 RETVAL
2160
2161bool
2162rxvt_img::shared ()
2163 CODE:
2164 RETVAL = THIS->shared;
2165 OUTPUT:
2166 RETVAL
2167
2168Pixmap
2169rxvt_img::pm ()
2170 CODE:
2171 RETVAL = THIS->pm;
2172 OUTPUT:
2173 RETVAL
2174
2175void
2176rxvt_img::fill (SV *c)
2177 INIT:
2178 rxvt_color rc;
2179 parse_color (THIS->s, rc, c);
2180 C_ARGS: rc
2181
2182void
2183rxvt_img::DESTROY ()
2184 CODE:
2185 delete THIS;
2186
2187rxvt_img *
2188rxvt_img::blur (int rh, int rv)
2189
2190void
2191rxvt_img::brightness (NV r, NV g, NV b, NV a = 1.)
2192
2193void
2194rxvt_img::contrast (NV r, NV g, NV b, NV a = 1.)
2195
2196void
2197rxvt_img::unshare ()
2198
2199rxvt_img *
2200rxvt_img::clone ()
2201
2202rxvt_img *
2203rxvt_img::sub_rect (int x, int y, int width, int height, render_repeat_mode repeat = RepeatNormal)
2204
2205rxvt_img *
2206rxvt_img::transform (int new_width, int new_height, NV p11, NV p12, NV p13, NV p21, NV p22, NV p23, NV p31, NV p32, NV p33, render_repeat_mode repeat = RepeatNormal)
2207 INIT:
2208 double matrix[9] = {
2209 p11, p12, p13,
2210 p21, p22, p23,
2211 p31, p32, p33
2212 };
2213 C_ARGS: new_width, new_height, matrix, repeat
2214
2215rxvt_img *
2216rxvt_img::scale (int new_width, int new_height)
2217
2218rxvt_img *
2219rxvt_img::rotate (int new_width, int new_height, int x, int y, NV phi, render_repeat_mode repeat = RepeatNormal)
2220
2221#endif
2222

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines