Top | ![]() |
![]() |
![]() |
![]() |
gboolean | lw_color_get_color_mapping () |
GVariant * | lw_color_set_color_mapping () |
LwHSL * | lw_hsl_copy () |
void | lw_hsl_free () |
GdkRGBA * | lw_hsl_to_rgb () |
LwHSL * | lw_rgb_to_hsl () |
The following functions provide support for converting colors from one color model to another color model. There are also some functions for getting/setting GdkRGBA objects from/to GSettings strings.
gboolean lw_color_get_color_mapping (GValue *value
,GVariant *variant
,gpointer p
);
This function is used to convert a color from a GSettings string to a GdkRGBA
object. Use this function as get mapping function of g_settings_bind_with_mapping()
or take a look at the lw_settings_bind_color()
macro.
value |
Return location for the property value |
|
variant |
The GVariant |
|
p |
User data that was specified when the binding was created |
GVariant * lw_color_set_color_mapping (const GValue *value
,const GVariantType *type
,gpointer p
);
This function is used to convert a GdkRGBA object to a GSettings string. Use this
function as set mapping function of g_settings_bind_with_mapping()
or take a look
at the lw_settings_bind_color()
macro.
value |
A GValue containing the property value to map |
|
type |
The GVariantType to create |
|
p |
User data that was specified when the binding was created |
LwHSL *
lw_hsl_copy (const LwHSL *hsl
);
Makes a copy of a LwHSL structure.
Since: 0.4
void
lw_hsl_free (LwHSL *hsl
);
Frees a LwHSL structure created with lw_hsl_copy()
.
Since: 0.4
GdkRGBA *
lw_hsl_to_rgb (LwHSL *hsl
);
Converts a color from the HSL color model to the RGB color model. The alpha value of the result will be undefined.
struct LwHSL { gdouble hue; gdouble saturation; gdouble lightness; };
This structure represents a color in HSL color space.
Since: 0.4