#include <stdio.h>#include <glib.h>#include "cr-utils.h"Go to the source code of this file.
Data Structures | |
| struct | _CRRgb |
Functions | |
| CRRgb * | cr_rgb_new (void) |
| The default constructor of CRRgb. | |
| CRRgb * | cr_rgb_new_with_vals (gulong a_red, gulong a_green, gulong a_blue, gboolean a_is_percentage) |
| A constructor of CRRgb. | |
| CRRgb * | cr_rgb_parse_from_buf (const guchar *a_str, enum CREncoding a_enc) |
| Parses a text buffer that contains a rgb color. | |
| enum CRStatus | cr_rgb_compute_from_percentage (CRRgb *a_this) |
| If the rgb values are expressed in percentage, compute their real value. | |
| enum CRStatus | cr_rgb_set (CRRgb *a_this, gulong a_red, gulong a_green, gulong a_blue, gboolean a_is_percentage) |
| Sets rgb values to the RGB. | |
| enum CRStatus | cr_rgb_set_from_rgb (CRRgb *a_this, CRRgb *a_rgb) |
| Sets the rgb from an other one. | |
| enum CRStatus | cr_rgb_set_from_name (CRRgb *a_this, const guchar *a_color_name) |
| enum CRStatus | cr_rgb_set_from_hex_str (CRRgb *a_this, const guchar *a_hex_value) |
| enum CRStatus | cr_rgb_set_from_term (CRRgb *a_this, const struct _CRTerm *a_value) |
| Set the rgb from a terminal symbol. | |
| guchar * | cr_rgb_to_string (CRRgb *a_this) |
| Serializes the rgb into a zero terminated string. | |
| void | cr_rgb_dump (CRRgb *a_this, FILE *a_fp) |
| Dumps the current instance of CRRgb to a file. | |
| void | cr_rgb_destroy (CRRgb *a_this) |
| Destructor of CRRgb. | |
Variables | |
| typedefG_BEGIN_DECLS struct _CRRgb | CRRgb |
|
|
If the rgb values are expressed in percentage, compute their real value.
Definition at line 303 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, and CR_OK. |
|
|
Destructor of CRRgb.
|
|
||||||||||||
|
Dumps the current instance of CRRgb to a file.
Definition at line 281 of file cr-rgb.c. References cr_rgb_to_string(). |
|
|
The default constructor of CRRgb.
Definition at line 185 of file cr-rgb.c. References cr_utils_trace_info, and CRRgb. Referenced by cr_rgb_new_with_vals(), and cr_rgb_parse_from_buf(). |
|
||||||||||||||||||||
|
A constructor of CRRgb.
Definition at line 211 of file cr-rgb.c. References cr_rgb_new(), and CRRgb. |
|
||||||||||||
|
Parses a text buffer that contains a rgb color.
Definition at line 494 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(), cr_term_destroy(), CRParser, CRRgb, CRStatus, and CRTerm. |
|
||||||||||||||||||||||||
|
Sets rgb values to the RGB.
Definition at line 326 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, and CR_OK. Referenced by cr_rgb_set_from_hex_str(), cr_rgb_set_from_rgb(), and cr_style_set_props_to_defaults(). |
|
||||||||||||
|
Definition at line 386 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, CR_OK, cr_rgb_set(), CR_UNKNOWN_TYPE_ERROR, and CRStatus. Referenced by cr_rgb_set_from_term(). |
|
||||||||||||
|
Definition at line 363 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, CR_OK, cr_rgb_set_from_rgb(), CR_UNKNOWN_TYPE_ERROR, CRStatus, and name. Referenced by cr_rgb_set_from_term(). |
|
||||||||||||
|
Sets the rgb from an other one.
Definition at line 352 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, CR_OK, and cr_rgb_set(). Referenced by cr_rgb_set_from_name(), and cr_rgb_set_from_term(). |
|
||||||||||||
|
Set the rgb from a terminal symbol.
Definition at line 444 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, CR_OK, cr_rgb_set_from_hex_str(), cr_rgb_set_from_name(), cr_rgb_set_from_rgb(), CR_UNKNOWN_TYPE_ERROR, CRStatus, TERM_HASH, TERM_IDENT, and TERM_RGB. Referenced by cr_rgb_parse_from_buf(). |
|
|
Serializes the rgb into a zero terminated string.
Definition at line 235 of file cr-rgb.c. Referenced by cr_rgb_dump(), cr_style_rgb_prop_val_to_string(), and cr_term_to_string(). |
|
|
Definition at line 33 of file cr-rgb.h. Referenced by cr_rgb_new(), cr_rgb_new_with_vals(), cr_rgb_parse_from_buf(), and cr_tknzr_get_next_token(). |
1.3.5