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.146 by sf-exg, Mon Dec 5 12:52:57 2011 UTC vs.
Revision 1.155 by root, Sun Jun 3 10:38:22 2012 UTC

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 GdkPixbuf * urxvt__pixbuf;
58typedef rxvt_img * urxvt__img;
50 59
51///////////////////////////////////////////////////////////////////////////// 60/////////////////////////////////////////////////////////////////////////////
52 61
53static wchar_t * 62static wchar_t *
54sv2wcs (SV *sv) 63sv2wcs (SV *sv)
920 CODE: 929 CODE:
921{ 930{
922 rxvt_term *term = new rxvt_term; 931 rxvt_term *term = new rxvt_term;
923 932
924 stringvec *argv = new stringvec; 933 stringvec *argv = new stringvec;
925 stringvec *envv = new stringvec;
926
927 for (int i = 0; i <= AvFILL (arg); i++) 934 for (int i = 0; i <= AvFILL (arg); i++)
928 argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1)))); 935 argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1))));
929 936
937 stringvec *envv = new stringvec;
930 for (int i = AvFILL (env) + 1; i--; ) 938 for (int i = AvFILL (env) + 1; i--; )
931 envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1)))); 939 envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1))));
932
933 envv->push_back (0);
934 940
935 try 941 try
936 { 942 {
937 term->init (argv, envv); 943 term->init (argv, envv);
938 } 944 }
1099 rxvt_pop_locale (); 1105 rxvt_pop_locale ();
1100 1106
1101 RETVAL = wcs2sv (wstr); 1107 RETVAL = wcs2sv (wstr);
1102 free (wstr); 1108 free (wstr);
1103} 1109}
1104 OUTPUT:
1105 RETVAL
1106
1107char *
1108rxvt_term::locale ()
1109 CODE:
1110 RETVAL = THIS->locale;
1111 OUTPUT: 1110 OUTPUT:
1112 RETVAL 1111 RETVAL
1113 1112
1114#define TERM_OFFSET(sym) offsetof (TermWin_t, sym) 1113#define TERM_OFFSET(sym) offsetof (TermWin_t, sym)
1115 1114
1553 1552
1554 if (set >= 0) 1553 if (set >= 0)
1555 { 1554 {
1556 THIS->set_option (optval, set); 1555 THIS->set_option (optval, set);
1557 1556
1558 if (THIS->env_colorfgbg [0]) // avoid doing this before START 1557 if (THIS->init_done) // avoid doing this before START
1559 switch (optval) 1558 switch (optval)
1560 { 1559 {
1561 case Opt_skipBuiltinGlyphs: 1560 case Opt_skipBuiltinGlyphs:
1562 THIS->set_fonts (); 1561 THIS->set_fonts ();
1563 THIS->scr_remap_chars (); 1562 THIS->scr_remap_chars ();
1564 THIS->scr_touch (true); 1563 THIS->scr_touch (true);
1565 THIS->want_refresh = 1; 1564 THIS->want_refresh = 1;
1566 THIS->refresh_check (); 1565 THIS->refresh_check ();
1567 break; 1566 break;
1567#ifdef CURSOR_BLINK
1568 case Opt_cursorBlink:
1569 THIS->cursor_blink_reset ();
1570 break;
1571#endif
1568 1572
1569 case Opt_cursorUnderline: 1573 case Opt_cursorUnderline:
1570 THIS->want_refresh = 1; 1574 THIS->want_refresh = 1;
1571 THIS->refresh_check (); 1575 THIS->refresh_check ();
1572 break; 1576 break;
1924void 1928void
1925overlay::DESTROY () 1929overlay::DESTROY ()
1926 1930
1927INCLUDE: $PERL <iom_perl.xs -pe s/IOM_MODULE/urxvt/g,s/IOM_CLASS/urxvt/g | 1931INCLUDE: $PERL <iom_perl.xs -pe s/IOM_MODULE/urxvt/g,s/IOM_CLASS/urxvt/g |
1928 1932
1933MODULE = urxvt PACKAGE = urxvt::pixbuf PREFIX = gdk_pixbuf_
1934
1935urxvt::pixbuf gdk_pixbuf_new_from_file (octet_string filename, GError **error = 0)
1936
1937void
1938DESTROY (urxvt::pixbuf self)
1939 CODE:
1940 gdk_pixbuf_unref (self);
1941

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines