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.257 by root, Fri Dec 30 16:51:59 2022 UTC vs.
Revision 1.261 by root, Tue Jul 25 18:06:07 2023 UTC

379 379
380static PerlInterpreter *perl; 380static PerlInterpreter *perl;
381 381
382#if 0 /* we are not a library anymore, so doing this is just not worth it */ 382#if 0 /* we are not a library anymore, so doing this is just not worth it */
383/*THINK/TODO: this has the side effect of, of course, not calling destructors. */ 383/*THINK/TODO: this has the side effect of, of course, not calling destructors. */
384/* but therse are not guaranteed anyway... */ 384/* but these are not guaranteed anyway... */
385rxvt_perl_interp::~rxvt_perl_interp () 385rxvt_perl_interp::~rxvt_perl_interp ()
386{ 386{
387 if (perl) 387 if (perl)
388 { 388 {
389 localise_env set_environ (perl_environ); 389 localise_env set_environ (perl_environ);
397void 397void
398rxvt_perl_interp::init () 398rxvt_perl_interp::init ()
399{ 399{
400 if (!perl) 400 if (!perl)
401 { 401 {
402 rxvt_push_locale (""); // perl init destroys current locale 402 rxvt_push_locale ("C"); // perl init destroys current locale
403 403
404 { 404 {
405 perl_environ = rxvt_environ; 405 perl_environ = rxvt_environ;
406 localise_env set_environ (perl_environ); 406 localise_env set_environ (perl_environ);
407 407
863 const_iv (Color_pointer_bg), 863 const_iv (Color_pointer_bg),
864 const_iv (Color_border), 864 const_iv (Color_border),
865 const_iv (NRS_COLORS), 865 const_iv (NRS_COLORS),
866 const_iv (TOTAL_COLORS), 866 const_iv (TOTAL_COLORS),
867 867
868 const_iv (None),
868 const_iv (CurrentTime), 869 const_iv (CurrentTime),
869 const_iv (ShiftMask), 870 const_iv (ShiftMask),
870 const_iv (LockMask), 871 const_iv (LockMask),
871 const_iv (ControlMask), 872 const_iv (ControlMask),
872 const_iv (Mod1Mask), 873 const_iv (Mod1Mask),
1213 1214
1214 av_pop (av); 1215 av_pop (av);
1215 1216
1216 delete req; 1217 delete req;
1217 1218
1219Region
1220XCreateRegion ()
1221
1222int
1223XUnionRectWithRegion (int x, int y, int w, int h, Region src, Region dst)
1224 CODE:
1225 XRectangle rect;
1226 rect.x = x;
1227 rect.y = y;
1228 rect.width = w;
1229 rect.height = h;
1230 RETVAL = XUnionRectWithRegion (&rect, src, dst);
1231 OUTPUT: RETVAL
1232
1233int
1234XIntersectRegion (Region src1, Region src2, Region res)
1235
1236int
1237XUnionRegion (Region src1, Region src2, Region res)
1238
1239int
1240XSubtractRegion (Region src1, Region src2, Region res)
1241
1242int
1243XXorRegion (Region src1, Region src2, Region res)
1244
1245int
1246XOffsetRegion (Region r, int dx, int dy)
1247
1248int
1249XShrinkRegion (Region r, int dx, int dy)
1250
1251int
1252XDestroyRegion (Region r)
1253
1218MODULE = urxvt PACKAGE = urxvt::term 1254MODULE = urxvt PACKAGE = urxvt::term
1219 1255
1220SV * 1256SV *
1221_new (AV *env, AV *arg) 1257_new (AV *env, AV *arg)
1222 CODE: 1258 CODE:
2160 int count; 2196 int count;
2161 Atom *props = XListProperties (THIS->dpy, window, &count); 2197 Atom *props = XListProperties (THIS->dpy, window, &count);
2162 2198
2163 EXTEND (SP, count); 2199 EXTEND (SP, count);
2164 while (count--) 2200 while (count--)
2165 PUSHs (newSVuv ((U32)props [count])); 2201 PUSHs (sv_2mortal (newSVuv ((U32)props [count])));
2166 2202
2167 XFree (props); 2203 XFree (props);
2168} 2204}
2169 2205
2170void 2206void
2186 int elemsize = format == 16 ? sizeof (short) 2222 int elemsize = format == 16 ? sizeof (short)
2187 : format == 32 ? sizeof (long) 2223 : format == 32 ? sizeof (long)
2188 : 1; 2224 : 1;
2189 2225
2190 EXTEND (SP, 3); 2226 EXTEND (SP, 3);
2191 PUSHs (newSVuv ((U32)type)); 2227 PUSHs (sv_2mortal (newSVuv ((U32)type)));
2192 PUSHs (newSViv (format)); 2228 PUSHs (sv_2mortal (newSViv (format)));
2193 PUSHs (newSVpvn ((char *)prop, nitems * elemsize)); 2229 PUSHs (sv_2mortal (newSVpvn ((char *)prop, nitems * elemsize)));
2194 XFree (prop); 2230 XFree (prop);
2195 } 2231 }
2196} 2232}
2197 2233
2198void 2234void
2222 XFree (RETVAL); 2258 XFree (RETVAL);
2223 2259
2224void 2260void
2225XDeleteProperty (rxvt_term *term, Window window, Atom property) 2261XDeleteProperty (rxvt_term *term, Window window, Atom property)
2226 C_ARGS: term->dpy, window, property 2262 C_ARGS: term->dpy, window, property
2227
2228Region
2229XCreateRegion ()
2230
2231int
2232XUnionRectWithRegion (int x, int y, int w, int h, Region src, Region dst)
2233 CODE:
2234 XRectangle rect;
2235 rect.x = x;
2236 rect.y = y;
2237 rect.width = w;
2238 rect.height = h;
2239 RETVAL = XUnionRectWithRegion (&rect, src, dst);
2240 OUTPUT: RETVAL
2241
2242int
2243XIntersectRegion (Region src1, Region src2, Region res)
2244
2245int
2246XUnionRegion (Region src1, Region src2, Region res)
2247
2248int
2249XSubtractRegion (Region src1, Region src2, Region res)
2250
2251int
2252XXorRegion (Region src1, Region src2, Region res)
2253
2254int
2255XOffsetRegion (Region r, int dx, int dy)
2256
2257int
2258XShrinkRegion (Region r, int dx, int dy)
2259
2260int
2261XDestroyRegion (Region r)
2262 2263
2263void 2264void
2264rxvt_term::XShapeQueryVersion () 2265rxvt_term::XShapeQueryVersion ()
2265 PPCODE: 2266 PPCODE:
2266 int major, minor; 2267 int major, minor;
2334 Window child; 2335 Window child;
2335 2336
2336 if (XTranslateCoordinates (THIS->dpy, src, dst, x, y, &dx, &dy, &child)) 2337 if (XTranslateCoordinates (THIS->dpy, src, dst, x, y, &dx, &dy, &child))
2337 { 2338 {
2338 EXTEND (SP, 3); 2339 EXTEND (SP, 3);
2339 PUSHs (newSViv (dx)); 2340 PUSHs (sv_2mortal (newSViv (dx)));
2340 PUSHs (newSViv (dy)); 2341 PUSHs (sv_2mortal (newSViv (dy)));
2341 PUSHs (newSVuv (child)); 2342 PUSHs (sv_2mortal (newSVuv (child)));
2342 } 2343 }
2343} 2344}
2344 2345
2345############################################################################# 2346#############################################################################
2346# fancy bg bloatstuff (TODO: should be moved up somewhere) 2347# fancy bg bloatstuff (TODO: should be moved up somewhere)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines