Detailed Description
A Widget for selecting a color.
This widget is inherited from GtkWidget and is a horizontal list which you can select color with.
Fig.20 GTKColorChooser
Code Example:
- Since:
- LIMO R1
|
Data Structures |
| struct | _GtkColorChooser |
| | GtkColorChooser instance structure. More...
|
| struct | _GtkColorChooserClass |
| | GtkColorChooserClass instance structure. More...
|
Functions |
| GType | gtk_color_chooser_get_type (void) G_GNUC_CONST |
| | This Fuction returns GType.
|
| GtkWidget * | gtk_color_chooser_new (GtkColorChooserStyle style) |
| | Create color chooser widget that can select the color value.
|
| void | gtk_color_chooser_add (GtkColorChooser *colorchooser, GdkColor *color) |
| | Add color to GtkColorChooser.
|
| void | gtk_color_chooser_insert (GtkColorChooser *colorchooser, GdkColor *color, guint index) |
| | Insert the color of GtkColorChooser to specified index.
|
| void | gtk_color_chooser_remove (GtkColorChooser *colorchooser, guint index) |
| | Remove the color of specified index of GtkColorChooser.
|
| void | gtk_color_chooser_remove_all (GtkColorChooser *colorchooser) |
| | Remove all color of GtkColorChooser.
|
| void | gtk_color_chooser_get (GtkColorChooser *colorchooser, GdkColor *outcolor, guint index) |
| | Get the GdkColor of specified index GtkColorChooser.
|
| void | gtk_color_chooser_get_selection (GtkColorChooser *colorchooser, GdkColor *outcolor) |
| | Get currently seleted GdkColor in GtkColorChooser.
|
| guint | gtk_color_chooser_get_selection_index (GtkColorChooser *colorchooser) |
| | Return currently selected index to GtkColorChooser.
|
| void | gtk_color_chooser_set_selection_index (GtkColorChooser *colorchooser, guint index) |
| | Set Selected index to GtkColorChooser.
|
| guint | gtk_color_chooser_get_count (GtkColorChooser *colorchooser) |
| | Return The number of added GdkColor in GtkColorChooser.
|
| void | gtk_color_chooser_set (GtkColorChooser *colorchooser, GdkColor *color, guint index) |
| | Set the color of specified index of color chooser with GdkColor.
|
| void | gtk_color_chooser_convert_color_hue (GtkColorChooser *colorchooser, GdkColor *color) |
| | Set the color in hue style to GtkColorChooser.
|
| void | gtk_color_chooser_convert_color_saturation (GtkColorChooser *colorchooser, GdkColor *color) |
| | Change the GtkColorChooser Saturation style that relation to GdkColor value.
|
| void | gtk_color_chooser_convert_color_value (GtkColorChooser *colorchooser, GdkColor *color) |
| | Change the GtkColorChooser value style that relation to GdkColor value.
|
| void | gtk_color_chooser_extraction_color_hue (GtkColorChooser *colorchooser, GdkColor *color, gdouble *hue) |
| | Extract the hue from the GdkColor.
|
| void | gtk_color_chooser_extraction_color_saturation (GtkColorChooser *colorchooser, GdkColor *color, gdouble *saturation) |
| | Extract the saturation from the GdkColor.
|
| void | gtk_color_chooser_extraction_color_value (GtkColorChooser *colorchooser, GdkColor *color, gdouble *value) |
| | Extract the value from the GdkColor.
|
| void | gtk_color_chooser_mix_color_hsv (GtkColorChooser *colorchooser, GdkColor *color, gdouble h, gdouble s, gdouble v) |
| | Converts a color from HSV space to RGB Input values must be in the [0.0, 1.0] range.
|
| guint | gtk_color_chooser_get_color_index (GtkColorChooser *colorchooser, GdkColor *color) |
| | Return index of color to GtkColorChooser.
|
| gchar * | gtk_color_chooser_color_to_string (const GdkColor *color) |
| | Get the color name with string.
|
| gboolean | gtk_color_chooser_color_from_string (const gchar *str, GdkColor **colors) |
| | Change string to color.
|
Function Documentation
| void gtk_color_chooser_add |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color | |
|
) |
| | |
Add color to GtkColorChooser.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | color,: | specifies the GdkColor |
- Since:
- LIMO R1
| gboolean gtk_color_chooser_color_from_string |
( |
const gchar * |
str, |
|
|
GdkColor ** |
colors | |
|
) |
| | |
Change string to color.
Input string format is "#FF0000" when Gdkcolor RED. - Parameters:
-
| [in] | str,: | a string encoding a color |
| [in] | colors,: | return location for allocated array of GdkColor |
- See also:
gtk_color_chooser_color_to_string()
- Since:
- LIMO R1
| gchar* gtk_color_chooser_color_to_string |
( |
const GdkColor * |
color |
) |
|
Get the color name with string.
If GdkColor is RED then output is "#FF0000". Outupt format is "#RRGGBB". The string must be freed after use. - Parameters:
-
| [in] | color,: | specifies the GdkColor |
- Returns:
- allocated string encoding the color
- See also:
gtk_color_chooser_color_from_string()
- Since:
- LIMO R1
| void gtk_color_chooser_convert_color_hue |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color | |
|
) |
| | |
Set the color in hue style to GtkColorChooser.
If you create GtkColorChooser with gtk_color_chooser_new(), then don't need this function. gtk_color_chooser_new() use this function, and set automatically. - Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | color,: | specifies the GdkColor |
- Since:
- LIMO R1
| void gtk_color_chooser_convert_color_saturation |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color | |
|
) |
| | |
Change the GtkColorChooser Saturation style that relation to GdkColor value.
- Parameters:
-
| [in] | colorchooser | : specifies the GtkColorChooser |
| [in] | color,: | specifies the GdkColor |
- Since:
- LIMO R1
| void gtk_color_chooser_convert_color_value |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color | |
|
) |
| | |
Change the GtkColorChooser value style that relation to GdkColor value.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | color,: | specifies the GdkColor |
- Since:
- LIMO R1
| void gtk_color_chooser_extraction_color_hue |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color, |
|
|
gdouble * |
hue | |
|
) |
| | |
Extract the hue from the GdkColor.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | color | : specifies the GdkColor |
| [out] | hue,: | value for the hue component |
- Since:
- LIMO R1
| void gtk_color_chooser_extraction_color_saturation |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color, |
|
|
gdouble * |
saturation | |
|
) |
| | |
Extract the saturation from the GdkColor.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | color,: | specifies the GdkColor |
| [out] | saturation,: | value for the saturation component |
- Since:
- LIMO R1
| void gtk_color_chooser_extraction_color_value |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color, |
|
|
gdouble * |
value | |
|
) |
| | |
Extract the value from the GdkColor.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | color,: | specifies the GdkColor |
| [out] | value | : value for the value component |
- Since:
- LIMO R1
| void gtk_color_chooser_get |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
outcolor, |
|
|
guint |
index | |
|
) |
| | |
Get the GdkColor of specified index GtkColorChooser.
If index is under 0 then index is 0 , index is bigger than max then index replaced with max index. - Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [out] | outcolor,: | specifies the GdkColor |
| [in] | index,: | specifies the index |
- Since:
- LIMO R1
| guint gtk_color_chooser_get_color_index |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color | |
|
) |
| | |
Return index of color to GtkColorChooser.
Search the color and returns the index. - Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | colorchooser,: | specifies the GtkColorChooser |
- Returns:
- index of color
- Since:
- LIMO R1
Return The number of added GdkColor in GtkColorChooser.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
- Returns:
- the number of added GdkColor.
- Since:
- LIMO R1
| void gtk_color_chooser_get_selection |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
outcolor | |
|
) |
| | |
Get currently seleted GdkColor in GtkColorChooser.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [out] | outcolor,: | specifies the specifies the GdkColor |
- See also:
gtk_color_chooser_get_selection_index()
- Since:
- LIMO R1
| guint gtk_color_chooser_get_selection_index |
( |
GtkColorChooser * |
colorchooser |
) |
|
| GType gtk_color_chooser_get_type |
( |
void |
|
) |
|
This Fuction returns GType.
- Returns:
- GType Type
- Since:
- LIMO R1
| void gtk_color_chooser_insert |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color, |
|
|
guint |
index | |
|
) |
| | |
Insert the color of GtkColorChooser to specified index.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | color,: | specifies the GdkColor |
| [in] | index,: | specifies the index |
- Since:
- LIMO R1
| void gtk_color_chooser_mix_color_hsv |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color, |
|
|
gdouble |
h, |
|
|
gdouble |
s, |
|
|
gdouble |
v | |
|
) |
| | |
Converts a color from HSV space to RGB Input values must be in the [0.0, 1.0] range.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [out] | color,: | specifies the specifies the GdkColor |
| [in] | h,: | value for the hue component |
| [in] | s,: | value for the saturation component |
| [in] | v,: | value for the value component |
- Since:
- LIMO R1
| GtkWidget* gtk_color_chooser_new |
( |
GtkColorChooserStyle |
style |
) |
|
Create color chooser widget that can select the color value.
- Returns:
- color chooser widget.
- Since:
- LIMO R1
| void gtk_color_chooser_remove |
( |
GtkColorChooser * |
colorchooser, |
|
|
guint |
index | |
|
) |
| | |
Remove the color of specified index of GtkColorChooser.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | index,: | specifies the index |
- Since:
- LIMO R1
Remove all color of GtkColorChooser.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
- Since:
- LIMO R1
| void gtk_color_chooser_set |
( |
GtkColorChooser * |
colorchooser, |
|
|
GdkColor * |
color, |
|
|
guint |
index | |
|
) |
| | |
Set the color of specified index of color chooser with GdkColor.
- Parameters:
-
| [in] | colorchooser,: | specifies the GtkColorChooser |
| [in] | color,: | specifies the GdkColor |
| [in] | index,: | specifies the index |
- Since:
- LIMO R1
| void gtk_color_chooser_set_selection_index |
( |
GtkColorChooser * |
colorchooser, |
|
|
guint |
index | |
|
) |
| | |
Set Selected index to GtkColorChooser.
index is corrected automatically when out of range. - Parameters:
-
| [in] | colorchooser | : specifies the GtkColorChooser |
| [in] | index,: | specifies the index |
- See also:
gtk_color_chooser_get_selection_index()
- Since:
- LIMO R1
Generated on Mon Mar 31 01:01:00 2008 by
1.5.4
|