|
| Colormap (Colormap&& src) noexcept |
|
Colormap& | operator= (Colormap&& src) noexcept |
|
| ~Colormap () noexceptoverride |
|
GdkColormap* | gobj () |
| Provides access to the underlying C GObject. More...
|
|
const GdkColormap* | gobj () const |
| Provides access to the underlying C GObject. More...
|
|
GdkColormap* | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
|
|
int | alloc_colors (ArrayHandle_Color& colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle< bool >& success) |
|
void | free_colors (Color& colors, int ncolors) |
|
bool | alloc_color (Color& color, bool writeable=false, bool best_match=true) |
| Allocates a single color from a colormap. More...
|
|
void | free_color (Color& color) |
|
void | query_color (gulong pixel, Color& result) |
| Locates the RGB color in colormap corresponding to the given hardware pixel pixel. More...
|
|
Glib::RefPtr< Visual > | get_visual () |
| Returns the visual for which a given colormap was created. More...
|
|
Glib::RefPtr< const Visual > | get_visual () const |
| Returns the visual for which a given colormap was created. More...
|
|
Glib::RefPtr< Screen > | get_screen () |
| Gets the screen for which this colormap was created. More...
|
|
Glib::RefPtr< const Screen > | get_screen () const |
| Gets the screen for which this colormap was created. More...
|
|
| Object (const Object &)=delete |
|
Object & | operator= (const Object &)=delete |
|
| Object (Object &&src) noexcept |
|
Object & | operator= (Object &&src) noexcept |
|
void * | get_data (const QueryQuark &key) |
|
void | set_data (const Quark &key, void *data) |
|
void | set_data (const Quark &key, void *data, DestroyNotify notify) |
|
void | remove_data (const QueryQuark &quark) |
|
void * | steal_data (const QueryQuark &quark) |
|
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
|
| ObjectBase (const ObjectBase &)=delete |
|
ObjectBase & | operator= (const ObjectBase &)=delete |
|
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
|
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
|
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
|
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
|
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot) |
|
void | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot) |
|
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot) |
|
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot) |
|
void | freeze_notify () |
|
void | thaw_notify () |
|
virtual void | reference () const |
|
virtual void | unreference () const |
|
GObject * | gobj () |
|
const GObject * | gobj () const |
|
GObject * | gobj_copy () const |
|
| trackable () noexcept |
|
| trackable (const trackable &src) noexcept |
|
| trackable (trackable &&src) |
|
| ~trackable () |
|
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const |
|
void | notify_callbacks () |
|
trackable & | operator= (const trackable &src) |
|
trackable & | operator= (trackable &&src) |
|
void | remove_destroy_notify_callback (void *data) const |
|
A Colormap is an object that contains the mapping between the color values stored in memory and the RGB values that are used to display color values.
In general, colormaps only contain significant information for pseudo-color visuals, but even for other visual types, a colormap object is required in some circumstances.
There are a couple of special colormaps that can be retrieved. The system colormap (retrieved with get_system()) is the default colormap of the system. If you are using GdkRGB, there is another colormap that is important - the colormap in which GdkRGB works, retrieved with Gdk::rgb_get_colormap(). However, when using GdkRGB, it is not generally necessary to allocate colors directly.
void Gdk::Colormap::query_color |
( |
gulong |
pixel, |
|
|
Color& |
result |
|
) |
| |
Locates the RGB color in colormap corresponding to the given hardware pixel pixel.
pixel must be a valid pixel in the colormap; it's a programmer error to call this function with a pixel which is not in the colormap. Hardware pixels are normally obtained from alloc_colors(), or from a Gdk::Image. (A Gdk::Image contains image data in hardware format, a Gdk::Pixbuf contains image data in a canonical 24-bit RGB format.)
This function is rarely useful; it's used for example to implement the eyedropper feature in Gtk::ColorSelection.
- Parameters
-
pixel | Pixel value in hardware display format. |
result | Gdk::Color with red, green, blue fields initialized. |