XSHAPE(3)
β¨ XSHAPE β¨
okay bestie, sit down, hydrate, because this is the X nonrectangular shape functions page from section 3 of the manual (XSHAPE(3), in case you were wondering which page you wandered into π ). It's the whole girlboss toolkit for making windows that are not rectangles. groundbreaking, honestly.
π SYNTAX π
first things first, you gotta bring the header along or nothing works:
#include <X11/extensions/shape.h>
and here's every single function, signature and all, no notes:
Bool XShapeQueryExtension (
Display *dpy,
int *event_basep,
int *error_basep);
Status XShapeQueryVersion (
Display *dpy,
int *major_versionp,
int *minor_versionp);
void XShapeCombineRegion (
Display *dpy,
Window dest,
int destKind,
int xOff,
int yOff,
struct _XRegion *r,
int op);
void XShapeCombineRectangles (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
XRectangle *rects,
int n_rects,
int op,
int ordering);
void XShapeCombineMask (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
Pixmap src,
int op);
void XShapeCombineShape (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff,
Pixmap src,
int srcKind,
int op);
void XShapeOffsetShape (
Display *dpy,
XID dest,
int destKind,
int xOff,
int yOff);
Status XShapeQueryExtents (
Display *dpy,
Window window,
int *bShaped,
int *xbs,
int *ybs,
unsigned int *wbs,
unsigned int *hbs,
int *cShaped,
int *xcs,
int *ycs,
unsigned int *wcs,
unsigned int *hcs);
void XShapeSelectInput (
Display *dpy,
Window window,
unsigned longmask);
unsigned long XShapeInputSelected (
Display *dpy,
Window window);
XRectangle *XShapeGetRectangles (
Display *dpy,
Window window,
int kind,
int *count,
int *ordering);
β οΈ heads up bestie:XShapeSelectInputreally does take anunsigned longmaskwith no space, exactly like that. That's not me being messy, that's the source material. copy it verbatim or the compiler will simply Not.
𧬠STRUCTURES π§¬
there is exactly one struct on this page and she is the moment:
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* window of event */
int kind; /* ShapeBounding or ShapeClip */
int x, y; /* extents of new region */
unsigned width, height;
Time time; /* server timestamp when region changed */
Bool shaped; /* true if the region exists */
} XShapeEvent;
every comment in there is load-bearing, keep them π«Ά
π DESCRIPTION π
so the tea is: the X11 Nonrectangular Window Shape Extension adds nonrectangular windows to the X Window System. that's it. that's the description. iconic of her honestly π
π PREDEFINED VALUES π
π§ Operations
these are the things you can do to a shape, pick your fighter:
ShapeSetShapeUnionShapeIntersectShapeSubtractShapeInvert
π¦ Shape Kinds
the two flavours of shape, no third option, don't ask:
ShapeBoundingShapeClip
β Event defines
the event-adjacent constants, your notifications basically:
ShapeNotifyMaskShapeNotify
π BUGS π
ngl, and I quote: this manual page needs a lot more work. she said "I'm under construction" and meant it π
πΈ SEE ALSO πΈ
go read X11 Nonrectangular Window Shape Extension next, bestie. that's the whole reading list.
okay that's the whole page, you ate it, I'm so proud of you π this one's from X Version 11, shipped with libXext 1.3.6 β XSHAPE(3) and out, mwah πβ¨
π¦ where this page comes from
- alpine 3.22: libxext-doc 1.3.6-r2 Β· MIT
- alpine 3.23: libxext-doc 1.3.6-r2 Β· MIT
- centos-stream 10: libXext-devel 1.3.6-3.el10 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- fedora 43: libXext-devel 1.3.6-4.fc43 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- fedora 43: libXext-devel 1.3.6-4.fc43 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- fedora 44: libXext-devel 1.3.6-5.fc44 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- fedora 44: libXext-devel 1.3.6-5.fc44 Β· MIT-open-group AND X11 AND HPND AND HPND-sell-variant AND SMLNJ AND MIT AND ISC AND HPND-doc AND HPND-doc-sell
- opensuse-leap 16.0: libXext-devel 1.3.6-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXext-devel 1.3.6-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXext-devel 1.3.6-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXext-devel 1.3.6-160000.3.2 Β· MIT
- Copyright (c) 1989, 1994 X Consortium
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms