00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include <stdio.h>
00028 #include <glib.h>
00029 #include "cr-utils.h"
00030
00031 #ifndef __CR_RGB_H__
00032 #define __CR_RGB_H__
00033
00034 G_BEGIN_DECLS
00035
00036
00037 typedef struct _CRRgb CRRgb ;
00038 struct _CRRgb
00039 {
00040
00041
00042
00043
00044
00045 const guchar *name ;
00046 glong red ;
00047 glong green ;
00048 glong blue ;
00049 gboolean is_percentage ;
00050 } ;
00051
00052 CRRgb *
00053 cr_rgb_new (void) ;
00054
00055 CRRgb *
00056 cr_rgb_new_with_vals (gulong a_red, gulong a_green,
00057 gulong a_blue, gboolean a_is_percentage) ;
00058
00059 enum CRStatus
00060 cr_rgb_set (CRRgb *a_this, gulong a_red,
00061 gulong a_green, gulong a_blue,
00062 gboolean a_is_percentage) ;
00063
00064 enum CRStatus
00065 cr_rgb_set_from_rgb (CRRgb *a_this, CRRgb *a_rgb) ;
00066
00067 enum CRStatus
00068 cr_rgb_set_from_name (CRRgb *a_this, const guchar *a_color_name) ;
00069
00070 enum CRStatus
00071 cr_rgb_set_from_hex_str (CRRgb *a_this, const guchar * a_hex_value) ;
00072
00073 guchar *
00074 cr_rgb_to_string (CRRgb *a_this) ;
00075
00076 void
00077 cr_rgb_dump (CRRgb *a_this, FILE *a_fp) ;
00078
00079 void
00080 cr_rgb_destroy (CRRgb *a_this) ;
00081
00082 G_END_DECLS
00083
00084 #endif