XClearArea(3)
π NAME π
okay so welcome to XClearArea(3) from the XLIB FUNCTIONS crew, bestie β¨ β this is the duo XClearArea and XClearWindow, and their whole job is literally clearing an area or a window. Main character cleanup energy, no cap π
π οΈ SYNTAX π οΈ
int XClearArea(Display *display, Window w, int x, int y, unsigned width,
unsigned height, Bool exposures);
int XClearWindow(Display *display, Window w);
π ARGUMENTS π
displayβ Specifies the connection to the X server. Your direct line to the server, basically π«Άexposuresβ Specifies a Boolean value that indicates ifExposeevents are to be generated. So: are we sending out redraw notifications? πwβ Specifies the window. The lucky window getting cleared πwidth,heightβ Specify the width and height, which are the dimensions of the rectangle. The size of the clear-rectangle moment πx,yβ Specify the x and y coordinates, which are relative to the origin of the window and specify the upper-left corner of the rectangle. Top-left corner coded in, periodt β¨
β¨ DESCRIPTION β¨
The XClearArea function paints a rectangular area in the specified window according to the specified dimensions with the window's background pixel or pixmap. It's giving fresh background coat, bestie π¨ The subwindow-mode effectively is ClipByChildren.
If width is zero, it is replaced with the current width of the window minus x. If height is zero, it is replaced with the current height of the window minus y. So zero is not "nothing" here β it's "surprise, you get the rest of the window" energy π
If the window has a defined background tile, the rectangle clipped by any children is filled with this tile. If the window has background None, the contents of the window are not changed. In either case, if exposures is True, one or more Expose events are generated for regions of the rectangle that are either visible or are being retained in a backing store. If you specify a window whose class is InputOnly, a BadMatch error results. Rude, but iconic π
XClearArea can generate BadMatch, BadValue, and BadWindow errors.
The XClearWindow function clears the entire area in the specified window and is equivalent to XClearArea (display, w, 0, 0, 0, 0, False). If the window has a defined background tile, the rectangle is tiled with a plane-mask of all ones and GXcopy function. If the window has background None, the contents of the window are not changed. If you specify a window whose class is InputOnly, a BadMatch error results.
XClearWindow can generate BadMatch and BadWindow errors.
π DIAGNOSTICS π
BadMatchβ AnInputOnlywindow is used as aDrawable. Not the vibe. Absolutely not allowed π€BadValueβ Some numeric value falls outside the range of values accepted by the request. Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument defined as a set of alternatives can generate this error.BadWindowβ A value for aWindowargument does not name a definedWindow. The window said "who dis?" and honestly same π
π SEE ALSO π
XCopyArea(3)Xlib - C Language X Interface
and that's the whole vibe, bestie β this page came from X Version 11, libX11 1.8.14, and yes she ate π
ππ«Ά
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms