xcb_damage_create(3)
β¨ xcb_damage_create β¨
okay bestie, welcome to the xcb_damage_create(3) page from the XCB Requests corner of the manual π this one's about making a Damage object so you can stalk π a drawable and get told every time its pixels change. lowkey iconic behaviour fr fr.
πΈ NAME πΈ
xcb_damage_create β creates a Damage object to monitor changes to a drawable.
like, it's giving surveillance but make it pixel-perfect π
π SYNOPSIS π
#include <xcb/damage.h>
Request function
xcb_void_cookie_t xcb_damage_create(xcb_connection_t *conn,
xcb_damage_damage_t damage, xcb_drawable_t drawable,
uint8_t level);
π¦ REQUEST ARGUMENTS π¦
connβ the XCB connection to X11. your lil hotline to the server πdamageβ the ID you'll use to refer to the new Damage object, and you get it fromxcb_generate_id. yes bestie, you have to make the ID yourself, it's not just handed to you β¨drawableβ the ID of the drawable that's getting monitored. the main character of this whole operation πlevelβ the level of detail to be provided in Damage events. how much tea do you want spilled, basically π΅
π DESCRIPTION π
So this creates a Damage object that monitors changes to a drawable, and it specifies the level of detail to be reported for changes. that's the whole vibe check right there.
Throughout this extension, we call the changes made to the pixel contents of windows and pixmaps 'damage'. periodt. that's the terminology, no notes π«Ά
Damage accumulates as drawing happens in the drawable. Each drawing operation is guaranteed to include the set of pixels modified by that operation, but β and this is the important bit, no cap β it may include significantly more than just those pixels. The desire is for the damage to strike a balance between the number of rectangles reported and the extraneous area included. A reasonable goal is for each primitive object drawn (line, string, rectangle) to be represented as a single rectangle, and for the damage area of the operation to be the union of these rectangles. cute, right? very tidy of it π
The DAMAGE extension lets applications do one of two things:
- receive the raw rectangles as a stream of events, or
- have them partially processed within the X server, which reduces the amount of data transmitted and reduces the processing latency once the repaint operation has started.
both are valid, pick your fighter π
The Damage object holds any accumulated damage region, and it reflects the relationship between the drawable selected for damage notification and the drawable for which damage is tracked. it's keeping receipts on both sides, honestly π
β RETURN VALUE β
It returns an xcb_void_cookie_t. Any errors (if there are any) have to be handled in the event loop, bestie β that's just how void cookies roll.
If you want to handle errors directly with xcb_request_check instead, use xcb_damage_create_checked. See xcb-requests(3) for details. π
π ERRORS π
This request does never generate any errors.
not one. zero. none. it's a good egg π₯β¨
π SEE ALSO π
π AUTHOR π
Generated from damage.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
ngl if you find a typo, tell the list, they're genuinely so nice about it π
okay that's the whole page!! hope it slayed for you π mwah!! and just so you know where this lore came from: this is X Version 11, libxcb 1.17.0, page xcb_damage_create(3) β stay hydrated and go monitor some drawables, bestie π§ββοΈπΈπ¦
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms