X11::XCB(3pm)

πŸ’– X11::XCB πŸ’–

okay bestie, so this is X11::XCB β€” that's the manual page name right there, X11::XCB(3pm) β€” and it's giving perl bindings for libxcb. that's the whole thing. that's the NAME section. slay.


✨ SYNOPSIS ✨

no thoughts, just vibes and some code you can literally copy-paste:

use X11::XCB::Connection;
my $x = X11::XCB::Connection->new;

my $window = $x->root->create_child(
  class => X11::XCB::WINDOW_CLASS_INPUT_OUTPUT(),
  rect => [0, 0, 200, 200],
  background_color => '#FF00FF',
);

$window->map;
print "Press Enter to continue\n";
<>;

basically you connect, you make a child window with a hot pink #FF00FF background, you map it, you make the user press Enter. iconic behavior honestly. πŸŽ€


🌸 DESCRIPTION 🌸

so these bindings wrap libxcb β€” and libxcb is a C library that talks to X11, and ngl in many cases it does it better than Xlib does in many aspects. we're serving you a nice object oriented interface to all its methods (using Mouse, the Perl thing, not the animal, don't be weird about it πŸ’…).

⚠️ real talk though, bestie β€” please understand that the aim here is NOT to give you yet another toolkit for making graphical applications. nope. this is a low-level way to communicate with X11. periodt.

so when would you even use this? great question, main character:

  • testcases for all kinds of X11 applications (this is lowkey the whole point)
  • implementing really simple applications that don't need a graphical toolkit (like GTK, QT, etc.)
  • command-line utilities that communicate with X11
🚨 WARNING: X11::XCB is in a rather early stage and so API breaks may happen in future versions. it is not yet widely used. handle with care, she's fragile πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

the geniuses behind this, in order:

  • Michael Stapelberg, <michael+xcb@stapelberg.de>
  • Maik Fischer, <maikf+xcb@qu.cx>
  • Sergei Zhmylev, <zhmylove@narod.ru>

give them their flowers, they earned them 🫢🌷


πŸŽ€ INSTALLATION πŸŽ€

to install this module, type the following β€” yes, literally this, in this order, no skipping:

perl Makefile.PL
make
make test
make install

make test is not optional if you want my respect. run your tests, bestie 🧚


Copyright (C) 2009-2023 Michael Stapelberg, Copyright (C) 2011 Maik Fischer, Copyright (C) 2023-2026 Sergei Zhmylev

this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.

so yeah β€” same terms as Perl itself, 5.10.0 or newer, your call, we're flexible like that πŸ’…


okay that's the whole page bestie, you're officially educated πŸ’– this was perl version 5.42.3, dated 2026-08-22, brought to you by X11::XCB(3pm) β€” go forth and speak to X11, no cap 🌈⭐

πŸ“¦ where this page comes from