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.118 by root, Fri Dec 14 05:25:25 2007 UTC vs.
Revision 1.124 by root, Thu Jul 31 03:24:08 2008 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-2006 Marc Lehmann <pcg@goof.com> 6 * Copyright (c) 2005-2008 Marc Lehmann <pcg@goof.com>
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 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
39#include "rxvtutil.h" 39#include "rxvtutil.h"
40#include "rxvtperl.h" 40#include "rxvtperl.h"
41 41
42#include "perlxsi.c" 42#include "perlxsi.c"
43 43
44#ifdef HAVE_SCROLLBARS
45# define GRAB_CURSOR THIS->leftptr_cursor 44#define GRAB_CURSOR THIS->scrollBar.leftptr_cursor
46#else
47# define GRAB_CURSOR None
48#endif
49 45
50#undef LINENO 46#undef LINENO
51#define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) 47#define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows)
52#undef ROW 48#undef ROW
53#define ROW(n) THIS->row_buf [LINENO (n)] 49#define ROW(n) THIS->row_buf [LINENO (n)]
300 296
301///////////////////////////////////////////////////////////////////////////// 297/////////////////////////////////////////////////////////////////////////////
302 298
303#define IOM_CLASS "urxvt" 299#define IOM_CLASS "urxvt"
304#define IOM_WARN rxvt_warn 300#define IOM_WARN rxvt_warn
305#include <iom_perl.h> 301#include "iom_perl.h"
306 302
307///////////////////////////////////////////////////////////////////////////// 303/////////////////////////////////////////////////////////////////////////////
308 304
309struct rxvt_perl_interp rxvt_perl; 305struct rxvt_perl_interp rxvt_perl;
310 306
643 static const struct { 639 static const struct {
644 const char *name; 640 const char *name;
645 IV iv; 641 IV iv;
646 } *civ, const_iv[] = { 642 } *civ, const_iv[] = {
647# define const_iv(name) { # name, (IV)name } 643# define const_iv(name) { # name, (IV)name }
644 const_iv (NUM_RESOURCES),
648 const_iv (DEFAULT_RSTYLE), 645 const_iv (DEFAULT_RSTYLE),
649 const_iv (OVERLAY_RSTYLE), 646 const_iv (OVERLAY_RSTYLE),
650 const_iv (RS_Bold), 647 const_iv (RS_Bold),
651 const_iv (RS_Italic), 648 const_iv (RS_Italic),
652 const_iv (RS_Blink), 649 const_iv (RS_Blink),
1100 { 1097 {
1101 case 0: RETVAL = THIS->ModLevel3Mask; break; 1098 case 0: RETVAL = THIS->ModLevel3Mask; break;
1102 case 1: RETVAL = THIS->ModMetaMask; break; 1099 case 1: RETVAL = THIS->ModMetaMask; break;
1103 case 2: RETVAL = THIS->ModNumLockMask; break; 1100 case 2: RETVAL = THIS->ModNumLockMask; break;
1104 case 3: RETVAL = THIS->current_screen; break; 1101 case 3: RETVAL = THIS->current_screen; break;
1102#ifdef CURSOR_BLINK
1105 case 4: RETVAL = THIS->hidden_cursor; break; 1103 case 4: RETVAL = THIS->hidden_cursor; break;
1104#endif
1106 } 1105 }
1107 OUTPUT: 1106 OUTPUT:
1108 RETVAL 1107 RETVAL
1109 1108
1110char * 1109char *
1434# undef reserve 1433# undef reserve
1435 }; 1434 };
1436 1435
1437 rs = rslist + sizeof (rslist) / sizeof (rslist [0]); 1436 rs = rslist + sizeof (rslist) / sizeof (rslist [0]);
1438 1437
1438 if (*name)
1439 do { 1439 {
1440 do {
1440 if (rs-- == rslist) 1441 if (rs-- == rslist)
1441 croak ("no such resource '%s', requested", name); 1442 croak ("no such resource '%s', requested", name);
1442 } while (strcmp (name, rs->name)); 1443 } while (strcmp (name, rs->name));
1443 1444
1444 index += rs->value; 1445 index += rs->value;
1446 }
1447 else
1448 {
1449 --rs;
1450 name = "";
1451 }
1445 1452
1446 if (!IN_RANGE_EXC (index, 0, NUM_RESOURCES)) 1453 if (!IN_RANGE_EXC (index, 0, NUM_RESOURCES))
1447 croak ("requested out-of-bound resource %s+%d,", name, index - rs->value); 1454 croak ("requested out-of-bound resource %s+%d,", name, index - rs->value);
1448 1455
1449 if (GIMME_V != G_VOID) 1456 if (GIMME_V != G_VOID)
1707 XFree (prop); 1714 XFree (prop);
1708 } 1715 }
1709} 1716}
1710 1717
1711void 1718void
1712rxvt_term::XChangeWindowProperty (Window window, Atom property, Atom type, int format, SV *data) 1719rxvt_term::XChangeProperty (Window window, Atom property, Atom type, int format, SV *data)
1713 CODE: 1720 CODE:
1714{ 1721{
1715 STRLEN len; 1722 STRLEN len;
1716 char *data_ = SvPVbyte (data, len); 1723 char *data_ = SvPVbyte (data, len);
1717 1724

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines