| GDK Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <gdk/gdk.h>
GdkRGBA;
GdkRGBA * gdk_rgba_copy (GdkRGBA *rgba);
void gdk_rgba_free (GdkRGBA *rgba);
gboolean gdk_rgba_parse (const gchar *spec,
GdkRGBA *rgba);
gboolean gdk_rgba_equal (gconstpointer p1,
gconstpointer p2);
guint gdk_rgba_hash (gconstpointer p);
gchar * gdk_rgba_to_string (const GdkRGBA *rgba);
GdkRGBA * gdk_rgba_copy (GdkRGBA *rgba);
Makes a copy of a GdkRGBA structure, the result must be freed
through gdk_rgba_free().
void gdk_rgba_free (GdkRGBA *rgba);
Frees a GdkRGBA struct created with gdk_rgba_copy()
|
a GdkRGBA |
gboolean gdk_rgba_parse (const gchar *spec,GdkRGBA *rgba);
Parses a textual representation of a color, filling in
the red, green,
blue and alpha
fields of the rgba struct.
The string can be either one of:
Where 'r', 'g', 'b' and 'a' are respectively the red, green, blue and alpha color values. In the last two cases, r g and b are either integers in the range 0 to 255 or precentage values in the range 0% to 100%, and a is a floating point value in the range 0 to 1.
|
the string specifying the color |
|
the GdkRGBA struct to fill in |
Returns : |
TRUE if the parsing succeeded |
gboolean gdk_rgba_equal (gconstpointer p1,gconstpointer p2);
Compares two RGBA colors.
guint gdk_rgba_hash (gconstpointer p);
A hash function suitable for using for a hash table that stores GdkRGBAs.
|
a GdkRGBA pointer. |
Returns : |
The hash function applied to p
|
gchar * gdk_rgba_to_string (const GdkRGBA *rgba);
Returns a textual specification of rgba in the form rgb
(r, g, b) or rgba (r, g, b, a),
where 'r', 'g', 'b' and 'a' represent the red, green, blue and alpha values
respectively. r, g, and b are integers in the range 0 to 255, and a
is a floating point value in the range 0 to 1.
(These string forms are string forms those supported by the CSS3 colors module)
|
a GdkRGBA |
Returns : |
A newly allocated text string |