|
Libcroco
|
Go to the source code of this file.
Data Structures | |
| struct | _CRRgb |
Typedefs | |
| typedef typedefG_BEGIN_DECLS struct _CRRgb | CRRgb |
Functions | |
| CRRgb * | cr_rgb_new (void) |
| cr_rgb_new: More... | |
| CRRgb * | cr_rgb_new_with_vals (gulong a_red, gulong a_green, gulong a_blue, gboolean a_is_percentage) |
| cr_rgb_new_with_vals: @a_red: the red component of the color. More... | |
| CRRgb * | cr_rgb_parse_from_buf (const guchar *a_str, enum CREncoding a_enc) |
| cr_rgb_parse_from_buf: @a_str: a string that contains a color description @a_enc: the encoding of a_str More... | |
| enum CRStatus | cr_rgb_compute_from_percentage (CRRgb *a_this) |
| cr_rgb_compute_from_percentage: @a_this: the current instance of CRRgb More... | |
| enum CRStatus | cr_rgb_set (CRRgb *a_this, gulong a_red, gulong a_green, gulong a_blue, gboolean a_is_percentage) |
| cr_rgb_set: @a_this: the current instance of CRRgb. More... | |
| enum CRStatus | cr_rgb_copy (CRRgb *a_dest, CRRgb const *a_src) |
| enum CRStatus | cr_rgb_set_to_inherit (CRRgb *a_this, gboolean a_inherit) |
| cr_rgb_set_to_inherit: @a_this: the current instance of CRRgb More... | |
| gboolean | cr_rgb_is_set_to_inherit (CRRgb const *a_this) |
| cr_rgb_is_set_to_inherit: More... | |
| gboolean | cr_rgb_is_set_to_transparent (CRRgb const *a_this) |
| cr_rgb_is_set_to_transparent: @a_this: the current instance of CRRgb More... | |
| enum CRStatus | cr_rgb_set_to_transparent (CRRgb *a_this, gboolean a_is_transparent) |
| cr_rgb_set_to_transparent: @a_this: the current instance of CRRgb @a_is_transparent: set to transparent or not. More... | |
| enum CRStatus | cr_rgb_set_from_rgb (CRRgb *a_this, CRRgb const *a_rgb) |
| cr_rgb_set_from_rgb: @a_this: the current instance of CRRgb. More... | |
| enum CRStatus | cr_rgb_set_from_name (CRRgb *a_this, const guchar *a_color_name) |
| cr_rgb_set_from_name: @a_this: the current instance of CRRgb @a_color_name: the color name More... | |
| enum CRStatus | cr_rgb_set_from_hex_str (CRRgb *a_this, const guchar *a_hex_value) |
| cr_rgb_set_from_hex_str: @a_this: the current instance of CRRgb @a_hex: the hexadecimal value to set. More... | |
| enum CRStatus | cr_rgb_set_from_term (CRRgb *a_this, const struct _CRTerm *a_value) |
| cr_rgb_set_from_term: @a_this: the instance of CRRgb to set @a_value: the terminal from which to set More... | |
| guchar * | cr_rgb_to_string (CRRgb const *a_this) |
| cr_rgb_to_string: @a_this: the instance of CRRgb to serialize. More... | |
| void | cr_rgb_dump (CRRgb const *a_this, FILE *a_fp) |
| cr_rgb_dump: @a_this: the "this pointer" of the current instance of CRRgb. More... | |
| void | cr_rgb_destroy (CRRgb *a_this) |
| cr_rgb_destroy: @a_this: the "this pointer" of the current instance of CRRgb. More... | |
cr_rgb_compute_from_percentage: @a_this: the current instance of CRRgb
If the rgb values are expressed in percentage, compute their real value.
Returns CR_OK upon successful completion, an error code otherwise.
Definition at line 294 of file cr-rgb.c.
References cr_rgb_to_string().
| void cr_rgb_destroy | ( | CRRgb * | a_this | ) |
| void cr_rgb_dump | ( | CRRgb const * | a_this, |
| FILE * | a_fp | ||
| ) |
| gboolean cr_rgb_is_set_to_inherit | ( | CRRgb const * | a_this | ) |
cr_rgb_is_set_to_inherit:
@a_this: the current instance of CRRgb.
Returns TRUE if the rgb is set to the value "inherit", FALSE otherwise.
Definition at line 393 of file cr-rgb.c.
References CR_BAD_PARAM_ERROR.
| gboolean cr_rgb_is_set_to_transparent | ( | CRRgb const * | a_this | ) |
| CRRgb* cr_rgb_new | ( | void | ) |
cr_rgb_new:
The default constructor of CRRgb.
Returns the newly built instance of CRRgb
Definition at line 192 of file cr-rgb.c.
References cr_utils_trace_info.
Referenced by cr_rgb_new_with_vals(), and cr_rgb_parse_from_buf().
| CRRgb* cr_rgb_new_with_vals | ( | gulong | a_red, |
| gulong | a_green, | ||
| gulong | a_blue, | ||
| gboolean | a_is_percentage | ||
| ) |
cr_rgb_new_with_vals: @a_red: the red component of the color.
@a_green: the green component of the color. @a_blue: the blue component of the color. @a_unit: the unit of the rgb values. (either percentage or integer values)
A constructor of CRRgb.
Returns the newly built instance of CRRgb.
Definition at line 221 of file cr-rgb.c.
References cr_rgb_new().
| CRRgb* cr_rgb_parse_from_buf | ( | const guchar * | a_str, |
| enum CREncoding | a_enc | ||
| ) |
cr_rgb_parse_from_buf: @a_str: a string that contains a color description @a_enc: the encoding of a_str
Parses a text buffer that contains a rgb color
Returns the parsed color, or NULL in case of error
Definition at line 648 of file cr-rgb.c.
References CR_OK, cr_parser_destroy(), cr_parser_new_from_buf(), cr_parser_parse_term(), cr_parser_try_to_skip_spaces_and_comments(), cr_rgb_new(), cr_rgb_set_from_term(), and cr_term_destroy().
cr_rgb_set_from_term: @a_this: the instance of CRRgb to set @a_value: the terminal from which to set
Set the rgb from a terminal symbol
Returns CR_OK upon successful completion, an error code otherwise.
Definition at line 456 of file cr-rgb.c.
Referenced by cr_rgb_parse_from_buf().
| guchar* cr_rgb_to_string | ( | CRRgb const * | a_this | ) |
cr_rgb_to_string: @a_this: the instance of CRRgb to serialize.
Serializes the rgb into a zero terminated string.
Returns the zero terminated string containing the serialized rgb. MUST BE FREED by the caller using g_free().
Definition at line 248 of file cr-rgb.c.
Referenced by cr_rgb_compute_from_percentage(), cr_term_one_to_string(), and cr_term_to_string().