#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. | |
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) |
guchar * | cr_rgb_to_string (CRRgb *a_this) |
Serialises 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 |
|
Destructor of CRRgb.
|
|
Dumps the current instance of CRRgb to a file.
Definition at line 289 of file cr-rgb.c. References cr_rgb_to_string(). |
|
The default constructor of CRRgb.
Definition at line 187 of file cr-rgb.c. References cr_utils_trace_info, and CRRgb. Referenced by cr_rgb_new_with_vals(). |
|
A constructor of CRRgb.
Definition at line 215 of file cr-rgb.c. References cr_rgb_new(), and CRRgb. |
|
Sets rgb values to the RGB. If the rgb values are percentages, make sure that the sum of the 3 values makes 100%.
Definition at line 317 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, and CR_OK. Referenced by cr_rgb_set_from_hex_str(), and cr_rgb_set_from_rgb(). |
|
Definition at line 395 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, CR_OK, cr_rgb_set(), CR_UNKNOWN_TYPE_ERROR, and CRStatus. |
|
Definition at line 370 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, CR_OK, cr_rgb_set_from_rgb(), CR_UNKNOWN_TYPE_ERROR, CRStatus, and name. |
|
Sets the rgb from an other one.
Definition at line 357 of file cr-rgb.c. References CR_BAD_PARAM_ERROR, CR_OK, and cr_rgb_set(). Referenced by cr_rgb_set_from_name(). |
|
Serialises the rgb into a zero terminated string.
Definition at line 239 of file cr-rgb.c. Referenced by cr_rgb_dump(), and cr_term_to_string(). |
|
Definition at line 37 of file cr-rgb.h. Referenced by cr_rgb_new(), cr_rgb_new_with_vals(), and cr_tknzr_get_next_token(). |