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.142 by sf-exg, Fri Jul 1 19:07:08 2011 UTC vs.
Revision 1.151 by root, Thu Jan 19 13:04:12 2012 UTC

23#define line_t perl_line_t 23#define line_t perl_line_t
24#include <EXTERN.h> 24#include <EXTERN.h>
25#include <perl.h> 25#include <perl.h>
26#include <XSUB.h> 26#include <XSUB.h>
27#undef line_t 27#undef line_t
28#undef bool // perl defines it's own bool type, except with g++... what a trap
28 29
29#include "../config.h" 30#include "../config.h"
30 31
31#include <cstddef> 32#include <cstddef>
32#include <cstdarg> 33#include <cstdarg>
799 const_iv (XIMDontChange), 800 const_iv (XIMDontChange),
800# endif 801# endif
801# endif 802# endif
802 }; 803 };
803 804
804 for (civ = const_iv + ecb_array_length (const_iv); civ-- > const_iv; ) 805 for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--)
805 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 806 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
806} 807}
807 808
808void 809void
809warn (const char *msg) 810warn (const char *msg)
810 CODE: 811 CODE:
920 CODE: 921 CODE:
921{ 922{
922 rxvt_term *term = new rxvt_term; 923 rxvt_term *term = new rxvt_term;
923 924
924 stringvec *argv = new stringvec; 925 stringvec *argv = new stringvec;
925 stringvec *envv = new stringvec;
926
927 for (int i = 0; i <= AvFILL (arg); i++) 926 for (int i = 0; i <= AvFILL (arg); i++)
928 argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1)))); 927 argv->push_back (strdup (SvPVbyte_nolen (*av_fetch (arg, i, 1))));
929 928
929 stringvec *envv = new stringvec;
930 for (int i = AvFILL (env) + 1; i--; ) 930 for (int i = AvFILL (env) + 1; i--; )
931 envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1)))); 931 envv->push_back (strdup (SvPVbyte_nolen (*av_fetch (env, i, 1))));
932
933 envv->push_back (0);
934 932
935 try 933 try
936 { 934 {
937 term->init (argv, envv); 935 term->init (argv, envv);
938 } 936 }
978 976
979void 977void
980rxvt_term::XUngrabKey (int keycode, U32 modifiers, Window window = THIS->vt) 978rxvt_term::XUngrabKey (int keycode, U32 modifiers, Window window = THIS->vt)
981 CODE: 979 CODE:
982 XUngrabKey (THIS->dpy, keycode, modifiers, window); 980 XUngrabKey (THIS->dpy, keycode, modifiers, window);
983
984void
985rxvt_term::XUngrabKeyboard (Time eventtime)
986 CODE:
987 XUngrabKeyboard (THIS->dpy, eventtime);
988 981
989bool 982bool
990rxvt_term::grab (Time eventtime, int sync = 0) 983rxvt_term::grab (Time eventtime, int sync = 0)
991 CODE: 984 CODE:
992{ 985{
1104 rxvt_pop_locale (); 1097 rxvt_pop_locale ();
1105 1098
1106 RETVAL = wcs2sv (wstr); 1099 RETVAL = wcs2sv (wstr);
1107 free (wstr); 1100 free (wstr);
1108} 1101}
1109 OUTPUT:
1110 RETVAL
1111
1112char *
1113rxvt_term::locale ()
1114 CODE:
1115 RETVAL = THIS->locale;
1116 OUTPUT: 1102 OUTPUT:
1117 RETVAL 1103 RETVAL
1118 1104
1119#define TERM_OFFSET(sym) offsetof (TermWin_t, sym) 1105#define TERM_OFFSET(sym) offsetof (TermWin_t, sym)
1120 1106
1266} 1252}
1267 OUTPUT: 1253 OUTPUT:
1268 RETVAL 1254 RETVAL
1269 1255
1270void 1256void
1257rxvt_term::set_urgency (bool enable)
1258
1259void
1271rxvt_term::focus_in () 1260rxvt_term::focus_in ()
1272 1261
1273void 1262void
1274rxvt_term::focus_out () 1263rxvt_term::focus_out ()
1275 1264
1555 1544
1556 if (set >= 0) 1545 if (set >= 0)
1557 { 1546 {
1558 THIS->set_option (optval, set); 1547 THIS->set_option (optval, set);
1559 1548
1560 if (THIS->env_colorfgbg [0]) // avoid doing this before START 1549 if (THIS->init_done) // avoid doing this before START
1561 switch (optval) 1550 switch (optval)
1562 { 1551 {
1563 case Opt_skipBuiltinGlyphs: 1552 case Opt_skipBuiltinGlyphs:
1564 THIS->set_fonts (); 1553 THIS->set_fonts ();
1565 THIS->scr_remap_chars (); 1554 THIS->scr_remap_chars ();
1588 CODE: 1577 CODE:
1589 RETVAL = 0 < THIS->parse_keysym (keysym, str); 1578 RETVAL = 0 < THIS->parse_keysym (keysym, str);
1590 THIS->keyboard->register_done (); 1579 THIS->keyboard->register_done ();
1591 OUTPUT: 1580 OUTPUT:
1592 RETVAL 1581 RETVAL
1582
1583void
1584rxvt_term::register_command (int keysym, unsigned int state, SV *str)
1585 CODE:
1586 wchar_t *wstr = sv2wcs (str);
1587 THIS->keyboard->register_user_translation (keysym, state, wstr);
1588 free (wstr);
1593 1589
1594void 1590void
1595rxvt_term::screen_cur (...) 1591rxvt_term::screen_cur (...)
1596 PROTOTYPE: $;$$ 1592 PROTOTYPE: $;$$
1597 ALIAS: 1593 ALIAS:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines