--- rxvt-unicode/src/rxvtperl.xs 2011/07/01 19:07:08 1.142 +++ rxvt-unicode/src/rxvtperl.xs 2012/06/03 18:04:44 1.158 @@ -25,11 +25,12 @@ #include #include #undef line_t +#undef bool // perl defines it's own bool type, except with g++... what a trap #include "../config.h" -#include -#include +#include +#include #include "unistd.h" @@ -50,6 +51,23 @@ ///////////////////////////////////////////////////////////////////////////// +typedef char * octet_string; +typedef char * utf8_string; + +typedef GdkPixbuf * urxvt__pixbuf; +typedef rxvt_img * urxvt__img; + +///////////////////////////////////////////////////////////////////////////// + +static void +parse_color (rxvt_screen *s, rxvt_color &c, SV *sv) +{ + //TODO: support component stuff + c.set (s, SvPVbyte_nolen (sv)); +} + +///////////////////////////////////////////////////////////////////////////// + static wchar_t * sv2wcs (SV *sv) { @@ -784,6 +802,13 @@ const_iv (XIMVisibleToForward), const_iv (XIMVisibleToBackword), const_iv (XIMVisibleToCenter), +#if HAVE_XRENDER + const_iv (PictStandardARGB32), + const_iv (PictStandardRGB24), + const_iv (PictStandardA8), + const_iv (PictStandardA4), + const_iv (PictStandardA1), +#endif # if 0 const_iv (XIMForwardChar), const_iv (XIMBackwardChar), @@ -801,8 +826,8 @@ # endif }; - for (civ = const_iv + ecb_array_length (const_iv); civ-- > const_iv; ) - newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); + for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--) + newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); } void @@ -922,16 +947,13 @@ rxvt_term *term = new rxvt_term; stringvec *argv = new stringvec; - stringvec *envv = new stringvec; - for (int i = 0; i <= AvFILL (arg); i++) argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1)))); + stringvec *envv = new stringvec; for (int i = AvFILL (env) + 1; i--; ) envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1)))); - envv->push_back (0); - try { term->init (argv, envv); @@ -981,11 +1003,6 @@ CODE: XUngrabKey (THIS->dpy, keycode, modifiers, window); -void -rxvt_term::XUngrabKeyboard (Time eventtime) - CODE: - XUngrabKeyboard (THIS->dpy, eventtime); - bool rxvt_term::grab (Time eventtime, int sync = 0) CODE: @@ -1109,13 +1126,6 @@ OUTPUT: RETVAL -char * -rxvt_term::locale () - CODE: - RETVAL = THIS->locale; - OUTPUT: - RETVAL - #define TERM_OFFSET(sym) offsetof (TermWin_t, sym) #define TERM_OFFSET_width TERM_OFFSET(width) @@ -1268,6 +1278,9 @@ RETVAL void +rxvt_term::set_urgency (bool enable) + +void rxvt_term::focus_in () void @@ -1557,7 +1570,7 @@ { THIS->set_option (optval, set); - if (THIS->env_colorfgbg [0]) // avoid doing this before START + if (THIS->init_done) // avoid doing this before START switch (optval) { case Opt_skipBuiltinGlyphs: @@ -1567,6 +1580,11 @@ THIS->want_refresh = 1; THIS->refresh_check (); break; +#ifdef CURSOR_BLINK + case Opt_cursorBlink: + THIS->cursor_blink_reset (); + break; +#endif case Opt_cursorUnderline: THIS->want_refresh = 1; @@ -1592,6 +1610,13 @@ RETVAL void +rxvt_term::register_command (int keysym, unsigned int state, SV *str) + CODE: + wchar_t *wstr = sv2wcs (str); + THIS->keyboard->register_user_translation (keysym, state, wstr); + free (wstr); + +void rxvt_term::screen_cur (...) PROTOTYPE: $;$$ ALIAS: @@ -1902,6 +1927,24 @@ } ############################################################################# +# fancy bg bloatstuff (TODO: should be moved up somewhere) + +#ifdef ENABLE_TRANSPARENCY + +# rxvt_img * +# rxvt_term::new_root_img () +# CODE: +# RETVAL = rxvt_img::new_from_root (THIS); +# OUTPUT: +# RETVAL + +#endif + +#if HAVE_PIXBUF + +#endif + +############################################################################# # urxvt::overlay ############################################################################# @@ -1921,3 +1964,51 @@ INCLUDE: $PERL s, rc, c); + C_ARGS: rc + +void +rxvt_img::blur (int rh, int rv) + +void +rxvt_img::brightness (double r, double g, double b, double a = 1.) + +void +rxvt_img::contrast (double r, double g, double b, double a = 1.) + +rxvt_img * +rxvt_img::copy () + +rxvt_img * +rxvt_img::scale (int new_width, int new_height) + +# rxvt_img * +# rxvt_img::transform (int new_width, int new_height, double matrix[16]); + +#endif +