W Wrapl, The Programming Language

Libraries:Gtk:Gdk:Colormap

Types

T

Inherits from:

Constants

Nil : T

Functions

GetSystem() : Gtk.Gdk.Colormap.T

Gets the system's default colormap for the default screen. (See gdk_colormap_get_system_for_screen())

Returns the default colormap.


GetSystemSize() : Std.Integer.SmallT

Warning

GetSystemSize is deprecated and should not be used in newly-written code.



GetType() : Gtk.GObject.Type.T



New(visual @ Gtk.Gdk.Visual.T, allocate @ Std.Symbol.T) : Gtk.Gdk.Colormap.T

Creates a new colormap for the given visual.

visual a Gtk.Gdk.Visual.T.
allocate if TRUE, the newly created colormap will be a private colormap, and all colors in it will be allocated for the applications use.
Returns the new T.


Methods

:AllocColor(self @ T, color @ Gtk.Gdk.Color.T, writeable @ Std.Symbol.T, best_match @ Std.Symbol.T) : Std.Symbol.T

Allocates a single color from a colormap.

colormap a T.
color the color to allocate. On return the pixel field will be filled in if allocation succeeds.
writeable If TRUE, the color is allocated writeable (their values can later be changed using Gtk.Gdk.Color.Change). Writeable colors cannot be shared between applications.
best_match If TRUE, GDK will attempt to do matching against existing colors if the color cannot be allocated as requested.
Returns TRUE if the allocation succeeded.


:AllocColors(self @ T, colors @ Gtk.Gdk.Color.T, n_colors @ Std.Integer.SmallT, writeable @ Std.Symbol.T, best_match @ Std.Symbol.T, success @ Std.Object.T) : Std.Integer.SmallT

Allocates colors from a colormap.

colormap a T.
colors The color values to allocate. On return, the pixel values for allocated colors will be filled in.
n_colors The number of colors in colors.
writeable If TRUE, the colors are allocated writeable (their values can later be changed using Gtk.Gdk.Color.Change). Writeable colors cannot be shared between applications.
best_match If TRUE, GDK will attempt to do matching against existing colors if the colors cannot be allocated as requested.
success An array of length ncolors. On return, this indicates whether the corresponding color in colors was successfully allocated or not.
Returns The number of colors that were not successfully allocated.


:Change(self @ T, ncolors @ Std.Integer.SmallT) : Std.Object.T

Warning

Change is deprecated and should not be used in newly-written code.



:FreeColors(self @ T, colors @ Gtk.Gdk.Color.T, n_colors @ Std.Integer.SmallT) : Std.Object.T

Frees previously allocated colors.

colormap a T.
colors the colors to free.
n_colors the number of colors in colors.


:GetScreen(self @ T) : Gtk.Gdk.Screen.T

Gets the screen for which this colormap was created.

cmap a T
Returns the screen for which this colormap was created.


:GetVisual(self @ T) : Gtk.Gdk.Visual.T

Returns the visual for which a given colormap was created.

colormap a T.
Returns the visual of the colormap.


:QueryColor(self @ T, pixel @ Std.Integer.SmallT, result @ Gtk.Gdk.Color.T) : Std.Object.T

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 AllocColors, or from a Gtk.Gdk.Image.T. (A Gtk.Gdk.Image.T contains image data in hardware format, a Gtk.Gdk.Pixbuf.T 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 GtkColorSelection.

colormap a T
pixel pixel value in hardware display format
result Gtk.Gdk.Color.T with red, green, blue fields initialized


:Ref(self @ T) : Gtk.Gdk.Colormap.T

Warning

Ref has been deprecated since version 2.0 and should not be used in newly-written code. Use g_object_ref() instead.



:Unref(self @ T) : Std.Object.T

Warning

Unref has been deprecated since version 2.0 and should not be used in newly-written code. Use g_object_unref() instead.