aboutsummaryrefslogblamecommitdiffstats
path: root/src/bin/e_color.h
blob: 4f6ee97141114ccce7bdb61232ff84a7164b86c1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13

                 
                                
 
                              







                        
                    
 



                      
                                                                                          






                 


                                                                 
      
      
#ifdef E_TYPEDEFS

typedef struct _E_Color E_Color;

typedef enum E_Color_Component
{
   E_COLOR_COMPONENT_R,
   E_COLOR_COMPONENT_G,
   E_COLOR_COMPONENT_B,
   E_COLOR_COMPONENT_H,
   E_COLOR_COMPONENT_S,
   E_COLOR_COMPONENT_V,
   E_COLOR_COMPONENT_MAX
} E_Color_Component;

#else
#ifndef E_COLOR_HEADER
#define E_COLOR_HEADER

/* used so that a single color struct can be shared by all elements of the color dialog */
struct _E_Color
{
   int r, g, b;
   float h, s, v;
   int a;
};

E_API void e_color_update_rgb (E_Color *ec);
E_API void e_color_update_hsv (E_Color *ec);
E_API void e_color_copy       (const E_Color *from, E_Color *to);
#endif
#endif