… | |
… | |
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 | |
|
|
54 | typedef char * octet_string; |
|
|
55 | typedef char * utf8_string; |
|
|
56 | |
|
|
57 | typedef GdkPixbuf * urxvt__pixbuf; |
|
|
58 | typedef rxvt_img * urxvt__img; |
50 | |
59 | |
51 | ///////////////////////////////////////////////////////////////////////////// |
60 | ///////////////////////////////////////////////////////////////////////////// |
52 | |
61 | |
53 | static wchar_t * |
62 | static wchar_t * |
54 | sv2wcs (SV *sv) |
63 | sv2wcs (SV *sv) |
… | |
… | |
1099 | free (wstr); |
1108 | free (wstr); |
1100 | } |
1109 | } |
1101 | OUTPUT: |
1110 | OUTPUT: |
1102 | RETVAL |
1111 | RETVAL |
1103 | |
1112 | |
1104 | char * |
|
|
1105 | rxvt_term::locale () |
|
|
1106 | CODE: |
|
|
1107 | RETVAL = THIS->locale; |
|
|
1108 | OUTPUT: |
|
|
1109 | RETVAL |
|
|
1110 | |
|
|
1111 | #define TERM_OFFSET(sym) offsetof (TermWin_t, sym) |
1113 | #define TERM_OFFSET(sym) offsetof (TermWin_t, sym) |
1112 | |
1114 | |
1113 | #define TERM_OFFSET_width TERM_OFFSET(width) |
1115 | #define TERM_OFFSET_width TERM_OFFSET(width) |
1114 | #define TERM_OFFSET_height TERM_OFFSET(height) |
1116 | #define TERM_OFFSET_height TERM_OFFSET(height) |
1115 | #define TERM_OFFSET_fwidth TERM_OFFSET(fwidth) |
1117 | #define TERM_OFFSET_fwidth TERM_OFFSET(fwidth) |
… | |
… | |
1550 | |
1552 | |
1551 | if (set >= 0) |
1553 | if (set >= 0) |
1552 | { |
1554 | { |
1553 | THIS->set_option (optval, set); |
1555 | THIS->set_option (optval, set); |
1554 | |
1556 | |
1555 | if (THIS->env_colorfgbg [0]) // avoid doing this before START |
1557 | if (THIS->init_done) // avoid doing this before START |
1556 | switch (optval) |
1558 | switch (optval) |
1557 | { |
1559 | { |
1558 | case Opt_skipBuiltinGlyphs: |
1560 | case Opt_skipBuiltinGlyphs: |
1559 | THIS->set_fonts (); |
1561 | THIS->set_fonts (); |
1560 | THIS->scr_remap_chars (); |
1562 | THIS->scr_remap_chars (); |
1561 | THIS->scr_touch (true); |
1563 | THIS->scr_touch (true); |
1562 | THIS->want_refresh = 1; |
1564 | THIS->want_refresh = 1; |
1563 | THIS->refresh_check (); |
1565 | THIS->refresh_check (); |
1564 | break; |
1566 | break; |
|
|
1567 | #ifdef CURSOR_BLINK |
|
|
1568 | case Opt_cursorBlink: |
|
|
1569 | THIS->cursor_blink_reset (); |
|
|
1570 | break; |
|
|
1571 | #endif |
1565 | |
1572 | |
1566 | case Opt_cursorUnderline: |
1573 | case Opt_cursorUnderline: |
1567 | THIS->want_refresh = 1; |
1574 | THIS->want_refresh = 1; |
1568 | THIS->refresh_check (); |
1575 | THIS->refresh_check (); |
1569 | break; |
1576 | break; |
… | |
… | |
1921 | void |
1928 | void |
1922 | overlay::DESTROY () |
1929 | overlay::DESTROY () |
1923 | |
1930 | |
1924 | INCLUDE: $PERL <iom_perl.xs -pe s/IOM_MODULE/urxvt/g,s/IOM_CLASS/urxvt/g | |
1931 | INCLUDE: $PERL <iom_perl.xs -pe s/IOM_MODULE/urxvt/g,s/IOM_CLASS/urxvt/g | |
1925 | |
1932 | |
|
|
1933 | MODULE = urxvt PACKAGE = urxvt::pixbuf PREFIX = gdk_pixbuf_ |
|
|
1934 | |
|
|
1935 | urxvt::pixbuf gdk_pixbuf_new_from_file (octet_string filename, GError **error = 0) |
|
|
1936 | |
|
|
1937 | void |
|
|
1938 | DESTROY (urxvt::pixbuf self) |
|
|
1939 | CODE: |
|
|
1940 | gdk_pixbuf_unref (self); |
|
|
1941 | |