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.229 by sf-exg, Mon Oct 13 17:05:32 2014 UTC vs.
Revision 1.238 by sf-exg, Thu Jul 14 05:33:26 2016 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 *
1387#define TERM_OFFSET_saveLines TERM_OFFSET(saveLines) 1387#define TERM_OFFSET_saveLines TERM_OFFSET(saveLines)
1388#define TERM_OFFSET_total_rows TERM_OFFSET(total_rows) 1388#define TERM_OFFSET_total_rows TERM_OFFSET(total_rows)
1389#define TERM_OFFSET_top_row TERM_OFFSET(top_row) 1389#define TERM_OFFSET_top_row TERM_OFFSET(top_row)
1390 1390
1391int 1391int
1392rxvt_term::width () 1392rxvt_term::width (int new_value = NO_INIT)
1393 ALIAS: 1393 ALIAS:
1394 width = TERM_OFFSET_width 1394 width = TERM_OFFSET_width
1395 height = TERM_OFFSET_height 1395 height = TERM_OFFSET_height
1396 fwidth = TERM_OFFSET_fwidth 1396 fwidth = TERM_OFFSET_fwidth
1397 fheight = TERM_OFFSET_fheight 1397 fheight = TERM_OFFSET_fheight
1407 saveLines = TERM_OFFSET_saveLines 1407 saveLines = TERM_OFFSET_saveLines
1408 total_rows = TERM_OFFSET_total_rows 1408 total_rows = TERM_OFFSET_total_rows
1409 top_row = TERM_OFFSET_top_row 1409 top_row = TERM_OFFSET_top_row
1410 CODE: 1410 CODE:
1411 RETVAL = *(int *)((char *)THIS + ix); 1411 RETVAL = *(int *)((char *)THIS + ix);
1412 if (items > 1)
1413 *(int *)((char *)THIS + ix) = new_value;
1412 OUTPUT: 1414 OUTPUT:
1413 RETVAL 1415 RETVAL
1414 1416
1415unsigned int 1417unsigned int
1416rxvt_term::ModLevel3Mask () 1418rxvt_term::ModLevel3Mask ()
1574 CODE: 1576 CODE:
1575 THIS->want_refresh = 1; 1577 THIS->want_refresh = 1;
1576 THIS->refresh_check (); 1578 THIS->refresh_check ();
1577 1579
1578void 1580void
1581rxvt_term::refresh_check ()
1582
1583void
1579rxvt_term::ROW_t (int row_number, SV *new_text = 0, int start_col = 0, int start_ofs = 0, int max_len = MAX_COLS) 1584rxvt_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: 1585 PPCODE:
1581{ 1586{
1582 if (!IN_RANGE_EXC (row_number, THIS->top_row, THIS->nrow)) 1587 if (!IN_RANGE_EXC (row_number, THIS->top_row, THIS->nrow))
1583 XSRETURN_EMPTY; 1588 XSRETURN_EMPTY;
1726 *r++ = NOCHAR; 1731 *r++ = NOCHAR;
1727 } 1732 }
1728 1733
1729 rxvt_pop_locale (); 1734 rxvt_pop_locale ();
1730 1735
1736 free (wstr);
1731 RETVAL = wcs2sv (rstr, r - rstr); 1737 RETVAL = wcs2sv (rstr, r - rstr);
1732} 1738}
1733 OUTPUT: 1739 OUTPUT:
1734 RETVAL 1740 RETVAL
1735 1741
1759 else if (IS_COMPOSE (*s)) 1765 else if (IS_COMPOSE (*s))
1760 r += rxvt_composite.expand (*s, r); 1766 r += rxvt_composite.expand (*s, r);
1761 else 1767 else
1762 *r++ = *s; 1768 *r++ = *s;
1763 1769
1770 free (wstr);
1764 RETVAL = wcs2sv (rstr, r - rstr); 1771 RETVAL = wcs2sv (rstr, r - rstr);
1765} 1772}
1766 OUTPUT: 1773 OUTPUT:
1767 RETVAL 1774 RETVAL
1768 1775
1769void 1776void
1770rxvt_term::_resource (char *name, int index, SV *newval = 0) 1777rxvt_term::_resource (octet_string name, int index, SV *newval = 0)
1771 PPCODE: 1778 PPCODE:
1772{ 1779{
1773 static const struct resval { const char *name; int value; } *rs, rslist [] = { 1780 static const struct resval { const char *name; int value; } *rs, rslist [] = {
1774# define def(name) { # name, Rs_ ## name }, 1781# define def(name) { # name, Rs_ ## name },
1775# define reserve(name,count) 1782# define reserve(name,count)
1813 THIS->rs [index] = 0; 1820 THIS->rs [index] = 0;
1814 } 1821 }
1815} 1822}
1816 1823
1817const char * 1824const char *
1818rxvt_term::x_resource (const char *name) 1825rxvt_term::x_resource (octet_string name)
1819 1826
1820bool 1827bool
1821rxvt_term::option (U8 optval, int set = -1) 1828rxvt_term::option (U8 optval, int set = -1)
1822 CODE: 1829 CODE:
1823{ 1830{
1857 } 1864 }
1858} 1865}
1859 OUTPUT: 1866 OUTPUT:
1860 RETVAL 1867 RETVAL
1861 1868
1869SV *
1870rxvt_term::lookup_keysym (int keysym, unsigned int state)
1871 CODE:
1872{
1873 keysym_t *key = THIS->keyboard->lookup_keysym (THIS, keysym, state);
1874 RETVAL = key ? sv_2mortal (newSVpv (key->str, 0)) : &PL_sv_undef;
1875}
1876 OUTPUT:
1877 RETVAL
1878
1862bool 1879bool
1863rxvt_term::bind_action (char *keysym, char *str) 1880rxvt_term::bind_action (octet_string keysym, octet_string action)
1864 ALIAS: 1881 ALIAS:
1865 parse_keysym = 1 1882 parse_keysym = 1
1866 CODE: 1883 CODE:
1867 RETVAL = 0 < THIS->bind_action (keysym, str); 1884 RETVAL = 0 < THIS->bind_action (keysym, action);
1868 THIS->keyboard->register_done (); 1885 THIS->keyboard->register_done ();
1869 OUTPUT: 1886 OUTPUT:
1870 RETVAL 1887 RETVAL
1871 1888
1872void 1889void
1993 2010
1994void 2011void
1995rxvt_term::scr_bell () 2012rxvt_term::scr_bell ()
1996 2013
1997void 2014void
1998rxvt_term::scr_recolour (bool refresh = true); 2015rxvt_term::scr_recolor (bool refresh = true);
1999 2016
2000void 2017void
2001rxvt_term::scr_change_screen (int screen) 2018rxvt_term::scr_change_screen (int screen)
2002 2019
2003void 2020void
2284 2301
2285 img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg]) 2302 img->convert_format (XRenderFindVisualFormat (THIS->dpy, THIS->visual), THIS->pix_colors [Color_bg])
2286 ->replace (img); 2303 ->replace (img);
2287 2304
2288 THIS->bg_img = img; 2305 THIS->bg_img = img;
2289 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH | rxvt_term::BG_INHIBIT_RENDER; 2306 THIS->bg_flags |= rxvt_term::BG_NEEDS_REFRESH;
2290 2307
2291 if (!border) 2308 if (!border)
2292 THIS->bg_flags |= rxvt_term::BG_IS_TRANSPARENT; 2309 THIS->bg_flags |= rxvt_term::BG_IS_TRANSPARENT;
2293 } 2310 }
2294 2311

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines