X11::A...stants(3pm)
πΈ X11::AtomConstants β NAME π
okay so bestie, this page is X11::A...stants(3pm) (yes the header truncates it, it's giving β¨mysteriousβ¨) and the whole vibe is: X11::AtomConstants β predefined X11 atoms. that's it, that's the name, she's simple and she serves π
β¨ SYNOPSIS β¨
you drop her in and go:
use X11::AtomConstants;
$X->ChangeProperty($window,
X11::AtomConstants::WM_NAME, # property
X11::AtomConstants::PIXMAP, # type
8, # format
'Replace',
'My Window Title');
look at that. WM_NAME as the property, PIXMAP as the type, format 8, mode 'Replace', and the title 'My Window Title'. chef's kiss π«Ά
π¦ DESCRIPTION π¦
so these are the X11 pre-defined atoms, packaged up as Perl constants. that's the whole thing. for example PIXMAP is 20, because the PIXMAP atom is number 20, no cap:
my $atom_id = X11::AtomConstants::PIXMAP; # $atom_id is 20
my $name = $X->GetAtomName($atom_id); # $name is "PIXMAP"
see how she round-trips? you give the number, you get the name back. iconic behavior, honestly π
now β LAST_PREDEFINED is not an atom, bestie, don't let the name fool you. she's just the last of the predefined values, and that value happens to be WM_TRANSIENT_FOR. periodt.
here's the full roster, every single one, no skips, i would never π
PRIMARYβ1SECONDARYβ2ARCβ3ATOMβ4BITMAPβ5CARDINALβ6COLORMAPβ7CURSORβ8CUT_BUFFER0β9CUT_BUFFER1β10CUT_BUFFER2β11CUT_BUFFER3β12CUT_BUFFER4β13CUT_BUFFER5β14CUT_BUFFER6β15CUT_BUFFER7β16DRAWABLEβ17FONTβ18INTEGERβ19PIXMAPβ20POINTβ21RECTANGLEβ22RESOURCE_MANAGERβ23RGB_COLOR_MAPβ24RGB_BEST_MAPβ25RGB_BLUE_MAPβ26RGB_DEFAULT_MAPβ27RGB_GRAY_MAPβ28RGB_GREEN_MAPβ29RGB_RED_MAPβ30STRINGβ31VISUALIDβ32WINDOWβ33WM_COMMANDβ34WM_HINTSβ35WM_CLIENT_MACHINEβ36WM_ICON_NAMEβ37WM_ICON_SIZEβ38WM_NAMEβ39WM_NORMAL_HINTSβ40WM_SIZE_HINTSβ41WM_ZOOM_HINTSβ42MIN_SPACEβ43NORM_SPACEβ44MAX_SPACEβ45END_SPACEβ46SUPERSCRIPT_Xβ47SUPERSCRIPT_Yβ48SUBSCRIPT_Xβ49SUBSCRIPT_Yβ50UNDERLINE_POSITIONβ51UNDERLINE_THICKNESSβ52STRIKEOUT_ASCENTβ53STRIKEOUT_DESCENTβ54ITALIC_ANGLEβ55X_HEIGHTβ56QUAD_WIDTHβ57WEIGHTβ58POINT_SIZEβ59RESOLUTIONβ60COPYRIGHTβ61NOTICEβ62FONT_NAMEβ63FAMILY_NAMEβ64FULL_NAMEβ65CAP_HEIGHTβ66WM_CLASSβ67WM_TRANSIENT_FORβ68LAST_PREDEFINEDβ68
sixty-eight of them and then LAST_PREDEFINED also sitting at 68 like π because she is the last one. the math is mathing.
π EXPORTS π
nothing is exported by default, bestie β she's not gonna dump 68 constants in your namespace uninvited, she has boundaries. but you can ask for them the usual Exporter way:
use X11::AtomConstants 'PIXMAP';
blah (atom => PIXMAP);
and if you want everything, the :all tag imports the whole squad:
use X11::AtomConstants ':all';
blah (atom1 => POINT,
atom2 => RECTANGLE);
lowkey heads up though: a lot of these atoms have super generic names βSTRING,WEIGHT, like girl, those could mean anything π β so importing them might not be the move. and that's fine!! you can always just use the full package name and nobody gets hurt:
use X11::AtomConstants;
blah (atom => X11::AtomConstants::PIXMAP);
fully-qualified and unbothered. that's the safe route, fr fr.
π SEE ALSO π
go read these too, they're all part of the same little universe:
X11::CursorFontX11::KeysymsX11::ProtocolX11::Protocol::OtherX11::Protocol::WM
and for the real source-of-truth tea:
- the X Window System Protocol specification (the values live in Appendix B), at
/usr/share/X11/doc/hardcopy/XProtocol/proto.PS.gz /usr/include/X11/Xatom.h
π HOME PAGE π
<http://user42.tuxfamily.org/x11-protocol-other/index.html>
π LICENSE π
Copyright 2011, 2012, 2013, 2014, 2017 Kevin Ryde.
X11-Protocol-Other is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
X11-Protocol-Other is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with X11-Protocol-Other. If not, see <http://www.gnu.org/licenses/>.
and that's the whole page, bestie!! π this was X11::A...stants(3pm) from the User Contributed Perl Documentation, perl v5.28.1, dated 2019-08-26 β go forth and name your atoms, you absolute main character π¦β¨π
π¦ where this page comes from
- debian bookworm: libx11-protocol-other-perl 31-1 Β· GPL-3.0-or-later
- debian trixie: libx11-protocol-other-perl 31-1 Β· GPL-3.0-or-later
- ubuntu jammy: libx11-protocol-other-perl 31-1 Β· GPL-3.0-or-later
- ubuntu noble: libx11-protocol-other-perl 31-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms