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.80 by root, Fri Jan 20 12:16:28 2006 UTC vs.
Revision 1.81 by root, Fri Jan 20 13:32:29 2006 UTC

1650 Atom type; 1650 Atom type;
1651 int format; 1651 int format;
1652 unsigned long nitems; 1652 unsigned long nitems;
1653 unsigned long bytes_after; 1653 unsigned long bytes_after;
1654 unsigned char *prop; 1654 unsigned char *prop;
1655
1655 XGetWindowProperty (THIS->display->display, window, property, 1656 XGetWindowProperty (THIS->display->display, window, property,
1656 0, 1<<30, 0, AnyPropertyType, 1657 0, 1<<24, 0, AnyPropertyType,
1657 &type, &format, &nitems, &bytes_after, &prop); 1658 &type, &format, &nitems, &bytes_after, &prop);
1659
1658 if (type != None) 1660 if (type != None)
1659 { 1661 {
1662 int elemsize = format == 16 ? sizeof (short)
1663 : format == 32 ? sizeof (long)
1664 : 1;
1665
1660 EXTEND (SP, 3); 1666 EXTEND (SP, 3);
1661 PUSHs (newSVuv ((U32)type)); 1667 PUSHs (newSVuv ((U32)type));
1662 PUSHs (newSViv (format)); 1668 PUSHs (newSViv (format));
1663 PUSHs (newSVpvn ((char *)prop, nitems * format / 8)); 1669 PUSHs (newSVpvn ((char *)prop, nitems * elemsize));
1664 XFree (prop); 1670 XFree (prop);
1665 } 1671 }
1666} 1672}
1667 1673
1668void 1674void
1670 CODE: 1676 CODE:
1671{ 1677{
1672 STRLEN len; 1678 STRLEN len;
1673 char *data_ = SvPVbyte (data, len); 1679 char *data_ = SvPVbyte (data, len);
1674 1680
1681 int elemsize = format == 16 ? sizeof (short)
1682 : format == 32 ? sizeof (long)
1683 : 1;
1684
1675 XChangeProperty (THIS->display->display, window, property, 1685 XChangeProperty (THIS->display->display, window, property,
1676 type, format, PropModeReplace, 1686 type, format, PropModeReplace,
1677 (unsigned char *)data, len * 8 / format); 1687 (unsigned char *)data_, len / elemsize);
1688 XSync (THIS->display->display, 0);
1678} 1689}
1690
1691Atom
1692XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE)
1693 C_ARGS: term->display->display, atom_name, only_if_exists
1694
1695char *
1696XGetAtomName (rxvt_term *term, Atom atom)
1697 C_ARGS: term->display->display, atom
1698 CLEANUP:
1699 XFree (RETVAL);
1679 1700
1680void 1701void
1681XDeleteProperty (rxvt_term *term, Window window, Atom property) 1702XDeleteProperty (rxvt_term *term, Window window, Atom property)
1682 C_ARGS: term->display->display, window, property 1703 C_ARGS: term->display->display, window, property
1683 1704
1685rxvt_term::DefaultRootWindow () 1706rxvt_term::DefaultRootWindow ()
1686 CODE: 1707 CODE:
1687 RETVAL = THIS->display->root; 1708 RETVAL = THIS->display->root;
1688 OUTPUT: 1709 OUTPUT:
1689 RETVAL 1710 RETVAL
1711
1712#if 0
1690 1713
1691Window 1714Window
1692XCreateSimpleWindow (rxvt_term *term, Window parent, int x, int y, unsigned int width, unsigned int height) 1715XCreateSimpleWindow (rxvt_term *term, Window parent, int x, int y, unsigned int width, unsigned int height)
1693 C_ARGS: term->display->display, (Window)parent, 1716 C_ARGS: term->display->display, (Window)parent,
1694 x, y, width, height, 0, 1717 x, y, width, height, 0,
1695 term->pix_colors_focused[Color_border], 1718 term->pix_colors_focused[Color_border],
1696 term->pix_colors_focused[Color_border] 1719 term->pix_colors_focused[Color_border]
1697 1720
1721#endif
1722
1698void 1723void
1699XReparentWindow (rxvt_term *term, Window window, Window parent, int x = 0, int y = 0) 1724XReparentWindow (rxvt_term *term, Window window, Window parent, int x = 0, int y = 0)
1700 C_ARGS: term->display->display, window, parent, x, y 1725 C_ARGS: term->display->display, window, parent, x, y
1701 1726
1702void 1727void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines