1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="Clutter Reference Manual">
8 <link rel="up" href="ch11.html" title="General purpose API">
9 <link rel="prev" href="ch11.html" title="General purpose API">
10 <link rel="next" href="clutter-Key-Bindings.html" title="Key Bindings">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="ch11.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch11.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">Clutter Reference Manual</th>
21 <td><a accesskey="n" href="clutter-Key-Bindings.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#clutter-Colors.synopsis" class="shortcut">Top</a>
26 <a href="#clutter-Colors.description" class="shortcut">Description</a>
29 <div class="refentry">
30 <a name="clutter-Colors"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="clutter-Colors.top_of_page"></a>Colors</span></h2>
34 <p>Colors — Color management and manipulation.</p>
36 <td valign="top" align="right"></td>
38 <div class="refsynopsisdiv">
39 <a name="clutter-Colors.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis"> <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor">ClutterColor</a>;
41 <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="returnvalue">ClutterColor</span></a> * <a class="link" href="clutter-Colors.html#clutter-color-new" title="clutter_color_new ()">clutter_color_new</a> (<em class="parameter"><code><span class="type">guint8</span> red</code></em>,
42 <em class="parameter"><code><span class="type">guint8</span> green</code></em>,
43 <em class="parameter"><code><span class="type">guint8</span> blue</code></em>,
44 <em class="parameter"><code><span class="type">guint8</span> alpha</code></em>);
45 <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="returnvalue">ClutterColor</span></a> * <a class="link" href="clutter-Colors.html#clutter-color-copy" title="clutter_color_copy ()">clutter_color_copy</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);
46 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-free" title="clutter_color_free ()">clutter_color_free</a> (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);
47 <span class="returnvalue">gboolean</span> <a class="link" href="clutter-Colors.html#clutter-color-equal" title="clutter_color_equal ()">clutter_color_equal</a> (<em class="parameter"><code><span class="type">gconstpointer</span> v1</code></em>,
48 <em class="parameter"><code><span class="type">gconstpointer</span> v2</code></em>);
49 <span class="returnvalue">guint</span> <a class="link" href="clutter-Colors.html#clutter-color-hash" title="clutter_color_hash ()">clutter_color_hash</a> (<em class="parameter"><code><span class="type">gconstpointer</span> v</code></em>);
50 enum <a class="link" href="clutter-Colors.html#ClutterStaticColor" title="enum ClutterStaticColor">ClutterStaticColor</a>;
51 const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="returnvalue">ClutterColor</span></a> * <a class="link" href="clutter-Colors.html#clutter-color-get-static" title="clutter_color_get_static ()">clutter_color_get_static</a> (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterStaticColor" title="enum ClutterStaticColor"><span class="type">ClutterStaticColor</span></a> color</code></em>);
53 <span class="returnvalue">gboolean</span> <a class="link" href="clutter-Colors.html#clutter-color-from-string" title="clutter_color_from_string ()">clutter_color_from_string</a> (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
54 <em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);
55 <span class="returnvalue">gchar</span> * <a class="link" href="clutter-Colors.html#clutter-color-to-string" title="clutter_color_to_string ()">clutter_color_to_string</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);
56 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-from-hls" title="clutter_color_from_hls ()">clutter_color_from_hls</a> (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
57 <em class="parameter"><code><span class="type">gfloat</span> hue</code></em>,
58 <em class="parameter"><code><span class="type">gfloat</span> luminance</code></em>,
59 <em class="parameter"><code><span class="type">gfloat</span> saturation</code></em>);
60 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-to-hls" title="clutter_color_to_hls ()">clutter_color_to_hls</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
61 <em class="parameter"><code><span class="type">gfloat</span> *hue</code></em>,
62 <em class="parameter"><code><span class="type">gfloat</span> *luminance</code></em>,
63 <em class="parameter"><code><span class="type">gfloat</span> *saturation</code></em>);
64 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-from-pixel" title="clutter_color_from_pixel ()">clutter_color_from_pixel</a> (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
65 <em class="parameter"><code><span class="type">guint32</span> pixel</code></em>);
66 <span class="returnvalue">guint32</span> <a class="link" href="clutter-Colors.html#clutter-color-to-pixel" title="clutter_color_to_pixel ()">clutter_color_to_pixel</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);
68 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-add" title="clutter_color_add ()">clutter_color_add</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *a</code></em>,
69 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *b</code></em>,
70 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);
71 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-subtract" title="clutter_color_subtract ()">clutter_color_subtract</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *a</code></em>,
72 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *b</code></em>,
73 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);
74 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-lighten" title="clutter_color_lighten ()">clutter_color_lighten</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
75 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);
76 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-darken" title="clutter_color_darken ()">clutter_color_darken</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
77 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);
78 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-shade" title="clutter_color_shade ()">clutter_color_shade</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
79 <em class="parameter"><code><span class="type">gdouble</span> factor</code></em>,
80 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);
81 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-color-interpolate" title="clutter_color_interpolate ()">clutter_color_interpolate</a> (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *initial</code></em>,
82 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *final</code></em>,
83 <em class="parameter"><code><span class="type">gdouble</span> progress</code></em>,
84 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);
86 struct <a class="link" href="clutter-Colors.html#ClutterParamSpecColor" title="struct ClutterParamSpecColor">ClutterParamSpecColor</a>;
87 <span class="returnvalue">GParamSpec</span> * <a class="link" href="clutter-Colors.html#clutter-param-spec-color" title="clutter_param_spec_color ()">clutter_param_spec_color</a> (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
88 <em class="parameter"><code>const <span class="type">gchar</span> *nick</code></em>,
89 <em class="parameter"><code>const <span class="type">gchar</span> *blurb</code></em>,
90 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *default_value</code></em>,
91 <em class="parameter"><code><span class="type">GParamFlags</span> flags</code></em>);
92 #define <a class="link" href="clutter-Colors.html#CLUTTER-VALUE-HOLDS-COLOR:CAPS" title="CLUTTER_VALUE_HOLDS_COLOR()">CLUTTER_VALUE_HOLDS_COLOR</a> (x)
93 <span class="returnvalue">void</span> <a class="link" href="clutter-Colors.html#clutter-value-set-color" title="clutter_value_set_color ()">clutter_value_set_color</a> (<em class="parameter"><code><span class="type">GValue</span> *value</code></em>,
94 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);
95 const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="returnvalue">ClutterColor</span></a> * <a class="link" href="clutter-Colors.html#clutter-value-get-color" title="clutter_value_get_color ()">clutter_value_get_color</a> (<em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);
98 <div class="refsect1">
99 <a name="clutter-Colors.description"></a><h2>Description</h2>
101 <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> is a simple type for representing colors in Clutter.
104 A <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> is expressed as a 4-tuple of values ranging from
105 zero to 255, one for each color channel plus one for the alpha.
108 The alpha channel is fully opaque at 255 and fully transparent at 0.
111 <div class="refsect1">
112 <a name="clutter-Colors.details"></a><h2>Details</h2>
113 <div class="refsect2">
114 <a name="ClutterColor"></a><h3>ClutterColor</h3>
115 <pre class="programlisting">typedef struct {
124 Color representation.
126 <div class="variablelist"><table border="0">
127 <col align="left" valign="top">
130 <td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="ClutterColor.red"></a>red</code></em>;</span></p></td>
131 <td>red component, between 0 and 255</td>
134 <td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="ClutterColor.green"></a>green</code></em>;</span></p></td>
135 <td>green component, between 0 and 255</td>
138 <td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="ClutterColor.blue"></a>blue</code></em>;</span></p></td>
139 <td>blue component, between 0 and 255</td>
142 <td><p><span class="term"><span class="type">guint8</span> <em class="structfield"><code><a name="ClutterColor.alpha"></a>alpha</code></em>;</span></p></td>
143 <td>alpha component, between 0 and 255</td>
149 <div class="refsect2">
150 <a name="clutter-color-new"></a><h3>clutter_color_new ()</h3>
151 <pre class="programlisting"><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="returnvalue">ClutterColor</span></a> * clutter_color_new (<em class="parameter"><code><span class="type">guint8</span> red</code></em>,
152 <em class="parameter"><code><span class="type">guint8</span> green</code></em>,
153 <em class="parameter"><code><span class="type">guint8</span> blue</code></em>,
154 <em class="parameter"><code><span class="type">guint8</span> alpha</code></em>);</pre>
156 Creates a new <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> with the given values.
158 <div class="variablelist"><table border="0">
159 <col align="left" valign="top">
162 <td><p><span class="term"><em class="parameter"><code>red</code></em> :</span></p></td>
163 <td>red component of the color, between 0 and 255</td>
166 <td><p><span class="term"><em class="parameter"><code>green</code></em> :</span></p></td>
167 <td>green component of the color, between 0 and 255</td>
170 <td><p><span class="term"><em class="parameter"><code>blue</code></em> :</span></p></td>
171 <td>blue component of the color, between 0 and 255</td>
174 <td><p><span class="term"><em class="parameter"><code>alpha</code></em> :</span></p></td>
175 <td>alpha component of the color, between 0 and 255</td>
178 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
179 <td>the newly allocated color.
180 Use <a class="link" href="clutter-Colors.html#clutter-color-free" title="clutter_color_free ()"><code class="function">clutter_color_free()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
185 <p class="since">Since 0.8.4</p>
188 <div class="refsect2">
189 <a name="clutter-color-copy"></a><h3>clutter_color_copy ()</h3>
190 <pre class="programlisting"><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="returnvalue">ClutterColor</span></a> * clutter_color_copy (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);</pre>
192 Makes a copy of the color structure. The result must be
193 freed using <a class="link" href="clutter-Colors.html#clutter-color-free" title="clutter_color_free ()"><code class="function">clutter_color_free()</code></a>.
195 <div class="variablelist"><table border="0">
196 <col align="left" valign="top">
199 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
200 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
204 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
205 <td>an allocated copy of <em class="parameter"><code>color</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
210 <p class="since">Since 0.2</p>
213 <div class="refsect2">
214 <a name="clutter-color-free"></a><h3>clutter_color_free ()</h3>
215 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_free (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);</pre>
217 Frees a color structure created with <a class="link" href="clutter-Colors.html#clutter-color-copy" title="clutter_color_copy ()"><code class="function">clutter_color_copy()</code></a>.
219 <div class="variablelist"><table border="0">
220 <col align="left" valign="top">
222 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
223 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
227 <p class="since">Since 0.2</p>
230 <div class="refsect2">
231 <a name="clutter-color-equal"></a><h3>clutter_color_equal ()</h3>
232 <pre class="programlisting"><span class="returnvalue">gboolean</span> clutter_color_equal (<em class="parameter"><code><span class="type">gconstpointer</span> v1</code></em>,
233 <em class="parameter"><code><span class="type">gconstpointer</span> v2</code></em>);</pre>
235 Compares two <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>s and checks if they are the same.
238 This function can be passed to <code class="function">g_hash_table_new()</code> as the <em class="parameter"><code>key_equal_func</code></em>
239 parameter, when using <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>s as keys in a <span class="type">GHashTable</span>.
241 <div class="variablelist"><table border="0">
242 <col align="left" valign="top">
245 <td><p><span class="term"><em class="parameter"><code>v1</code></em> :</span></p></td>
246 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
250 <td><p><span class="term"><em class="parameter"><code>v2</code></em> :</span></p></td>
251 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
255 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
257 <code class="literal">TRUE</code> if the two colors are the same.</td>
261 <p class="since">Since 0.2</p>
264 <div class="refsect2">
265 <a name="clutter-color-hash"></a><h3>clutter_color_hash ()</h3>
266 <pre class="programlisting"><span class="returnvalue">guint</span> clutter_color_hash (<em class="parameter"><code><span class="type">gconstpointer</span> v</code></em>);</pre>
268 Converts a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> to a hash value.
271 This function can be passed to <code class="function">g_hash_table_new()</code> as the <em class="parameter"><code>hash_func</code></em>
272 parameter, when using <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>s as keys in a <span class="type">GHashTable</span>.
274 <div class="variablelist"><table border="0">
275 <col align="left" valign="top">
278 <td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
279 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
283 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
284 <td>a hash value corresponding to the color</td>
288 <p class="since">Since 1.0</p>
291 <div class="refsect2">
292 <a name="ClutterStaticColor"></a><h3>enum ClutterStaticColor</h3>
293 <pre class="programlisting">typedef enum {
294 /*< prefix=CLUTTER_COLOR >*/
295 /* CGA/EGA-like palette */
296 CLUTTER_COLOR_WHITE = 0,
299 CLUTTER_COLOR_DARK_RED,
301 CLUTTER_COLOR_DARK_GREEN,
303 CLUTTER_COLOR_DARK_BLUE,
305 CLUTTER_COLOR_DARK_CYAN,
306 CLUTTER_COLOR_MAGENTA,
307 CLUTTER_COLOR_DARK_MAGENTA,
308 CLUTTER_COLOR_YELLOW,
309 CLUTTER_COLOR_DARK_YELLOW,
311 CLUTTER_COLOR_DARK_GRAY,
312 CLUTTER_COLOR_LIGHT_GRAY,
314 /* Tango icon palette */
315 CLUTTER_COLOR_BUTTER,
316 CLUTTER_COLOR_BUTTER_LIGHT,
317 CLUTTER_COLOR_BUTTER_DARK,
318 CLUTTER_COLOR_ORANGE,
319 CLUTTER_COLOR_ORANGE_LIGHT,
320 CLUTTER_COLOR_ORANGE_DARK,
321 CLUTTER_COLOR_CHOCOLATE,
322 CLUTTER_COLOR_CHOCOLATE_LIGHT,
323 CLUTTER_COLOR_CHOCOLATE_DARK,
324 CLUTTER_COLOR_CHAMELEON,
325 CLUTTER_COLOR_CHAMELEON_LIGHT,
326 CLUTTER_COLOR_CHAMELEON_DARK,
327 CLUTTER_COLOR_SKY_BLUE,
328 CLUTTER_COLOR_SKY_BLUE_LIGHT,
329 CLUTTER_COLOR_SKY_BLUE_DARK,
331 CLUTTER_COLOR_PLUM_LIGHT,
332 CLUTTER_COLOR_PLUM_DARK,
333 CLUTTER_COLOR_SCARLET_RED,
334 CLUTTER_COLOR_SCARLET_RED_LIGHT,
335 CLUTTER_COLOR_SCARLET_RED_DARK,
336 CLUTTER_COLOR_ALUMINIUM_1,
337 CLUTTER_COLOR_ALUMINIUM_2,
338 CLUTTER_COLOR_ALUMINIUM_3,
339 CLUTTER_COLOR_ALUMINIUM_4,
340 CLUTTER_COLOR_ALUMINIUM_5,
341 CLUTTER_COLOR_ALUMINIUM_6,
343 /* Fully transparent black */
344 CLUTTER_COLOR_TRANSPARENT
345 } ClutterStaticColor;
348 Named colors, for accessing global colors defined by Clutter
350 <div class="variablelist"><table border="0">
351 <col align="left" valign="top">
354 <td><p><a name="CLUTTER-COLOR-WHITE:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_WHITE</code></span></p></td>
355 <td>White color (ffffffff)
359 <td><p><a name="CLUTTER-COLOR-BLACK:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_BLACK</code></span></p></td>
360 <td>Black color (000000ff)
364 <td><p><a name="CLUTTER-COLOR-RED:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_RED</code></span></p></td>
365 <td>Red color (ff0000ff)
369 <td><p><a name="CLUTTER-COLOR-DARK-RED:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_DARK_RED</code></span></p></td>
370 <td>Dark red color (800000ff)
374 <td><p><a name="CLUTTER-COLOR-GREEN:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_GREEN</code></span></p></td>
375 <td>Green color (00ff00ff)
379 <td><p><a name="CLUTTER-COLOR-DARK-GREEN:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_DARK_GREEN</code></span></p></td>
380 <td>Dark green color (008000ff)
384 <td><p><a name="CLUTTER-COLOR-BLUE:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_BLUE</code></span></p></td>
385 <td>Blue color (0000ffff)
389 <td><p><a name="CLUTTER-COLOR-DARK-BLUE:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_DARK_BLUE</code></span></p></td>
390 <td>Dark blue color (000080ff)
394 <td><p><a name="CLUTTER-COLOR-CYAN:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_CYAN</code></span></p></td>
395 <td>Cyan color (00ffffff)
399 <td><p><a name="CLUTTER-COLOR-DARK-CYAN:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_DARK_CYAN</code></span></p></td>
400 <td>Dark cyan color (008080ff)
404 <td><p><a name="CLUTTER-COLOR-MAGENTA:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_MAGENTA</code></span></p></td>
405 <td>Magenta color (ff00ffff)
409 <td><p><a name="CLUTTER-COLOR-DARK-MAGENTA:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_DARK_MAGENTA</code></span></p></td>
410 <td>Dark magenta color (800080ff)
414 <td><p><a name="CLUTTER-COLOR-YELLOW:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_YELLOW</code></span></p></td>
415 <td>Yellow color (ffff00ff)
419 <td><p><a name="CLUTTER-COLOR-DARK-YELLOW:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_DARK_YELLOW</code></span></p></td>
420 <td>Dark yellow color (808000ff)
424 <td><p><a name="CLUTTER-COLOR-GRAY:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_GRAY</code></span></p></td>
425 <td>Gray color (a0a0a4ff)
429 <td><p><a name="CLUTTER-COLOR-DARK-GRAY:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_DARK_GRAY</code></span></p></td>
430 <td>Dark Gray color (808080ff)
434 <td><p><a name="CLUTTER-COLOR-LIGHT-GRAY:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_LIGHT_GRAY</code></span></p></td>
435 <td>Light gray color (c0c0c0ff)
439 <td><p><a name="CLUTTER-COLOR-BUTTER:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_BUTTER</code></span></p></td>
440 <td>Butter color (edd400ff)
444 <td><p><a name="CLUTTER-COLOR-BUTTER-LIGHT:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_BUTTER_LIGHT</code></span></p></td>
445 <td>Light butter color (fce94fff)
449 <td><p><a name="CLUTTER-COLOR-BUTTER-DARK:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_BUTTER_DARK</code></span></p></td>
450 <td>Dark butter color (c4a000ff)
454 <td><p><a name="CLUTTER-COLOR-ORANGE:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ORANGE</code></span></p></td>
455 <td>Orange color (f57900ff)
459 <td><p><a name="CLUTTER-COLOR-ORANGE-LIGHT:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ORANGE_LIGHT</code></span></p></td>
460 <td>Light orange color (fcaf3fff)
464 <td><p><a name="CLUTTER-COLOR-ORANGE-DARK:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ORANGE_DARK</code></span></p></td>
465 <td>Dark orange color (ce5c00ff)
469 <td><p><a name="CLUTTER-COLOR-CHOCOLATE:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_CHOCOLATE</code></span></p></td>
470 <td>Chocolate color (c17d11ff)
474 <td><p><a name="CLUTTER-COLOR-CHOCOLATE-LIGHT:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_CHOCOLATE_LIGHT</code></span></p></td>
475 <td>Light chocolate color (e9b96eff)
479 <td><p><a name="CLUTTER-COLOR-CHOCOLATE-DARK:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_CHOCOLATE_DARK</code></span></p></td>
480 <td>Dark chocolate color (8f5902ff)
484 <td><p><a name="CLUTTER-COLOR-CHAMELEON:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_CHAMELEON</code></span></p></td>
485 <td>Chameleon color (73d216ff)
489 <td><p><a name="CLUTTER-COLOR-CHAMELEON-LIGHT:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_CHAMELEON_LIGHT</code></span></p></td>
490 <td>Light chameleon color (8ae234ff)
494 <td><p><a name="CLUTTER-COLOR-CHAMELEON-DARK:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_CHAMELEON_DARK</code></span></p></td>
495 <td>Dark chameleon color (4e9a06ff)
499 <td><p><a name="CLUTTER-COLOR-SKY-BLUE:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_SKY_BLUE</code></span></p></td>
500 <td>Sky color (3465a4ff)
504 <td><p><a name="CLUTTER-COLOR-SKY-BLUE-LIGHT:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_SKY_BLUE_LIGHT</code></span></p></td>
505 <td>Light sky color (729fcfff)
509 <td><p><a name="CLUTTER-COLOR-SKY-BLUE-DARK:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_SKY_BLUE_DARK</code></span></p></td>
510 <td>Dark sky color (204a87ff)
514 <td><p><a name="CLUTTER-COLOR-PLUM:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_PLUM</code></span></p></td>
515 <td>Plum color (75507bff)
519 <td><p><a name="CLUTTER-COLOR-PLUM-LIGHT:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_PLUM_LIGHT</code></span></p></td>
520 <td>Light plum color (ad7fa8ff)
524 <td><p><a name="CLUTTER-COLOR-PLUM-DARK:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_PLUM_DARK</code></span></p></td>
525 <td>Dark plum color (5c3566ff)
529 <td><p><a name="CLUTTER-COLOR-SCARLET-RED:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_SCARLET_RED</code></span></p></td>
530 <td>Scarlet red color (cc0000ff)
534 <td><p><a name="CLUTTER-COLOR-SCARLET-RED-LIGHT:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_SCARLET_RED_LIGHT</code></span></p></td>
535 <td>Light scarlet red color (ef2929ff)
539 <td><p><a name="CLUTTER-COLOR-SCARLET-RED-DARK:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_SCARLET_RED_DARK</code></span></p></td>
540 <td>Dark scarlet red color (a40000ff)
544 <td><p><a name="CLUTTER-COLOR-ALUMINIUM-1:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ALUMINIUM_1</code></span></p></td>
545 <td>Aluminium, first variant (eeeeecff)
549 <td><p><a name="CLUTTER-COLOR-ALUMINIUM-2:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ALUMINIUM_2</code></span></p></td>
550 <td>Aluminium, second variant (d3d7cfff)
554 <td><p><a name="CLUTTER-COLOR-ALUMINIUM-3:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ALUMINIUM_3</code></span></p></td>
555 <td>Aluminium, third variant (babdb6ff)
559 <td><p><a name="CLUTTER-COLOR-ALUMINIUM-4:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ALUMINIUM_4</code></span></p></td>
560 <td>Aluminium, fourth variant (888a85ff)
564 <td><p><a name="CLUTTER-COLOR-ALUMINIUM-5:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ALUMINIUM_5</code></span></p></td>
565 <td>Aluminium, fifth variant (555753ff)
569 <td><p><a name="CLUTTER-COLOR-ALUMINIUM-6:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_ALUMINIUM_6</code></span></p></td>
570 <td>Aluminium, sixth variant (2e3436ff)
574 <td><p><a name="CLUTTER-COLOR-TRANSPARENT:CAPS"></a><span class="term"><code class="literal">CLUTTER_COLOR_TRANSPARENT</code></span></p></td>
575 <td>Transparent color (00000000)
580 <p class="since">Since 1.6</p>
583 <div class="refsect2">
584 <a name="clutter-color-get-static"></a><h3>clutter_color_get_static ()</h3>
585 <pre class="programlisting">const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="returnvalue">ClutterColor</span></a> * clutter_color_get_static (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterStaticColor" title="enum ClutterStaticColor"><span class="type">ClutterStaticColor</span></a> color</code></em>);</pre>
587 Retrieves a static color for the given <em class="parameter"><code>color</code></em> name
590 Static colors are created by Clutter and are guaranteed to always be
593 <div class="variablelist"><table border="0">
594 <col align="left" valign="top">
597 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
598 <td>the named global color</td>
601 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
602 <td>a pointer to a static color; the returned pointer
603 is owned by Clutter and it should never be modified or freed</td>
607 <p class="since">Since 1.6</p>
610 <div class="refsect2">
611 <a name="clutter-color-from-string"></a><h3>clutter_color_from_string ()</h3>
612 <pre class="programlisting"><span class="returnvalue">gboolean</span> clutter_color_from_string (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
613 <em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
615 Parses a string definition of a color, filling the
616 <em class="structfield"><code>red</code></em>, <em class="structfield"><code>green</code></em>,
617 <em class="structfield"><code>blue</code></em> and <em class="structfield"><code>alpha</code></em>
618 channels of <em class="parameter"><code>color</code></em>.
621 The <em class="parameter"><code>color</code></em> is not allocated.
624 The format of <em class="parameter"><code>str</code></em> can be either one of:
628 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
629 <li class="listitem"><p>a standard name (as taken from the X11 rgb.txt file)</p></li>
630 <li class="listitem"><p>an hexadecimal value in the form: <code class="literal">#rgb</code>,
631 <code class="literal">#rrggbb</code>, <code class="literal">#rgba</code> or
632 <code class="literal">#rrggbbaa</code></p></li>
633 <li class="listitem"><p>a RGB color in the form: <code class="literal">rgb(r, g, b)</code></p></li>
634 <li class="listitem"><p>a RGB color in the form: <code class="literal">rgba(r, g, b, a)</code></p></li>
635 <li class="listitem"><p>a HSL color in the form: <code class="literal">hsl(h, s, l)</code></p></li>
636 <li class="listitem"><p>a HSL color in the form: <code class="literal">hsla(h, s, l, a)</code></p></li>
641 where 'r', 'g', 'b' and 'a' are (respectively) the red, green, blue color
642 intensities and the opacity. The 'h', 's' and 'l' are (respectively) the
643 hue, saturation and luminance values.
646 In the <code class="function">rgb()</code> and <code class="function">rgba()</code> formats, the 'r', 'g', and 'b' values are either
647 integers between 0 and 255, or percentage values in the range between 0%
648 and 100%; the percentages require the '%' character. The 'a' value, if
649 specified, can only be a floating point value between 0.0 and 1.0.
652 In the <code class="function">hls()</code> and <code class="function">hlsa()</code> formats, the 'h' value (hue) it's an angle between
653 0 and 360.0 degrees; the 'l' and 's' values (luminance and saturation) are
654 a floating point value between 0.0 and 1.0. The 'a' value, if specified,
655 can only be a floating point value between 0.0 and 1.0.
658 Whitespace inside the definitions is ignored; no leading whitespace
662 If the alpha component is not specified then it is assumed to be set to
665 <div class="variablelist"><table border="0">
666 <col align="left" valign="top">
669 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
670 <td>return location for a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
674 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
675 <td>a string specifiying a color</td>
678 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
680 <code class="literal">TRUE</code> if parsing succeeded, and <code class="literal">FALSE</code> otherwise</td>
684 <p class="since">Since 1.0</p>
687 <div class="refsect2">
688 <a name="clutter-color-to-string"></a><h3>clutter_color_to_string ()</h3>
689 <pre class="programlisting"><span class="returnvalue">gchar</span> * clutter_color_to_string (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);</pre>
691 Returns a textual specification of <em class="parameter"><code>color</code></em> in the hexadecimal form
692 <code class="literal">#rrggbbaa</code>, where <code class="literal">r</code>,
693 <code class="literal">g</code>, <code class="literal">b</code> and <code class="literal">a</code> are
694 hexadecimal digits representing the red, green, blue and alpha components
697 <div class="variablelist"><table border="0">
698 <col align="left" valign="top">
701 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
702 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
706 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
707 <td>a newly-allocated text string. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
712 <p class="since">Since 0.2</p>
715 <div class="refsect2">
716 <a name="clutter-color-from-hls"></a><h3>clutter_color_from_hls ()</h3>
717 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_from_hls (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
718 <em class="parameter"><code><span class="type">gfloat</span> hue</code></em>,
719 <em class="parameter"><code><span class="type">gfloat</span> luminance</code></em>,
720 <em class="parameter"><code><span class="type">gfloat</span> saturation</code></em>);</pre>
722 Converts a color expressed in HLS (hue, luminance and saturation)
723 values into a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>.
725 <div class="variablelist"><table border="0">
726 <col align="left" valign="top">
729 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
730 <td>return location for a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
734 <td><p><span class="term"><em class="parameter"><code>hue</code></em> :</span></p></td>
735 <td>hue value, in the 0 .. 360 range</td>
738 <td><p><span class="term"><em class="parameter"><code>luminance</code></em> :</span></p></td>
739 <td>luminance value, in the 0 .. 1 range</td>
742 <td><p><span class="term"><em class="parameter"><code>saturation</code></em> :</span></p></td>
743 <td>saturation value, in the 0 .. 1 range</td>
749 <div class="refsect2">
750 <a name="clutter-color-to-hls"></a><h3>clutter_color_to_hls ()</h3>
751 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_to_hls (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
752 <em class="parameter"><code><span class="type">gfloat</span> *hue</code></em>,
753 <em class="parameter"><code><span class="type">gfloat</span> *luminance</code></em>,
754 <em class="parameter"><code><span class="type">gfloat</span> *saturation</code></em>);</pre>
756 Converts <em class="parameter"><code>color</code></em> to the HLS format.
759 The <em class="parameter"><code>hue</code></em> value is in the 0 .. 360 range. The <em class="parameter"><code>luminance</code></em> and
760 <em class="parameter"><code>saturation</code></em> values are in the 0 .. 1 range.
762 <div class="variablelist"><table border="0">
763 <col align="left" valign="top">
766 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
767 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
771 <td><p><span class="term"><em class="parameter"><code>hue</code></em> :</span></p></td>
772 <td>return location for the hue value or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
776 <td><p><span class="term"><em class="parameter"><code>luminance</code></em> :</span></p></td>
777 <td>return location for the luminance value or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
781 <td><p><span class="term"><em class="parameter"><code>saturation</code></em> :</span></p></td>
782 <td>return location for the saturation value or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
789 <div class="refsect2">
790 <a name="clutter-color-from-pixel"></a><h3>clutter_color_from_pixel ()</h3>
791 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_from_pixel (<em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
792 <em class="parameter"><code><span class="type">guint32</span> pixel</code></em>);</pre>
794 Converts <em class="parameter"><code>pixel</code></em> from the packed representation of a four 8 bit channel
795 color to a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>.
797 <div class="variablelist"><table border="0">
798 <col align="left" valign="top">
801 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
802 <td>return location for a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
806 <td><p><span class="term"><em class="parameter"><code>pixel</code></em> :</span></p></td>
807 <td>a 32 bit packed integer containing a color</td>
813 <div class="refsect2">
814 <a name="clutter-color-to-pixel"></a><h3>clutter_color_to_pixel ()</h3>
815 <pre class="programlisting"><span class="returnvalue">guint32</span> clutter_color_to_pixel (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);</pre>
817 Converts <em class="parameter"><code>color</code></em> into a packed 32 bit integer, containing
818 all the four 8 bit channels used by <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>.
820 <div class="variablelist"><table border="0">
821 <col align="left" valign="top">
824 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
825 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
829 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
830 <td>a packed color</td>
836 <div class="refsect2">
837 <a name="clutter-color-add"></a><h3>clutter_color_add ()</h3>
838 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_add (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *a</code></em>,
839 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *b</code></em>,
840 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);</pre>
842 Adds <em class="parameter"><code>a</code></em> to <em class="parameter"><code>b</code></em> and saves the resulting color inside <em class="parameter"><code>result</code></em>.
845 The alpha channel of <em class="parameter"><code>result</code></em> is set as as the maximum value
846 between the alpha channels of <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>.
848 <div class="variablelist"><table border="0">
849 <col align="left" valign="top">
852 <td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
853 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
857 <td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
858 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
862 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
863 <td>return location for the result. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
870 <div class="refsect2">
871 <a name="clutter-color-subtract"></a><h3>clutter_color_subtract ()</h3>
872 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_subtract (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *a</code></em>,
873 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *b</code></em>,
874 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);</pre>
876 Subtracts <em class="parameter"><code>b</code></em> from <em class="parameter"><code>a</code></em> and saves the resulting color inside <em class="parameter"><code>result</code></em>.
879 This function assumes that the components of <em class="parameter"><code>a</code></em> are greater than the
880 components of <em class="parameter"><code>b</code></em>; the result is, otherwise, undefined.
883 The alpha channel of <em class="parameter"><code>result</code></em> is set as the minimum value
884 between the alpha channels of <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>.
886 <div class="variablelist"><table border="0">
887 <col align="left" valign="top">
890 <td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
891 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
895 <td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
896 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
900 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
901 <td>return location for the result. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
908 <div class="refsect2">
909 <a name="clutter-color-lighten"></a><h3>clutter_color_lighten ()</h3>
910 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_lighten (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
911 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);</pre>
913 Lightens <em class="parameter"><code>color</code></em> by a fixed amount, and saves the changed color
914 in <em class="parameter"><code>result</code></em>.
916 <div class="variablelist"><table border="0">
917 <col align="left" valign="top">
920 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
921 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
925 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
926 <td>return location for the lighter color. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
933 <div class="refsect2">
934 <a name="clutter-color-darken"></a><h3>clutter_color_darken ()</h3>
935 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_darken (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
936 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);</pre>
938 Darkens <em class="parameter"><code>color</code></em> by a fixed amount, and saves the changed color
939 in <em class="parameter"><code>result</code></em>.
941 <div class="variablelist"><table border="0">
942 <col align="left" valign="top">
945 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
946 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
950 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
951 <td>return location for the darker color. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
958 <div class="refsect2">
959 <a name="clutter-color-shade"></a><h3>clutter_color_shade ()</h3>
960 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_shade (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>,
961 <em class="parameter"><code><span class="type">gdouble</span> factor</code></em>,
962 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);</pre>
964 Shades <em class="parameter"><code>color</code></em> by <em class="parameter"><code>factor</code></em> and saves the modified color into <em class="parameter"><code>result</code></em>.
966 <div class="variablelist"><table border="0">
967 <col align="left" valign="top">
970 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
971 <td>a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
975 <td><p><span class="term"><em class="parameter"><code>factor</code></em> :</span></p></td>
976 <td>the shade factor to apply</td>
979 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
980 <td>return location for the shaded color. <span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span>
987 <div class="refsect2">
988 <a name="clutter-color-interpolate"></a><h3>clutter_color_interpolate ()</h3>
989 <pre class="programlisting"><span class="returnvalue">void</span> clutter_color_interpolate (<em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *initial</code></em>,
990 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *final</code></em>,
991 <em class="parameter"><code><span class="type">gdouble</span> progress</code></em>,
992 <em class="parameter"><code><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *result</code></em>);</pre>
994 Interpolates between <em class="parameter"><code>initial</code></em> and <em class="parameter"><code>final</code></em> <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>s
995 using <em class="parameter"><code>progress</code></em>
997 <div class="variablelist"><table border="0">
998 <col align="left" valign="top">
1001 <td><p><span class="term"><em class="parameter"><code>initial</code></em> :</span></p></td>
1002 <td>the initial <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
1006 <td><p><span class="term"><em class="parameter"><code>final</code></em> :</span></p></td>
1007 <td>the final <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>
1011 <td><p><span class="term"><em class="parameter"><code>progress</code></em> :</span></p></td>
1012 <td>the interpolation progress</td>
1015 <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
1016 <td>return location for the interpolation. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
1021 <p class="since">Since 1.6</p>
1024 <div class="refsect2">
1025 <a name="ClutterParamSpecColor"></a><h3>struct ClutterParamSpecColor</h3>
1026 <pre class="programlisting">struct ClutterParamSpecColor {
1027 ClutterColor *default_value;
1031 A <span class="type">GParamSpec</span> subclass for defining properties holding
1032 a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>.
1034 <div class="variablelist"><table border="0">
1035 <col align="left" valign="top">
1037 <td><p><span class="term"><a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *<em class="structfield"><code><a name="ClutterParamSpecColor.default-value"></a>default_value</code></em>;</span></p></td>
1038 <td>default color value</td>
1041 <p class="since">Since 1.0</p>
1044 <div class="refsect2">
1045 <a name="clutter-param-spec-color"></a><h3>clutter_param_spec_color ()</h3>
1046 <pre class="programlisting"><span class="returnvalue">GParamSpec</span> * clutter_param_spec_color (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
1047 <em class="parameter"><code>const <span class="type">gchar</span> *nick</code></em>,
1048 <em class="parameter"><code>const <span class="type">gchar</span> *blurb</code></em>,
1049 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *default_value</code></em>,
1050 <em class="parameter"><code><span class="type">GParamFlags</span> flags</code></em>);</pre>
1052 Creates a <span class="type">GParamSpec</span> for properties using <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>.
1054 <div class="variablelist"><table border="0">
1055 <col align="left" valign="top">
1058 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1059 <td>name of the property</td>
1062 <td><p><span class="term"><em class="parameter"><code>nick</code></em> :</span></p></td>
1066 <td><p><span class="term"><em class="parameter"><code>blurb</code></em> :</span></p></td>
1067 <td>description (can be translatable)</td>
1070 <td><p><span class="term"><em class="parameter"><code>default_value</code></em> :</span></p></td>
1071 <td>default value</td>
1074 <td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
1075 <td>flags for the param spec</td>
1078 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1079 <td>the newly created <span class="type">GParamSpec</span>
1084 <p class="since">Since 0.8.4</p>
1087 <div class="refsect2">
1088 <a name="CLUTTER-VALUE-HOLDS-COLOR:CAPS"></a><h3>CLUTTER_VALUE_HOLDS_COLOR()</h3>
1089 <pre class="programlisting">#define CLUTTER_VALUE_HOLDS_COLOR(x) (G_VALUE_HOLDS ((x), CLUTTER_TYPE_COLOR))
1092 Evaluates to <code class="literal">TRUE</code> if <em class="parameter"><code>x</code></em> holds a <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a>.
1094 <div class="variablelist"><table border="0">
1095 <col align="left" valign="top">
1097 <td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
1098 <td>a <span class="type">GValue</span>
1102 <p class="since">Since 1.0</p>
1105 <div class="refsect2">
1106 <a name="clutter-value-set-color"></a><h3>clutter_value_set_color ()</h3>
1107 <pre class="programlisting"><span class="returnvalue">void</span> clutter_value_set_color (<em class="parameter"><code><span class="type">GValue</span> *value</code></em>,
1108 <em class="parameter"><code>const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> *color</code></em>);</pre>
1110 Sets <em class="parameter"><code>value</code></em> to <em class="parameter"><code>color</code></em>.
1112 <div class="variablelist"><table border="0">
1113 <col align="left" valign="top">
1116 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
1117 <td>a <span class="type">GValue</span> initialized to <span class="type">CLUTTER_TYPE_COLOR</span>
1121 <td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
1122 <td>the color to set</td>
1126 <p class="since">Since 0.8.4</p>
1129 <div class="refsect2">
1130 <a name="clutter-value-get-color"></a><h3>clutter_value_get_color ()</h3>
1131 <pre class="programlisting">const <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="returnvalue">ClutterColor</span></a> * clutter_value_get_color (<em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);</pre>
1133 Gets the <a class="link" href="clutter-Colors.html#ClutterColor" title="ClutterColor"><span class="type">ClutterColor</span></a> contained in <em class="parameter"><code>value</code></em>.
1135 <div class="variablelist"><table border="0">
1136 <col align="left" valign="top">
1139 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
1140 <td>a <span class="type">GValue</span> initialized to <span class="type">CLUTTER_TYPE_COLOR</span>
1144 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1145 <td>the color inside the passed <span class="type">GValue</span>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1150 <p class="since">Since 0.8.4</p>
1154 <div class="footer">
1156 Generated by GTK-Doc V1.18.1</div>