… | |
… | |
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 | |
1668 | void |
1674 | void |
… | |
… | |
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 | |
|
|
1691 | Atom |
|
|
1692 | XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE) |
|
|
1693 | C_ARGS: term->display->display, atom_name, only_if_exists |
|
|
1694 | |
|
|
1695 | char * |
|
|
1696 | XGetAtomName (rxvt_term *term, Atom atom) |
|
|
1697 | C_ARGS: term->display->display, atom |
|
|
1698 | CLEANUP: |
|
|
1699 | XFree (RETVAL); |
1679 | |
1700 | |
1680 | void |
1701 | void |
1681 | XDeleteProperty (rxvt_term *term, Window window, Atom property) |
1702 | XDeleteProperty (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 | |
… | |
… | |
1685 | rxvt_term::DefaultRootWindow () |
1706 | rxvt_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 | |
1691 | Window |
1714 | Window |
1692 | XCreateSimpleWindow (rxvt_term *term, Window parent, int x, int y, unsigned int width, unsigned int height) |
1715 | XCreateSimpleWindow (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 | |
1698 | void |
1723 | void |
1699 | XReparentWindow (rxvt_term *term, Window window, Window parent, int x = 0, int y = 0) |
1724 | XReparentWindow (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 | |
1702 | void |
1727 | void |
… | |
… | |
1708 | C_ARGS: term->display->display, window |
1733 | C_ARGS: term->display->display, window |
1709 | |
1734 | |
1710 | void |
1735 | void |
1711 | XMoveResizeWindow (rxvt_term *term, Window window, int x, int y, unsigned int width, unsigned int height) |
1736 | XMoveResizeWindow (rxvt_term *term, Window window, int x, int y, unsigned int width, unsigned int height) |
1712 | C_ARGS: term->display->display, (Window)window, x, y, width, height |
1737 | C_ARGS: term->display->display, (Window)window, x, y, width, height |
|
|
1738 | |
|
|
1739 | void |
|
|
1740 | rxvt_term::XTranslateCoordinates (Window src, Window dst, int x, int y) |
|
|
1741 | PPCODE: |
|
|
1742 | { |
|
|
1743 | int dx, dy; |
|
|
1744 | Window child; |
|
|
1745 | |
|
|
1746 | if (XTranslateCoordinates (THIS->display->display, src, dst, x, y, &dx, &dy, &child)) |
|
|
1747 | { |
|
|
1748 | EXTEND (SP, 3); |
|
|
1749 | PUSHs (newSViv (dx)); |
|
|
1750 | PUSHs (newSViv (dy)); |
|
|
1751 | PUSHs (newSVuv (child)); |
|
|
1752 | } |
|
|
1753 | } |
1713 | |
1754 | |
1714 | ############################################################################# |
1755 | ############################################################################# |
1715 | # urxvt::overlay |
1756 | # urxvt::overlay |
1716 | ############################################################################# |
1757 | ############################################################################# |
1717 | |
1758 | |