Gtk2::G...Colormap(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

✨ 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 (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