W Wrapl, The Programming Language

Libraries:Gtk:Gdk:Color

Types

T

Constants

Nil : T

Functions

Alloc(colormap @ Gtk.Gdk.Colormap.T, color @ Gtk.Gdk.Color.T) : Std.Integer.SmallT

Warning

Alloc has been deprecated since version 2.2 and should not be used in newly-written code. Use Gtk.Gdk.Colormap.AllocColor instead.



Black(colormap @ Gtk.Gdk.Colormap.T, color @ Gtk.Gdk.Color.T) : Std.Integer.SmallT

Warning

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



Change(colormap @ Gtk.Gdk.Colormap.T, color @ Gtk.Gdk.Color.T) : Std.Integer.SmallT

Warning

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



GetType() : Gtk.GObject.Type.T



NewRgb(red @ Std.Integer.SmallT, green @ Std.Integer.SmallT, blue @ Std.Integer.SmallT) : Gtk.Gdk.Color.T



Parse(spec @ Std.String.T, color @ Gtk.Gdk.Color.T) : Std.Symbol.T

Parses a textual specification of a color and fill in the red, green, and blue fields of a T structure. The color is not allocated, you must call Gtk.Gdk.Colormap.AllocColor yourself. The string can either one of a large set of standard names. (Taken from the X11 rgb.txt file), or it can be a hex value in the form '#rgb' '#rrggbb' '#rrrgggbbb' or '#rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is '#fff' '#ffffff' '#fffffffff' and '#ffffffffffff')

spec the string specifying the color.
color the T to fill in. [out]
Returns TRUE if the parsing succeeded.


White(colormap @ Gtk.Gdk.Colormap.T, color @ Gtk.Gdk.Color.T) : Std.Integer.SmallT

Warning

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



_Alloc() : Gtk.Gdk.Color.T



Methods

:"="(_ @ T, _ @ T)

:Blue(self @ T) : Std.Integer.SmallT

:Copy(self @ T) : Gtk.Gdk.Color.T

Makes a copy of a color structure. The result must be freed using Free.

color a T.
Returns a copy of color.


:Equal(self @ T, colorb @ Gtk.Gdk.Color.T) : Std.Symbol.T

Compares two colors.

colora a T.
colorb another T.
Returns TRUE if the two colors compare equal


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

Frees a color structure created with Copy.

color a T.


:Green(self @ T) : Std.Integer.SmallT

:Hash(self @ T) : Std.Integer.SmallT

A hash function suitable for using for a hash table that stores T's.

colora a T.
Returns The hash function applied to colora


:Pixel(self @ T) : Std.Integer.SmallT

:Red(self @ T) : Std.Integer.SmallT

:ToString(self @ T) : Std.String.T

Returns a textual specification of color in the hexadecimal form #rrrrggggbbbb, where r, g and b are hex digits representing the red, green and blue components respectively.

color a T
Returns a newly-allocated text string


:setBlue(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:setGreen(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:setPixel(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:setRed(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:"~="(_ @ T, _ @ T)