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.228 by sf-exg, Fri Sep 5 19:02:53 2014 UTC vs.
Revision 1.236 by sf-exg, Tue Mar 17 09:23:08 2015 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-2014,2011 Marc Lehmann <schmorp@schmorp.de> 6 * Copyright (c) 2005-2014 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 3 of the License, or 10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
1027 for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--) 1027 for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--)
1028 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); 1028 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
1029} 1029}
1030 1030
1031void 1031void
1032log (const char *msg) 1032log (utf8_string msg)
1033 CODE: 1033 CODE:
1034 rxvt_log ("%s", msg); 1034 rxvt_log ("%s", msg);
1035 1035
1036void 1036void
1037warn (const char *msg) 1037warn (utf8_string msg)
1038 CODE: 1038 CODE:
1039 rxvt_warn ("%s", msg); 1039 rxvt_warn ("%s", msg);
1040 1040
1041void 1041void
1042fatal (const char *msg) 1042fatal (utf8_string msg)
1043 CODE: 1043 CODE:
1044 rxvt_fatal ("%s", msg); 1044 rxvt_fatal ("%s", msg);
1045 1045
1046void 1046void
1047_exit (int status) 1047_exit (int status)
1287rxvt_term::ungrab () 1287rxvt_term::ungrab ()
1288 CODE: 1288 CODE:
1289 ungrab (THIS); 1289 ungrab (THIS);
1290 1290
1291int 1291int
1292rxvt_term::XStringToKeysym (char *string) 1292rxvt_term::XStringToKeysym (octet_string string)
1293 CODE: 1293 CODE:
1294 RETVAL = XStringToKeysym (string); 1294 RETVAL = XStringToKeysym (string);
1295 OUTPUT: RETVAL 1295 OUTPUT: RETVAL
1296 1296
1297char * 1297char *
1574 CODE: 1574 CODE:
1575 THIS->want_refresh = 1; 1575 THIS->want_refresh = 1;
1576 THIS->refresh_check (); 1576 THIS->refresh_check ();
1577 1577
1578void 1578void
1579rxvt_term::refresh_check ()
1580
1581void
1579rxvt_term::ROW_t (int row_number, SV *new_text = 0, int start_col = 0, int start_ofs = 0, int max_len = MAX_COLS) 1582rxvt_term::ROW_t (int row_number, SV *new_text = 0, int start_col = 0, int start_ofs = 0, int max_len = MAX_COLS)
1580 PPCODE: 1583 PPCODE:
1581{ 1584{
1582 if (!IN_RANGE_EXC (row_number, THIS->top_row, THIS->nrow)) 1585 if (!IN_RANGE_EXC (row_number, THIS->top_row, THIS->nrow))
1583 XSRETURN_EMPTY; 1586 XSRETURN_EMPTY;
1726 *r++ = NOCHAR; 1729 *r++ = NOCHAR;
1727 } 1730 }
1728 1731
1729 rxvt_pop_locale (); 1732 rxvt_pop_locale ();
1730 1733
1734 free (wstr);
1731 RETVAL = wcs2sv (rstr, r - rstr); 1735 RETVAL = wcs2sv (rstr, r - rstr);
1732} 1736}
1733 OUTPUT: 1737 OUTPUT:
1734 RETVAL 1738 RETVAL
1735 1739
1759 else if (IS_COMPOSE (*s)) 1763 else if (IS_COMPOSE (*s))
1760 r += rxvt_composite.expand (*s, r); 1764 r += rxvt_composite.expand (*s, r);
1761 else 1765 else
1762 *r++ = *s; 1766 *r++ = *s;
1763 1767
1768 free (wstr);
1764 RETVAL = wcs2sv (rstr, r - rstr); 1769 RETVAL = wcs2sv (rstr, r - rstr);
1765} 1770}
1766 OUTPUT: 1771 OUTPUT:
1767 RETVAL 1772 RETVAL
1768 1773
1769void 1774void
1770rxvt_term::_resource (char *name, int index, SV *newval = 0) 1775rxvt_term::_resource (octet_string name, int index, SV *newval = 0)
1771 PPCODE: 1776 PPCODE:
1772{ 1777{
1773 static const struct resval { const char *name; int value; } *rs, rslist [] = { 1778 static const struct resval { const char *name; int value; } *rs, rslist [] = {
1774# define def(name) { # name, Rs_ ## name }, 1779# define def(name) { # name, Rs_ ## name },
1775# define reserve(name,count) 1780# define reserve(name,count)
1813 THIS->rs [index] = 0; 1818 THIS->rs [index] = 0;
1814 } 1819 }
1815} 1820}
1816 1821
1817const char * 1822const char *
1818rxvt_term::x_resource (const char *name) 1823rxvt_term::x_resource (octet_string name)
1819 1824
1820bool 1825bool
1821rxvt_term::option (U8 optval, int set = -1) 1826rxvt_term::option (U8 optval, int set = -1)
1822 CODE: 1827 CODE:
1823{ 1828{
1857 } 1862 }
1858} 1863}
1859 OUTPUT: 1864 OUTPUT:
1860 RETVAL 1865 RETVAL
1861 1866
1867SV *
1868rxvt_term::lookup_keysym (int keysym, unsigned int state)
1869 CODE:
1870{
1871 keysym_t *key = THIS->keyboard->lookup_keysym (THIS, keysym, state);
1872 RETVAL = key ? sv_2mortal (newSVpv (key->str, 0)) : &PL_sv_undef;
1873}
1874 OUTPUT:
1875 RETVAL
1876
1862bool 1877bool
1863rxvt_term::bind_action (char *keysym, char *str) 1878rxvt_term::bind_action (octet_string keysym, octet_string action)
1864 ALIAS: 1879 ALIAS:
1865 parse_keysym = 1 1880 parse_keysym = 1
1866 CODE: 1881 CODE:
1867 RETVAL = 0 < THIS->bind_action (keysym, str); 1882 RETVAL = 0 < THIS->bind_action (keysym, action);
1868 THIS->keyboard->register_done (); 1883 THIS->keyboard->register_done ();
1869 OUTPUT: 1884 OUTPUT:
1870 RETVAL 1885 RETVAL
1886
1887void
1888rxvt_term::register_command (int keysym, unsigned int state, SV *str)
1889 CODE:
1890 wchar_t *wstr = sv2wcs (str);
1891 THIS->keyboard->register_action (keysym, state, wstr);
1892 free (wstr);
1871 1893
1872void 1894void
1873rxvt_term::screen_cur (...) 1895rxvt_term::screen_cur (...)
1874 PROTOTYPE: $;$$ 1896 PROTOTYPE: $;$$
1875 ALIAS: 1897 ALIAS:
1986 2008
1987void 2009void
1988rxvt_term::scr_bell () 2010rxvt_term::scr_bell ()
1989 2011
1990void 2012void
1991rxvt_term::scr_recolour (bool refresh = true); 2013rxvt_term::scr_recolor (bool refresh = true);
1992 2014
1993void 2015void
1994rxvt_term::scr_change_screen (int screen) 2016rxvt_term::scr_change_screen (int screen)
1995 2017
1996void 2018void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines