Gtk2::G...Colormap(3)
β¨ NAME β¨
Gtk2::Gdk::Colormap β it's a wrapper for GdkColormap, bestie π
(this is the Gtk2::G...Colormap(3) page, in case the terminal cut the title off, which it literally always does π)
π DESCRIPTION π
okay so colormaps? they're the little bookkeepers that store the mappings between the RGB values you ask for and the actual, hardware-dependent values that get used to display those colors. the vibe is: you want a color, the hardware has opinions. π
The $colormap->alloc_color and $colormap->alloc_colors methods do the necessary work to allocate a color within the visual. and bestie, listen β this actually has nothing to do with memory management, okay? do not let the word "alloc" fool you, it's giving malloc but it is NOT malloc π so it is important that you call $colormap->free_colors to release those spots in the colormap allocated by alloc_color and alloc_colors. like, you borrowed a seat at the lunch table, you gotta give it back. periodt. π
π HIERARCHY π
Glib::Object
+----Gtk2::Gdk::Colormap
π METHODS π
colormap = Gtk2::Gdk::Colormap->new ($visual, $allocate)
$visual(Gtk2::Gdk::Visual) π¦$allocate(boolean) β¨
boolean = $colormap->alloc_color ($color, $writeable, $best_match)
$color(Gtk2::Gdk::Color) π$writeable(boolean) πΈ$best_match(boolean) π
list = $colormap->alloc_colors ($writeable, $best_match, ...)
$writeable(boolean) π$best_match(boolean) β...(list) of Gtk2::Gdk::Color's to be allocated π
Returns a list of boolean values, telling whether the color at the corresponding spot in ... could be allocated. so like, a little yes/no receipt for each one π§
$colormap->free_colors (...)
...(list) of Gtk2::Gdk::Color's to be freed π«Ά
color = $colormap->query_color ($pixel)
$pixel(unsigned) π₯
$colormap->rgb_find_color ($color)
$color(Gtk2::Gdk::Color) πΈ
screen = $cmap->get_screen
Since: gtk+ 2.2 β yeah she's got history, she's an icon π
colormap = Gtk2::Gdk::Colormap->get_system
no args, just vibes π
visual = $colormap->get_visual
also no args, also vibes β¨
π SEE ALSO π
Gtk2, Glib::Object
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
and that's the whole page, bestie π«Ά this was perl v5.42.0, dated 2025-07-25 β mwah, slay, go allocate responsibly πβ¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms