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.97 by root, Sat Feb 4 16:12:48 2006 UTC vs.
Revision 1.101 by root, Wed Jul 5 23:34:14 2006 UTC

355 355
356 int i; 356 int i;
357 357
358 for (i = AvFILL (overlay_av); i >= 0; i--) 358 for (i = AvFILL (overlay_av); i >= 0; i--)
359 if (SvIV (*av_fetch (overlay_av, i, 1)) == (long)this) 359 if (SvIV (*av_fetch (overlay_av, i, 1)) == (long)this)
360 {
361 av_delete (overlay_av, i, G_DISCARD);
362 break; 360 break;
363 }
364 361
365 for (; i < AvFILL (overlay_av); i++) 362 for (; i < AvFILL (overlay_av); i++)
366 av_store (overlay_av, i, SvREFCNT_inc (*av_fetch (overlay_av, i + 1, 0))); 363 av_store (overlay_av, i, SvREFCNT_inc (*av_fetch (overlay_av, i + 1, 0)));
367 364
368 av_pop (overlay_av); 365 av_pop (overlay_av);
923 RETVAL 920 RETVAL
924 921
925int 922int
926SET_FGCOLOR (int rend, int new_color) 923SET_FGCOLOR (int rend, int new_color)
927 CODE: 924 CODE:
928 RETVAL = SET_FGCOLOR (rend, new_color); 925 RETVAL = SET_FGCOLOR (rend, clamp (new_color, 0, TOTAL_COLORS - 1));
929 OUTPUT: 926 OUTPUT:
930 RETVAL 927 RETVAL
931 928
932int 929int
933SET_BGCOLOR (int rend, int new_color) 930SET_BGCOLOR (int rend, int new_color)
934 CODE: 931 CODE:
935 RETVAL = SET_BGCOLOR (rend, new_color); 932 RETVAL = SET_BGCOLOR (rend, clamp (new_color, 0, TOTAL_COLORS - 1));
936 OUTPUT: 933 OUTPUT:
937 RETVAL 934 RETVAL
938 935
939int 936int
940GET_CUSTOM (int rend) 937GET_CUSTOM (int rend)
1209 } 1206 }
1210 OUTPUT: 1207 OUTPUT:
1211 RETVAL 1208 RETVAL
1212 1209
1213SV * 1210SV *
1214rxvt_term::_env () 1211rxvt_term::envv ()
1212 ALIAS:
1213 argv = 1
1215 CODE: 1214 PPCODE:
1216{ 1215{
1217 if (THIS->envv) 1216 stringvec *vec = ix ? THIS->argv : THIS->envv;
1218 {
1219 AV *av = newAV ();
1220 1217
1218 EXTEND (SP, vec->size ());
1219
1221 for (char **i = THIS->envv->begin (); i != THIS->envv->end (); ++i) 1220 for (char **i = vec->begin (); i != vec->end (); ++i)
1222 if (*i) 1221 if (*i)
1223 av_push (av, newSVpv (*i, 0)); 1222 PUSHs (sv_2mortal (newSVpv (*i, 0)));
1224
1225 RETVAL = newRV_noinc ((SV *)av);
1226 }
1227 else
1228 RETVAL = &PL_sv_undef;
1229} 1223}
1230 OUTPUT:
1231 RETVAL
1232 1224
1233int 1225int
1234rxvt_term::pty_ev_events (int events = EVENT_UNDEF) 1226rxvt_term::pty_ev_events (int events = EVENT_UNDEF)
1235 CODE: 1227 CODE:
1236 RETVAL = THIS->pty_ev.events; 1228 RETVAL = THIS->pty_ev.events;
1290void 1282void
1291rxvt_term::focus_in () 1283rxvt_term::focus_in ()
1292 1284
1293void 1285void
1294rxvt_term::focus_out () 1286rxvt_term::focus_out ()
1287
1288void
1289rxvt_term::key_press (unsigned int state, unsigned int keycode, Time time = CurrentTime)
1290 ALIAS:
1291 key_release = 1
1292 CODE:
1293{
1294 XKeyEvent xkey;
1295
1296 memset (&xkey, 0, sizeof (xkey));
1297
1298 xkey.time = time;
1299 xkey.state = state;
1300 xkey.keycode = keycode;
1301
1302 xkey.type = ix ? KeyRelease : KeyPress;
1303 xkey.display = THIS->dpy;
1304 xkey.window = THIS->vt;
1305 xkey.root = THIS->display->root;
1306 xkey.subwindow = THIS->vt;
1307
1308 if (ix)
1309 THIS->key_release (xkey);
1310 else
1311 THIS->key_press (xkey);
1312}
1295 1313
1296void 1314void
1297rxvt_term::want_refresh () 1315rxvt_term::want_refresh ()
1298 CODE: 1316 CODE:
1299 THIS->want_refresh = 1; 1317 THIS->want_refresh = 1;
1786 : 1; 1804 : 1;
1787 1805
1788 XChangeProperty (THIS->dpy, window, property, 1806 XChangeProperty (THIS->dpy, window, property,
1789 type, format, PropModeReplace, 1807 type, format, PropModeReplace,
1790 (unsigned char *)data_, len / elemsize); 1808 (unsigned char *)data_, len / elemsize);
1791 XSync (THIS->dpy, 0);
1792} 1809}
1793 1810
1794Atom 1811Atom
1795XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE) 1812XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE)
1796 C_ARGS: term->dpy, atom_name, only_if_exists 1813 C_ARGS: term->dpy, atom_name, only_if_exists

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines