style-color.h 1.14 KB
Newer Older
1 2
#ifndef GNUMERIC_STYLE_COLOR_H
#define GNUMERIC_STYLE_COLOR_H
Arturo Espinosa's avatar
Arturo Espinosa committed
3

4
#include "gnumeric.h"
Jody Goldberg's avatar
Jody Goldberg committed
5
#include <gdk/gdkcolor.h>
6 7 8 9 10 11 12

struct _StyleColor {
	GdkColor color;
	GdkColor selected_color;
	gushort  red;
	gushort  green;
	gushort  blue;
13 14
	char     *name;
	int      ref_count;
15
	gboolean is_auto;
16
};
Arturo Espinosa's avatar
Arturo Espinosa committed
17 18

/* Colors used by any GnumericSheet item */
19
extern GdkColor gs_white, gs_light_gray, gs_dark_gray, gs_black, gs_red, gs_lavender;
Arturo Espinosa's avatar
Arturo Espinosa committed
20

21 22
StyleColor *style_color_new_name (char const *name);
StyleColor *style_color_new      (gushort red, gushort green, gushort blue);
23 24 25 26
StyleColor *style_color_new_i8    (guint8 red, guint8 green, guint8 blue);
StyleColor *style_color_auto_font (void);
StyleColor *style_color_auto_back (void);
StyleColor *style_color_auto_pattern (void);
27 28
StyleColor *style_color_ref      (StyleColor *sc);
void        style_color_unref    (StyleColor *sc);
29
gint        style_color_equal (const StyleColor *k1, const StyleColor *k2);
30 31 32
StyleColor *style_color_black    (void);
StyleColor *style_color_white    (void);
StyleColor *style_color_grid     (void);
33 34 35 36 37

void gnumeric_color_init     (void);
void gnumeric_color_shutdown (void);

#endif /* GNUMERIC_STYLE_COLOR_H */