… | |
… | |
379 | |
379 | |
380 | static PerlInterpreter *perl; |
380 | static 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... */ |
385 | rxvt_perl_interp::~rxvt_perl_interp () |
385 | rxvt_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); |
… | |
… | |
397 | void |
397 | void |
398 | rxvt_perl_interp::init () |
398 | rxvt_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 | |
|
|
1219 | Region |
|
|
1220 | XCreateRegion () |
|
|
1221 | |
|
|
1222 | int |
|
|
1223 | XUnionRectWithRegion (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 | |
|
|
1233 | int |
|
|
1234 | XIntersectRegion (Region src1, Region src2, Region res) |
|
|
1235 | |
|
|
1236 | int |
|
|
1237 | XUnionRegion (Region src1, Region src2, Region res) |
|
|
1238 | |
|
|
1239 | int |
|
|
1240 | XSubtractRegion (Region src1, Region src2, Region res) |
|
|
1241 | |
|
|
1242 | int |
|
|
1243 | XXorRegion (Region src1, Region src2, Region res) |
|
|
1244 | |
|
|
1245 | int |
|
|
1246 | XOffsetRegion (Region r, int dx, int dy) |
|
|
1247 | |
|
|
1248 | int |
|
|
1249 | XShrinkRegion (Region r, int dx, int dy) |
|
|
1250 | |
|
|
1251 | int |
|
|
1252 | XDestroyRegion (Region r) |
|
|
1253 | |
1218 | MODULE = urxvt PACKAGE = urxvt::term |
1254 | MODULE = urxvt PACKAGE = urxvt::term |
1219 | |
1255 | |
1220 | SV * |
1256 | SV * |
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 | |
2170 | void |
2206 | void |
… | |
… | |
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 | |
2198 | void |
2234 | void |
… | |
… | |
2222 | XFree (RETVAL); |
2258 | XFree (RETVAL); |
2223 | |
2259 | |
2224 | void |
2260 | void |
2225 | XDeleteProperty (rxvt_term *term, Window window, Atom property) |
2261 | XDeleteProperty (rxvt_term *term, Window window, Atom property) |
2226 | C_ARGS: term->dpy, window, property |
2262 | C_ARGS: term->dpy, window, property |
2227 | |
|
|
2228 | Region |
|
|
2229 | XCreateRegion () |
|
|
2230 | |
|
|
2231 | int |
|
|
2232 | XUnionRectWithRegion (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 | |
|
|
2242 | int |
|
|
2243 | XIntersectRegion (Region src1, Region src2, Region res) |
|
|
2244 | |
|
|
2245 | int |
|
|
2246 | XUnionRegion (Region src1, Region src2, Region res) |
|
|
2247 | |
|
|
2248 | int |
|
|
2249 | XSubtractRegion (Region src1, Region src2, Region res) |
|
|
2250 | |
|
|
2251 | int |
|
|
2252 | XXorRegion (Region src1, Region src2, Region res) |
|
|
2253 | |
|
|
2254 | int |
|
|
2255 | XOffsetRegion (Region r, int dx, int dy) |
|
|
2256 | |
|
|
2257 | int |
|
|
2258 | XShrinkRegion (Region r, int dx, int dy) |
|
|
2259 | |
|
|
2260 | int |
|
|
2261 | XDestroyRegion (Region r) |
|
|
2262 | |
2263 | |
2263 | void |
2264 | void |
2264 | rxvt_term::XShapeQueryVersion () |
2265 | rxvt_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) |