Scroll to navigation

X11::XCB::Connection(3pm) User Contributed Perl Documentation X11::XCB::Connection(3pm)

NAME

X11::XCB::Connection - connection to the X server

METHODS

atom

Returns a new "X11::XCB::Atom" assigned to this connection.

color

Returns a new "X11::XCB::Color" assigned to this connection.

root

Returns a new "X11::XCB::Window" representing the X11 root window.

input_focus

Returns the X11 input focus (a window ID).

screens

Returns an arrayref of X11::XCB::Screens.

get_keymap

Returns intrinsically created array with 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'
    ...
  ]

get_image_data

Returns the same hash as xcb_get_image_reply along with additional "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 :(
  }

get_image_data_rgba

Returns the same hash as xcb_get_image_reply_data with "data" translated into 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 intrinsically created array with children windows identifiers for specified window:

  [ id1, id2, id3 ]
2025-08-21 perl v5.40.1