X11::X...ection(3pm)
π NAME π
X11::XCB::Connection β bestie, this is ur β¨connection to the X serverβ¨. That's it. That's the whole name. π¦
This page lives in the User Contributed Perl Documentation corner of the manual-verse, and it's fr fr just about this one lil object that lets u talk to ur X server without losing ur mind.
πΈ METHODS πΈ
π atom
Returns a brand-new X11::XCB::Atom that's assigned to this connection. Slay, u got an atom now. π
π color
Returns a fresh new X11::XCB::Color that's assigned to this connection. Obsessed.
π root
Returns a new X11::XCB::Window that represents the X11 root window. It's giving main character energy β the root window is the mother of all windows.
π¦ input_focus
Returns the X11 input focus. Which is a window ID, btw. Not a vibe, an actual ID. π«Ά
β¨ screens
Returns an arrayref of X11::XCB::Screens.
π get_keymap
Returns an intrinsically created array with the X11 Keymap:
[
undef, # index in array is a key's scan code: 0
...
[0x31, 0x21, 0x31, 0x21, 0x0, 0x0, 0x0], # key symbol codes. scan code 10 represents key '1'
...
]
No cap, the index in that array is the key's scan code. Scan code 10 be representing the key '1'. π
π get_image_data
Returns the same hash as xcb_get_image_reply, plus an extra "data" field which contains the image data in BGRA.
{
'data' => '...', # binary data itself encoded in BGRA
'depth' => 24, # depth aka number of bits per pixel
'length' => 128, # bytes count
'sequence' => 7, # X11 request sequence
'visual' => 0 # some xcb_visualid_t (?) "NOT YET DOCUMENTED" like almost evertyhing in XCB :(
}
π not the XCB docs being "NOT YET DOCUMENTED" like almost evertyhing in XCB. The typos in the comments are iconic and I am not touching them, periodt.
π₯ get_image_data_rgba
Returns the same hash as xcb_get_image_reply_data, except the "data" is translated into the RGBA colorspace.
{
'data' => '...', # binary data itself encoded in RGBA
'depth' => 24, # depth aka number of bits per pixel
'length' => 128, # bytes count
'sequence' => 7, # X11 request sequence
'visual' => 0 # some xcb_visualid_t (?) "NOT YET DOCUMENTED" like almost evertyhing in XCB :(
}
β get_query_tree_children
Returns an intrinsically created array with the children windows identifiers for the specified window:
[ id1, id2, id3 ]
The way that's literally just a list of window IDs. Simple. Clean. Ate. π
π ok that's the whole page bestie! This was X11::X...ection(3pm) β you know, the truncated little nickname for X11::XCB::Connection β coming at u from User Contributed Perl Documentation, living that perl v5.42.3 life, dated 2026-08-22. Go forth and talk to ur X server, u absolute icon. π«Άβ¨π
π¦ where this page comes from
- ubuntu stonking: libx11-xcb-perl 0.25-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms