--- rxvt-unicode/src/rxvtperl.xs 2006/01/20 12:16:28 1.80 +++ rxvt-unicode/src/rxvtperl.xs 2006/01/20 13:32:29 1.81 @@ -1652,15 +1652,21 @@ unsigned long nitems; unsigned long bytes_after; unsigned char *prop; + XGetWindowProperty (THIS->display->display, window, property, - 0, 1<<30, 0, AnyPropertyType, + 0, 1<<24, 0, AnyPropertyType, &type, &format, &nitems, &bytes_after, &prop); + if (type != None) { + int elemsize = format == 16 ? sizeof (short) + : format == 32 ? sizeof (long) + : 1; + EXTEND (SP, 3); PUSHs (newSVuv ((U32)type)); PUSHs (newSViv (format)); - PUSHs (newSVpvn ((char *)prop, nitems * format / 8)); + PUSHs (newSVpvn ((char *)prop, nitems * elemsize)); XFree (prop); } } @@ -1672,11 +1678,26 @@ STRLEN len; char *data_ = SvPVbyte (data, len); + int elemsize = format == 16 ? sizeof (short) + : format == 32 ? sizeof (long) + : 1; + XChangeProperty (THIS->display->display, window, property, type, format, PropModeReplace, - (unsigned char *)data, len * 8 / format); + (unsigned char *)data_, len / elemsize); + XSync (THIS->display->display, 0); } +Atom +XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE) + C_ARGS: term->display->display, atom_name, only_if_exists + +char * +XGetAtomName (rxvt_term *term, Atom atom) + C_ARGS: term->display->display, atom + CLEANUP: + XFree (RETVAL); + void XDeleteProperty (rxvt_term *term, Window window, Atom property) C_ARGS: term->display->display, window, property @@ -1688,6 +1709,8 @@ OUTPUT: RETVAL +#if 0 + Window XCreateSimpleWindow (rxvt_term *term, Window parent, int x, int y, unsigned int width, unsigned int height) C_ARGS: term->display->display, (Window)parent, @@ -1695,6 +1718,8 @@ term->pix_colors_focused[Color_border], term->pix_colors_focused[Color_border] +#endif + void XReparentWindow (rxvt_term *term, Window window, Window parent, int x = 0, int y = 0) C_ARGS: term->display->display, window, parent, x, y