--- rxvt-unicode/src/rxvtperl.xs 2014/08/21 15:58:29 1.225 +++ rxvt-unicode/src/rxvtperl.xs 2015/03/17 09:23:08 1.236 @@ -3,7 +3,7 @@ *----------------------------------------------------------------------* * * All portions of code are copyright by their respective author/s. - * Copyright (c) 2005-2014,2011 Marc Lehmann + * Copyright (c) 2005-2014 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -497,6 +497,11 @@ static void _keysym_resource_push (rxvt_term *term, const char *k, const char *v) { + unsigned int state; + + if (term->parse_keysym (k, state) == -1) + return; + dSP; XPUSHs (sv_2mortal (newSVpv (v, 0))); PUTBACK; @@ -1024,17 +1029,17 @@ } void -log (const char *msg) +log (utf8_string msg) CODE: rxvt_log ("%s", msg); void -warn (const char *msg) +warn (utf8_string msg) CODE: rxvt_warn ("%s", msg); void -fatal (const char *msg) +fatal (utf8_string msg) CODE: rxvt_fatal ("%s", msg); @@ -1284,7 +1289,7 @@ ungrab (THIS); int -rxvt_term::XStringToKeysym (char *string) +rxvt_term::XStringToKeysym (octet_string string) CODE: RETVAL = XStringToKeysym (string); OUTPUT: RETVAL @@ -1304,7 +1309,7 @@ int rxvt_term::XKeycodeToKeysym (int code, int index) CODE: - RETVAL = XKeycodeToKeysym (THIS->dpy, code, index); + RETVAL = rxvt_XKeycodeToKeysym (THIS->dpy, code, index); OUTPUT: RETVAL int @@ -1571,6 +1576,9 @@ THIS->refresh_check (); void +rxvt_term::refresh_check () + +void rxvt_term::ROW_t (int row_number, SV *new_text = 0, int start_col = 0, int start_ofs = 0, int max_len = MAX_COLS) PPCODE: { @@ -1723,6 +1731,7 @@ rxvt_pop_locale (); + free (wstr); RETVAL = wcs2sv (rstr, r - rstr); } OUTPUT: @@ -1756,13 +1765,14 @@ else *r++ = *s; + free (wstr); RETVAL = wcs2sv (rstr, r - rstr); } OUTPUT: RETVAL void -rxvt_term::_resource (char *name, int index, SV *newval = 0) +rxvt_term::_resource (octet_string name, int index, SV *newval = 0) PPCODE: { static const struct resval { const char *name; int value; } *rs, rslist [] = { @@ -1810,7 +1820,7 @@ } const char * -rxvt_term::x_resource (const char *name) +rxvt_term::x_resource (octet_string name) bool rxvt_term::option (U8 optval, int set = -1) @@ -1854,12 +1864,22 @@ OUTPUT: RETVAL +SV * +rxvt_term::lookup_keysym (int keysym, unsigned int state) + CODE: +{ + keysym_t *key = THIS->keyboard->lookup_keysym (THIS, keysym, state); + RETVAL = key ? sv_2mortal (newSVpv (key->str, 0)) : &PL_sv_undef; +} + OUTPUT: + RETVAL + bool -rxvt_term::bind_action (char *keysym, char *str) +rxvt_term::bind_action (octet_string keysym, octet_string action) ALIAS: parse_keysym = 1 CODE: - RETVAL = 0 < THIS->bind_action (keysym, str); + RETVAL = 0 < THIS->bind_action (keysym, action); THIS->keyboard->register_done (); OUTPUT: RETVAL @@ -1990,7 +2010,7 @@ rxvt_term::scr_bell () void -rxvt_term::scr_recolour (bool refresh = true); +rxvt_term::scr_recolor (bool refresh = true); void rxvt_term::scr_change_screen (int screen)