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