[goffice: 1/2] renamed macros in go-color.h



commit f261759ac63133a2438c6d839847cbc91c9f3911
Author: Jean Brefort <jean brefort normalesup org>
Date:   Tue Sep 1 07:37:16 2009 +0200

    renamed macros in go-color.h

 ChangeLog                          |    5 ++
 goffice/canvas/goc-circle.c        |    4 +-
 goffice/canvas/goc-ellipse.c       |    4 +-
 goffice/canvas/goc-line.c          |    2 +-
 goffice/canvas/goc-polygon.c       |    4 +-
 goffice/canvas/goc-polyline.c      |    2 +-
 goffice/canvas/goc-rectangle.c     |    4 +-
 goffice/graph/gog-equation.c       |    8 +-
 goffice/graph/gog-error-bar.c      |    8 +-
 goffice/graph/gog-theme.c          |   98 ++++++++++++++--------------
 goffice/gtk/go-3d-rotation-sel.c   |   10 ++--
 goffice/gtk/go-color-group.c       |    2 +-
 goffice/gtk/go-color-palette.c     |  130 ++++++++++++++++++------------------
 goffice/gtk/go-color-selector.c    |   36 +++++-----
 goffice/gtk/go-combo-color.c       |    8 +-
 goffice/gtk/go-gradient-selector.c |    4 +-
 goffice/gtk/go-marker-selector.c   |    4 +-
 goffice/gtk/go-pattern-selector.c  |    8 +-
 goffice/gtk/go-rotation-sel.c      |    8 +-
 goffice/utils/go-color.c           |   16 ++--
 goffice/utils/go-color.h           |   88 ++++++++++++------------
 goffice/utils/go-format.c          |   32 +++++-----
 goffice/utils/go-image.c           |    4 +-
 goffice/utils/go-libxml-extras.c   |    4 +-
 goffice/utils/go-marker.c          |    4 +-
 goffice/utils/go-pattern.c         |   10 ++--
 goffice/utils/go-style.c           |   18 +++---
 plugins/plot_radar/gog-radar.c     |   12 ++--
 plugins/plot_surface/gog-contour.c |    4 +-
 plugins/plot_xy/gog-xy.c           |   14 ++--
 30 files changed, 280 insertions(+), 275 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8d3d95f..5c2c3cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-01  Jean Brefort  <jean brefort normalesup org>
+
+	* goffice/utils/go-color.h: prefixed all macros with GO_
+	* all files: use renamed go-color.h macros.
+
 2009-08-31  Jean Brefort  <jean brefort normalesup org>
 
 	* all files: deprecate GOStyle::outline. [#593608]
diff --git a/goffice/canvas/goc-circle.c b/goffice/canvas/goc-circle.c
index ccae550..3cd2a5e 100644
--- a/goffice/canvas/goc-circle.c
+++ b/goffice/canvas/goc-circle.c
@@ -140,11 +140,11 @@ goc_circle_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
 	if (style->line.auto_dash)
 		style->line.dash_type = GO_LINE_SOLID;
 	if (style->line.auto_color)
-		style->line.color = RGBA_BLACK;
+		style->line.color = GO_RGBA_BLACK;
 	if (style->fill.auto_type)
 		style->fill.type  = GO_STYLE_FILL_PATTERN;
 	if (style->fill.auto_fore)
-		go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+		go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 }
 
 static void
diff --git a/goffice/canvas/goc-ellipse.c b/goffice/canvas/goc-ellipse.c
index c36d203..97afcd1 100644
--- a/goffice/canvas/goc-ellipse.c
+++ b/goffice/canvas/goc-ellipse.c
@@ -193,11 +193,11 @@ goc_ellipse_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
 	if (style->line.auto_dash)
 		style->line.dash_type = GO_LINE_SOLID;
 	if (style->line.auto_color)
-		style->line.color = RGBA_BLACK;
+		style->line.color = GO_RGBA_BLACK;
 	if (style->fill.auto_type)
 		style->fill.type  = GO_STYLE_FILL_PATTERN;
 	if (style->fill.auto_fore)
-		go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+		go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 }
 
 static void
diff --git a/goffice/canvas/goc-line.c b/goffice/canvas/goc-line.c
index 4ece365..64cf2b9 100644
--- a/goffice/canvas/goc-line.c
+++ b/goffice/canvas/goc-line.c
@@ -241,7 +241,7 @@ goc_line_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
 	if (style->line.auto_dash)
 		style->line.dash_type = GO_LINE_SOLID;
 	if (style->line.auto_color)
-		style->line.color = RGBA_BLACK;
+		style->line.color = GO_RGBA_BLACK;
 	if (style->line.auto_fore)
 		style->line.fore  = 0;
 }
diff --git a/goffice/canvas/goc-polygon.c b/goffice/canvas/goc-polygon.c
index bf9fb6e..cef83c1 100644
--- a/goffice/canvas/goc-polygon.c
+++ b/goffice/canvas/goc-polygon.c
@@ -205,11 +205,11 @@ goc_polygon_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
 	if (style->line.auto_dash)
 		style->line.dash_type = GO_LINE_SOLID;
 	if (style->line.auto_color)
-		style->line.color = RGBA_BLACK;
+		style->line.color = GO_RGBA_BLACK;
 	if (style->fill.auto_type)
 		style->fill.type  = GO_STYLE_FILL_PATTERN;
 	if (style->fill.auto_fore)
-		go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+		go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 }
 
 static void
diff --git a/goffice/canvas/goc-polyline.c b/goffice/canvas/goc-polyline.c
index 594b9be..f63db8b 100644
--- a/goffice/canvas/goc-polyline.c
+++ b/goffice/canvas/goc-polyline.c
@@ -186,7 +186,7 @@ goc_polyline_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
 	if (style->line.auto_dash)
 		style->line.dash_type = GO_LINE_SOLID;
 	if (style->line.auto_color)
-		style->line.color = RGBA_BLACK;
+		style->line.color = GO_RGBA_BLACK;
 }
 
 static void
diff --git a/goffice/canvas/goc-rectangle.c b/goffice/canvas/goc-rectangle.c
index 3605b87..4325a8c 100644
--- a/goffice/canvas/goc-rectangle.c
+++ b/goffice/canvas/goc-rectangle.c
@@ -174,11 +174,11 @@ goc_rectangle_init_style (G_GNUC_UNUSED GocStyledItem *item, GOStyle *style)
 	if (style->line.auto_dash)
 		style->line.dash_type = GO_LINE_SOLID;
 	if (style->line.auto_color)
-		style->line.color = RGBA_BLACK;
+		style->line.color = GO_RGBA_BLACK;
 	if (style->fill.auto_type)
 		style->fill.type  = GO_STYLE_FILL_PATTERN;
 	if (style->fill.auto_fore)
-		go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+		go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 }
 
 static void
diff --git a/goffice/graph/gog-equation.c b/goffice/graph/gog-equation.c
index 0f5c8d6..aea0b36 100644
--- a/goffice/graph/gog-equation.c
+++ b/goffice/graph/gog-equation.c
@@ -124,10 +124,10 @@ _update_equation_style (GogEquation *equation, const GOStyle *style)
 		return;
 
 	lsm_mathml_style_set_math_color (math_style,
-				      DOUBLE_RGBA_R (style->font.color),
-				      DOUBLE_RGBA_G (style->font.color),
-				      DOUBLE_RGBA_B (style->font.color),
-				      DOUBLE_RGBA_A (style->font.color));
+				      GO_DOUBLE_RGBA_R (style->font.color),
+				      GO_DOUBLE_RGBA_G (style->font.color),
+				      GO_DOUBLE_RGBA_B (style->font.color),
+				      GO_DOUBLE_RGBA_A (style->font.color));
 
 	font_description = style->font.font->desc;
 	if (font_description != NULL) {
diff --git a/goffice/graph/gog-error-bar.c b/goffice/graph/gog-error-bar.c
index 1eaabbd..137cbcd 100644
--- a/goffice/graph/gog-error-bar.c
+++ b/goffice/graph/gog-error-bar.c
@@ -225,7 +225,7 @@ gog_error_bar_prefs (GogSeries *series,
 		editor->width = editor->bar->width;
 		editor->display = editor->bar->display;
 	} else {
-		editor->color = RGBA_BLACK;
+		editor->color = GO_RGBA_BLACK;
 		editor->line_width = 1.;
 		editor->width = 5.;
 		editor->display = GOG_ERROR_BAR_DISPLAY_BOTH;
@@ -253,7 +253,7 @@ gog_error_bar_prefs (GogSeries *series,
 	style_table = GTK_TABLE (gtk_builder_get_object (gui, "style_table"));
 
 	/* Color */
-	w = go_color_selector_new (editor->color, RGBA_BLACK, "error-bar");
+	w = go_color_selector_new (editor->color, GO_RGBA_BLACK, "error-bar");
 	gtk_label_set_mnemonic_widget (
 		GTK_LABEL (gtk_builder_get_object (gui, "color_label")), w);
 	g_signal_connect (G_OBJECT (w),
@@ -332,7 +332,7 @@ gog_error_bar_init (GogErrorBar* bar)
 	bar->width = 5.;
 	bar->style = go_style_new ();
 	bar->style->interesting_fields = GO_STYLE_LINE;
-	bar->style->line.color = RGBA_BLACK;
+	bar->style->line.color = GO_RGBA_BLACK;
 	bar->style->line.width = 1.;
 }
 
@@ -429,7 +429,7 @@ gog_error_bar_persist_sax_save (GOPersist const *gp, GsfXMLOut *output)
 		gsf_xml_out_add_float (output, "width", bar->width, 6);
 	if (bar->style->line.width != 1.)
 		gsf_xml_out_add_float (output, "line_width", bar->style->line.width, 6);
-	if (bar->style->line.color != RGBA_BLACK)
+	if (bar->style->line.color != GO_RGBA_BLACK)
 		go_xml_out_add_color (output, "color", bar->style->line.color);
 }
 
diff --git a/goffice/graph/gog-theme.c b/goffice/graph/gog-theme.c
index 6a1530e..5a66d68 100644
--- a/goffice/graph/gog-theme.c
+++ b/goffice/graph/gog-theme.c
@@ -498,39 +498,39 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_NONE;
 	style->line.width = 0;
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_NONE;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogGraph", NULL);
 
 	/* chart */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_PATTERN;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogChart", NULL);
 
 	/* Legend */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_PATTERN;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogLegend", NULL);
 
 	/* Axis */
 	style = go_style_new ();
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	gog_theme_add_element (theme, style, NULL, "GogAxis", NULL);
 
 	/* AxisLine */
 	style = go_style_new ();
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	gog_theme_add_element (theme, style, NULL, "GogAxisLine", NULL);
 
 	/* Grid */
@@ -539,22 +539,22 @@ _gog_themes_init (void)
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 1.;
 	style->line.color = 0X848284ff;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_GREY (0xd0));
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_GREY (0xd0));
 	gog_theme_add_element (theme, style, NULL, "GogGrid", NULL);
 
 	/* GridLine */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.4; 
-	style->line.color = RGBA_BLACK;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
+	style->line.color = GO_RGBA_BLACK;
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
 	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style, NULL, NULL, "MajorGrid");
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.2; 
-	style->line.color = RGBA_BLACK; 
-	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
+	style->line.color = GO_RGBA_BLACK; 
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
 	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style, NULL, NULL, "MinorGrid");
 	
@@ -562,7 +562,7 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_PATTERN;
 	/* FIXME : not really true, will want to split area from line */
 	gog_theme_add_element (theme, style,
@@ -572,9 +572,9 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_NONE;
 	style->line.width = 0.;
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_NONE;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	go_style_set_font_desc (style, pango_font_description_from_string ("Sans Bold 12"));
 	gog_theme_add_element (theme, style, NULL, "GogChart", "Title");
 
@@ -582,9 +582,9 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_NONE;
 	style->line.width = 0.;
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_NONE;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
 	gog_theme_add_element (theme, style, NULL, "GogLabel", NULL);
 
@@ -592,8 +592,8 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 1;
-	style->line.color = RGBA_BLACK;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0x00, 0x00, 0x00, 0x20));
+	style->line.color = GO_RGBA_BLACK;
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_TO_UINT (0x00, 0x00, 0x00, 0x20));
 	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style,
 		NULL, "GogTrendLine", NULL);
@@ -602,9 +602,9 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_PATTERN;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	gog_theme_add_element (theme, style,
 		NULL, "GogRegEqn", NULL);
 
@@ -613,9 +613,9 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_NONE;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_NONE;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
 	gog_theme_add_element (theme, style,
 		NULL, "GogEquation", NULL);
@@ -634,67 +634,67 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_NONE;
 	style->line.width = 0; 
-	style->line.color = RGBA_BLACK; 
+	style->line.color = GO_RGBA_BLACK; 
 	style->fill.type = GO_STYLE_FILL_GRADIENT;
 	style->fill.gradient.dir   = GO_GRADIENT_N_TO_S;
-	style->fill.pattern.fore = RGBA_BLUE;
-	style->fill.pattern.back = RGBA_BLACK;
+	style->fill.pattern.fore = GO_RGBA_BLUE;
+	style->fill.pattern.back = GO_RGBA_BLACK;
 	gog_theme_add_element (theme, style, NULL, "GogGraph", NULL);
 
 	/* chart */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_PATTERN;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogChart", NULL);
 
 	/* legend */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_PATTERN;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogLegend", NULL);
 
 	/* Axis */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
-	style->line.color = RGBA_GREY (0x20);
+	style->line.color = GO_RGBA_GREY (0x20);
 	gog_theme_add_element (theme, style, NULL, "GogAxis", NULL);
 	
 	/* AxisLine */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
-	style->line.color = RGBA_GREY (0x20);
+	style->line.color = GO_RGBA_GREY (0x20);
 	gog_theme_add_element (theme, style, NULL, "GogAxisLine", NULL);
 
 	/* Grid */
 	style = go_style_new ();
 	style->fill.type  = GO_STYLE_FILL_PATTERN;
 	style->line.dash_type = GO_LINE_NONE;
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->line.width = 0;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_GREY (0xd0));
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_GREY (0xd0));
 	gog_theme_add_element (theme, style, NULL, "GogGrid", NULL);
 
 	/* GridLine */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
-	style->line.color = RGBA_GREY (0x96);
-	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
+	style->line.color = GO_RGBA_GREY (0x96);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
 	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style, NULL, NULL, "MajorGrid");
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
-	style->line.color = RGBA_GREY (0xC0);
-	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
+	style->line.color = GO_RGBA_GREY (0xC0);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_TO_UINT (0xE0, 0xE0, 0xE0, 0xE0));
 	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style, NULL, NULL, "MinorGrid");
 	
@@ -702,9 +702,9 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0.; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_PATTERN;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_GREY (0x20));
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_GREY (0x20));
 	/* FIXME : not really true, will want to split area from line */
 	gog_theme_add_element (theme, style,
 		map_area_series_solid_guppi, "GogSeries", NULL);
@@ -713,17 +713,17 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_NONE;
 	style->line.width = 0; /* none */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_NONE;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	gog_theme_add_element (theme, style, NULL, "GogLabel", NULL);
 
 	/* trend lines */
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 1;
-	style->line.color = RGBA_BLACK;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_TO_UINT (0x00, 0x00, 0x00, 0x20));
+	style->line.color = GO_RGBA_BLACK;
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_TO_UINT (0x00, 0x00, 0x00, 0x20));
 	style->fill.type = GO_STYLE_FILL_NONE;
 	gog_theme_add_element (theme, style,
 		NULL, "GogTrendLine", NULL);
@@ -732,9 +732,9 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_SOLID;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_PATTERN;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	gog_theme_add_element (theme, style,
 		NULL, "GogRegEqn", NULL);
 
@@ -743,9 +743,9 @@ _gog_themes_init (void)
 	style = go_style_new ();
 	style->line.dash_type = GO_LINE_NONE;
 	style->line.width = 0; /* hairline */
-	style->line.color = RGBA_BLACK;
+	style->line.color = GO_RGBA_BLACK;
 	style->fill.type = GO_STYLE_FILL_NONE;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_WHITE);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_WHITE);
 	go_style_set_font_desc (style, pango_font_description_from_string ("Sans 10"));
 	gog_theme_add_element (theme, style,
 		NULL, "GogEquation", NULL);
diff --git a/goffice/gtk/go-3d-rotation-sel.c b/goffice/gtk/go-3d-rotation-sel.c
index 8e2d411..06f7952 100644
--- a/goffice/gtk/go-3d-rotation-sel.c
+++ b/goffice/gtk/go-3d-rotation-sel.c
@@ -163,7 +163,7 @@ cb_rotation_changed (GO3DRotationSel *g3d)
 		style->fill.type = GO_STYLE_FILL_PATTERN;
 		style->fill.auto_back = FALSE;
 		/* set the background light blue or transparent */
-		style->fill.pattern.back = (i == 1)? RGBA_TO_UINT (0xad, 0xd8, 0xe6, 0xff): 0;
+		style->fill.pattern.back = (i == 1)? GO_RGBA_TO_UINT (0xad, 0xd8, 0xe6, 0xff): 0;
 		style->line.width = (mean_y < 0) ? 4. : 0.5;
 		goc_item_set (g3d->cube_polygons[i], "points", points,
 		              "style", style, NULL);
@@ -209,7 +209,7 @@ cb_rotate_canvas_realize (GocCanvas *canvas, GO3DRotationSel *g3d)
 		        GOC_TYPE_POLYGON, NULL);
 		go_style = go_styled_object_get_style (GO_STYLED_OBJECT (g3d->cube_polygons[i]));
 		go_style->line.auto_color = FALSE;
-		go_style->line.color = RGBA_BLACK;
+		go_style->line.color = GO_RGBA_BLACK;
 		go_style->line.miter_limit = 1.414;
 	}
 
@@ -217,7 +217,7 @@ cb_rotate_canvas_realize (GocCanvas *canvas, GO3DRotationSel *g3d)
 	                          "x", mgn, "y", mgn, "radius", (double) g3d->radius, NULL);
 	go_style = go_styled_object_get_style (GO_STYLED_OBJECT (g3d->dial));
 	go_style->line.auto_color = FALSE;
-	go_style->line.color = RGBA_BLACK;
+	go_style->line.color = GO_RGBA_BLACK;
 	go_style->line.width = 2.;
 	go_style->fill.auto_type = FALSE;
 	go_style->fill.type = GO_STYLE_FILL_NONE;
@@ -226,12 +226,12 @@ cb_rotate_canvas_realize (GocCanvas *canvas, GO3DRotationSel *g3d)
 		GOC_TYPE_CIRCLE, "radius", (double) g3d->bank_dial_r, NULL);
 	go_style = go_styled_object_get_style (GO_STYLED_OBJECT (g3d->bank_dial));
 	go_style->line.auto_color = FALSE;
-	go_style->line.color = RGBA_BLACK;
+	go_style->line.color = GO_RGBA_BLACK;
 	go_style->line.width = 3.;
 	go_style->fill.auto_type = FALSE;
 	go_style->fill.type = GO_STYLE_FILL_PATTERN;
 	go_style->fill.auto_back = FALSE;
-	go_style->fill.pattern.back = RGBA_WHITE;
+	go_style->fill.pattern.back = GO_RGBA_WHITE;
 
 	cb_rotation_changed(g3d);	
 }
diff --git a/goffice/gtk/go-color-group.c b/goffice/gtk/go-color-group.c
index 55ddc06..50cea3b 100644
--- a/goffice/gtk/go-color-group.c
+++ b/goffice/gtk/go-color-group.c
@@ -89,7 +89,7 @@ go_color_group_init (GOColorGroup *cg)
 	cg->name = NULL;
 	cg->context = NULL;
 	for (i = 0 ; i < GO_COLOR_GROUP_HISTORY_SIZE ; i++)
-		cg->history[i] = RGBA_BLACK;
+		cg->history[i] = GO_RGBA_BLACK;
 }
 
 GSF_CLASS (GOColorGroup, go_color_group,
diff --git a/goffice/gtk/go-color-palette.c b/goffice/gtk/go-color-palette.c
index c4028d2..8f7d530 100644
--- a/goffice/gtk/go-color-palette.c
+++ b/goffice/gtk/go-color-palette.c
@@ -73,71 +73,71 @@ enum {
 };
 
 GONamedColor const default_color_set [] = {
-	{ RGBA_TO_UINT (0x00, 0x00, 0x00, 0xff), N_("black")},
-	{ RGBA_TO_UINT (0x99, 0x33, 0x00, 0xff), N_("light brown")},
-	{ RGBA_TO_UINT (0x33, 0x33, 0x00, 0xff), N_("brown gold")},
-	{ RGBA_TO_UINT (0x00, 0x33, 0x00, 0xff), N_("dark green #2")},
-	{ RGBA_TO_UINT (0x00, 0x33, 0x66, 0xff), N_("navy")},
-	{ RGBA_TO_UINT (0x00, 0x00, 0x80, 0xff), N_("dark blue")},
-	{ RGBA_TO_UINT (0x33, 0x33, 0x99, 0xff), N_("purple #2")},
-	{ RGBA_TO_UINT (0x33, 0x33, 0x33, 0xff), N_("very dark gray")},
-
-	{ RGBA_TO_UINT (0x80, 0x00, 0x00, 0xff), N_("dark red")},
-	{ RGBA_TO_UINT (0xFF, 0x66, 0x00, 0xff), N_("red-orange")},
-	{ RGBA_TO_UINT (0x80, 0x80, 0x00, 0xff), N_("gold")},
-	{ RGBA_TO_UINT (0x00, 0x80, 0x00, 0xff), N_("dark green")},
-	{ RGBA_TO_UINT (0x00, 0x80, 0x80, 0xff), N_("dull blue")},
-	{ RGBA_TO_UINT (0x00, 0x00, 0xFF, 0xff), N_("blue")},
-	{ RGBA_TO_UINT (0x66, 0x66, 0x99, 0xff), N_("dull purple")},
-	{ RGBA_TO_UINT (0x80, 0x80, 0x80, 0xff), N_("dark gray")},
-
-	{ RGBA_TO_UINT (0xFF, 0x00, 0x00, 0xff), N_("red")},
-	{ RGBA_TO_UINT (0xFF, 0x99, 0x00, 0xff), N_("orange")},
-	{ RGBA_TO_UINT (0x99, 0xCC, 0x00, 0xff), N_("lime")},
-	{ RGBA_TO_UINT (0x33, 0x99, 0x66, 0xff), N_("dull green")},
-	{ RGBA_TO_UINT (0x33, 0xCC, 0xCC, 0xff), N_("dull blue #2")},
-	{ RGBA_TO_UINT (0x33, 0x66, 0xFF, 0xff), N_("sky blue #2")},
-	{ RGBA_TO_UINT (0x80, 0x00, 0x80, 0xff), N_("purple")},
-	{ RGBA_TO_UINT (0x96, 0x96, 0x96, 0xff), N_("gray")},
-
-	{ RGBA_TO_UINT (0xFF, 0x00, 0xFF, 0xff), N_("magenta")},
-	{ RGBA_TO_UINT (0xFF, 0xCC, 0x00, 0xff), N_("bright orange")},
-	{ RGBA_TO_UINT (0xFF, 0xFF, 0x00, 0xff), N_("yellow")},
-	{ RGBA_TO_UINT (0x00, 0xFF, 0x00, 0xff), N_("green")},
-	{ RGBA_TO_UINT (0x00, 0xFF, 0xFF, 0xff), N_("cyan")},
-	{ RGBA_TO_UINT (0x00, 0xCC, 0xFF, 0xff), N_("bright blue")},
-	{ RGBA_TO_UINT (0x99, 0x33, 0x66, 0xff), N_("red purple")},
-	{ RGBA_TO_UINT (0xC0, 0xC0, 0xC0, 0xff), N_("light gray")},
-
-	{ RGBA_TO_UINT (0xFF, 0x99, 0xCC, 0xff), N_("pink")},
-	{ RGBA_TO_UINT (0xFF, 0xCC, 0x99, 0xff), N_("light orange")},
-	{ RGBA_TO_UINT (0xFF, 0xFF, 0x99, 0xff), N_("light yellow")},
-	{ RGBA_TO_UINT (0xCC, 0xFF, 0xCC, 0xff), N_("light green")},
-	{ RGBA_TO_UINT (0xCC, 0xFF, 0xFF, 0xff), N_("light cyan")},
-	{ RGBA_TO_UINT (0x99, 0xCC, 0xFF, 0xff), N_("light blue")},
-	{ RGBA_TO_UINT (0xCC, 0x99, 0xFF, 0xff), N_("light purple")},
-	{ RGBA_TO_UINT (0xFF, 0xFF, 0xFF, 0xff), N_("white")},
+	{ GO_RGBA_TO_UINT (0x00, 0x00, 0x00, 0xff), N_("black")},
+	{ GO_RGBA_TO_UINT (0x99, 0x33, 0x00, 0xff), N_("light brown")},
+	{ GO_RGBA_TO_UINT (0x33, 0x33, 0x00, 0xff), N_("brown gold")},
+	{ GO_RGBA_TO_UINT (0x00, 0x33, 0x00, 0xff), N_("dark green #2")},
+	{ GO_RGBA_TO_UINT (0x00, 0x33, 0x66, 0xff), N_("navy")},
+	{ GO_RGBA_TO_UINT (0x00, 0x00, 0x80, 0xff), N_("dark blue")},
+	{ GO_RGBA_TO_UINT (0x33, 0x33, 0x99, 0xff), N_("purple #2")},
+	{ GO_RGBA_TO_UINT (0x33, 0x33, 0x33, 0xff), N_("very dark gray")},
+
+	{ GO_RGBA_TO_UINT (0x80, 0x00, 0x00, 0xff), N_("dark red")},
+	{ GO_RGBA_TO_UINT (0xFF, 0x66, 0x00, 0xff), N_("red-orange")},
+	{ GO_RGBA_TO_UINT (0x80, 0x80, 0x00, 0xff), N_("gold")},
+	{ GO_RGBA_TO_UINT (0x00, 0x80, 0x00, 0xff), N_("dark green")},
+	{ GO_RGBA_TO_UINT (0x00, 0x80, 0x80, 0xff), N_("dull blue")},
+	{ GO_RGBA_TO_UINT (0x00, 0x00, 0xFF, 0xff), N_("blue")},
+	{ GO_RGBA_TO_UINT (0x66, 0x66, 0x99, 0xff), N_("dull purple")},
+	{ GO_RGBA_TO_UINT (0x80, 0x80, 0x80, 0xff), N_("dark gray")},
+
+	{ GO_RGBA_TO_UINT (0xFF, 0x00, 0x00, 0xff), N_("red")},
+	{ GO_RGBA_TO_UINT (0xFF, 0x99, 0x00, 0xff), N_("orange")},
+	{ GO_RGBA_TO_UINT (0x99, 0xCC, 0x00, 0xff), N_("lime")},
+	{ GO_RGBA_TO_UINT (0x33, 0x99, 0x66, 0xff), N_("dull green")},
+	{ GO_RGBA_TO_UINT (0x33, 0xCC, 0xCC, 0xff), N_("dull blue #2")},
+	{ GO_RGBA_TO_UINT (0x33, 0x66, 0xFF, 0xff), N_("sky blue #2")},
+	{ GO_RGBA_TO_UINT (0x80, 0x00, 0x80, 0xff), N_("purple")},
+	{ GO_RGBA_TO_UINT (0x96, 0x96, 0x96, 0xff), N_("gray")},
+
+	{ GO_RGBA_TO_UINT (0xFF, 0x00, 0xFF, 0xff), N_("magenta")},
+	{ GO_RGBA_TO_UINT (0xFF, 0xCC, 0x00, 0xff), N_("bright orange")},
+	{ GO_RGBA_TO_UINT (0xFF, 0xFF, 0x00, 0xff), N_("yellow")},
+	{ GO_RGBA_TO_UINT (0x00, 0xFF, 0x00, 0xff), N_("green")},
+	{ GO_RGBA_TO_UINT (0x00, 0xFF, 0xFF, 0xff), N_("cyan")},
+	{ GO_RGBA_TO_UINT (0x00, 0xCC, 0xFF, 0xff), N_("bright blue")},
+	{ GO_RGBA_TO_UINT (0x99, 0x33, 0x66, 0xff), N_("red purple")},
+	{ GO_RGBA_TO_UINT (0xC0, 0xC0, 0xC0, 0xff), N_("light gray")},
+
+	{ GO_RGBA_TO_UINT (0xFF, 0x99, 0xCC, 0xff), N_("pink")},
+	{ GO_RGBA_TO_UINT (0xFF, 0xCC, 0x99, 0xff), N_("light orange")},
+	{ GO_RGBA_TO_UINT (0xFF, 0xFF, 0x99, 0xff), N_("light yellow")},
+	{ GO_RGBA_TO_UINT (0xCC, 0xFF, 0xCC, 0xff), N_("light green")},
+	{ GO_RGBA_TO_UINT (0xCC, 0xFF, 0xFF, 0xff), N_("light cyan")},
+	{ GO_RGBA_TO_UINT (0x99, 0xCC, 0xFF, 0xff), N_("light blue")},
+	{ GO_RGBA_TO_UINT (0xCC, 0x99, 0xFF, 0xff), N_("light purple")},
+	{ GO_RGBA_TO_UINT (0xFF, 0xFF, 0xFF, 0xff), N_("white")},
 
 	{ 0, NULL},
 
 	/* Disable these for now, they are mostly repeats */
-	{ RGBA_TO_UINT (0x99, 0x99, 0xFF, 0xff), N_("purplish blue")},
-	{ RGBA_TO_UINT (0x99, 0x33, 0x66, 0xff), N_("red purple")},
-	{ RGBA_TO_UINT (0xFF, 0xFF, 0xCC, 0xff), N_("light yellow")},
-	{ RGBA_TO_UINT (0xCC, 0xFF, 0xFF, 0xff), N_("light blue")},
-	{ RGBA_TO_UINT (0x66, 0x00, 0x66, 0xff), N_("dark purple")},
-	{ RGBA_TO_UINT (0xFF, 0x80, 0x80, 0xff), N_("pink")},
-	{ RGBA_TO_UINT (0x00, 0x66, 0xCC, 0xff), N_("sky blue")},
-	{ RGBA_TO_UINT (0xCC, 0xCC, 0xFF, 0xff), N_("light purple")},
-
-	{ RGBA_TO_UINT (0x00, 0x00, 0x80, 0xff), N_("dark blue")},
-	{ RGBA_TO_UINT (0xFF, 0x00, 0xFF, 0xff), N_("magenta")},
-	{ RGBA_TO_UINT (0xFF, 0xFF, 0x00, 0xff), N_("yellow")},
-	{ RGBA_TO_UINT (0x00, 0xFF, 0xFF, 0xff), N_("cyan")},
-	{ RGBA_TO_UINT (0x80, 0x00, 0x80, 0xff), N_("purple")},
-	{ RGBA_TO_UINT (0x80, 0x00, 0x00, 0xff), N_("dark red")},
-	{ RGBA_TO_UINT (0x00, 0x80, 0x80, 0xff), N_("dull blue")},
-	{ RGBA_TO_UINT (0x00, 0x00, 0xFF, 0xff), N_("blue")},
+	{ GO_RGBA_TO_UINT (0x99, 0x99, 0xFF, 0xff), N_("purplish blue")},
+	{ GO_RGBA_TO_UINT (0x99, 0x33, 0x66, 0xff), N_("red purple")},
+	{ GO_RGBA_TO_UINT (0xFF, 0xFF, 0xCC, 0xff), N_("light yellow")},
+	{ GO_RGBA_TO_UINT (0xCC, 0xFF, 0xFF, 0xff), N_("light blue")},
+	{ GO_RGBA_TO_UINT (0x66, 0x00, 0x66, 0xff), N_("dark purple")},
+	{ GO_RGBA_TO_UINT (0xFF, 0x80, 0x80, 0xff), N_("pink")},
+	{ GO_RGBA_TO_UINT (0x00, 0x66, 0xCC, 0xff), N_("sky blue")},
+	{ GO_RGBA_TO_UINT (0xCC, 0xCC, 0xFF, 0xff), N_("light purple")},
+
+	{ GO_RGBA_TO_UINT (0x00, 0x00, 0x80, 0xff), N_("dark blue")},
+	{ GO_RGBA_TO_UINT (0xFF, 0x00, 0xFF, 0xff), N_("magenta")},
+	{ GO_RGBA_TO_UINT (0xFF, 0xFF, 0x00, 0xff), N_("yellow")},
+	{ GO_RGBA_TO_UINT (0x00, 0xFF, 0xFF, 0xff), N_("cyan")},
+	{ GO_RGBA_TO_UINT (0x80, 0x00, 0x80, 0xff), N_("purple")},
+	{ GO_RGBA_TO_UINT (0x80, 0x00, 0x00, 0xff), N_("dark red")},
+	{ GO_RGBA_TO_UINT (0x00, 0x80, 0x80, 0xff), N_("dull blue")},
+	{ GO_RGBA_TO_UINT (0x00, 0x00, 0xFF, 0xff), N_("blue")},
 
 	{ 0, NULL},
 };
@@ -160,7 +160,7 @@ create_color_sel (GObject *action_proxy, GOColor c, GCallback handler, gboolean
 		go_color_to_gdk (c, &gdk));
 	gtk_color_selection_set_has_opacity_control (colorsel, allow_alpha);
 	if (allow_alpha)
-		gtk_color_selection_set_current_alpha (colorsel, UINT_RGBA_A(c) * 257);
+		gtk_color_selection_set_current_alpha (colorsel, GO_UINT_RGBA_A(c) * 257);
 
 	g_signal_connect_object (dialog,
 		"response", handler, action_proxy, 0);
@@ -179,9 +179,9 @@ handle_color_sel (GtkColorSelectionDialog *dialog,
 		guint16 alpha = gtk_color_selection_get_current_alpha (colorsel);
 
 		gtk_color_selection_get_current_color (colorsel, &gdk);
-		*res = GDK_TO_UINT (gdk);
+		*res = GO_GDK_TO_UINT (gdk);
 		alpha >>= 8;
-		*res = UINT_RGBA_CHANGE_A (*res, alpha);
+		*res = GO_UINT_RGBA_CHANGE_A (*res, alpha);
 	}
 	/* destroy _before_ we emit */
 	gtk_object_destroy (GTK_OBJECT (dialog));
@@ -295,7 +295,7 @@ swatch_activated (GOColorPalette *pal, GtkBin *button)
 
 	g_return_if_fail (swatch != NULL);
 
-	set_color (pal, GDK_TO_UINT (swatch->style->bg[GTK_STATE_NORMAL]),
+	set_color (pal, GO_GDK_TO_UINT (swatch->style->bg[GTK_STATE_NORMAL]),
 		   FALSE, TRUE, FALSE);
 }
 
diff --git a/goffice/gtk/go-color-selector.c b/goffice/gtk/go-color-selector.c
index 4a095de..0f11e63 100644
--- a/goffice/gtk/go-color-selector.c
+++ b/goffice/gtk/go-color-selector.c
@@ -139,10 +139,10 @@ go_color_palette_render_func (cairo_t *cr,
 
 	cairo_set_line_width (cr, 1);
 	cairo_set_source_rgba (cr, 
-			       DOUBLE_RGBA_R(color), 
-			       DOUBLE_RGBA_G(color),
-			       DOUBLE_RGBA_B(color),
-			       DOUBLE_RGBA_A(color));
+			       GO_DOUBLE_RGBA_R(color), 
+			       GO_DOUBLE_RGBA_G(color),
+			       GO_DOUBLE_RGBA_B(color),
+			       GO_DOUBLE_RGBA_A(color));
 	cairo_rectangle (cr, area->x + .5 , area->y + .5 , area->width - 1, area->height - 1);
 	cairo_fill_preserve (cr);
 	cairo_set_source_rgb (cr, .75, .75, .75);
@@ -169,9 +169,9 @@ cb_color_dialog_response (GtkColorSelectionDialog *color_dialog,
 		alpha = gtk_color_selection_get_current_alpha (GTK_COLOR_SELECTION (color_selection));
 		state = go_selector_get_user_data (selector);
 		
-		color = GDK_TO_UINT (gdk_color);
+		color = GO_GDK_TO_UINT (gdk_color);
 		alpha >>= 8;
-		color = UINT_RGBA_CHANGE_A (color, alpha);
+		color = GO_UINT_RGBA_CHANGE_A (color, alpha);
 		if (!go_color_selector_set_color (selector, color))
 			/* Index is not necessarly changed, but swatch may change */
 			go_selector_activate (selector);
@@ -197,7 +197,7 @@ cb_combo_custom_activate (GOPalette *palette, GOSelector *selector)
 						       go_color_to_gdk (color, &gdk_color));
 		if (state->allow_alpha)
 			gtk_color_selection_set_current_alpha (GTK_COLOR_SELECTION (color_selection), 
-						       UINT_RGBA_A (color) * 257);
+						       GO_UINT_RGBA_A (color) * 257);
 		gtk_window_present (GTK_WINDOW (color_dialog));
 		return;
 	}
@@ -212,7 +212,7 @@ cb_combo_custom_activate (GOPalette *palette, GOSelector *selector)
 					       go_color_to_gdk (color, &gdk_color));
 	if (state->allow_alpha)
 		gtk_color_selection_set_current_alpha (GTK_COLOR_SELECTION (color_selection), 
-					       UINT_RGBA_A (color) * 257);
+					       GO_UINT_RGBA_A (color) * 257);
 	g_signal_connect (color_dialog, "response", G_CALLBACK (cb_color_dialog_response), selector);
        	gtk_widget_show (color_dialog);
 }
@@ -220,13 +220,13 @@ cb_combo_custom_activate (GOPalette *palette, GOSelector *selector)
 static void
 go_color_selector_drag_data_received (GOSelector *selector, gpointer data)
 {
-	GOColor color = RGBA_WHITE;
+	GOColor color = GO_RGBA_WHITE;
 	guint16 *color_data = data;
 
-	color = UINT_RGBA_CHANGE_R (color, color_data[0] >> 8);
-	color = UINT_RGBA_CHANGE_G (color, color_data[1] >> 8);
-	color = UINT_RGBA_CHANGE_B (color, color_data[2] >> 8);
-	color = UINT_RGBA_CHANGE_A (color, color_data[3] >> 8);
+	color = GO_UINT_RGBA_CHANGE_R (color, color_data[0] >> 8);
+	color = GO_UINT_RGBA_CHANGE_G (color, color_data[1] >> 8);
+	color = GO_UINT_RGBA_CHANGE_B (color, color_data[2] >> 8);
+	color = GO_UINT_RGBA_CHANGE_A (color, color_data[3] >> 8);
 
 	go_color_selector_set_color (selector, color);
 }
@@ -245,10 +245,10 @@ go_color_selector_drag_data_get (GOSelector *selector)
 	index = go_selector_get_active (selector, NULL);
 	color = get_color (state->n_swatches, state->color_group, index);
 
-	data[0] = UINT_RGBA_R (color) << 8;
-	data[1] = UINT_RGBA_G (color) << 8;
-	data[2] = UINT_RGBA_B (color) << 8;
-	data[3] = UINT_RGBA_A (color) << 8; 
+	data[0] = GO_UINT_RGBA_R (color) << 8;
+	data[1] = GO_UINT_RGBA_G (color) << 8;
+	data[2] = GO_UINT_RGBA_B (color) << 8;
+	data[3] = GO_UINT_RGBA_A (color) << 8; 
 
 	return data;
 }
@@ -366,7 +366,7 @@ go_color_selector_get_color (GOSelector *selector, gboolean *is_auto)
 	int index;
 	gboolean flag;
 
-	g_return_val_if_fail (GO_IS_SELECTOR (selector), RGB_WHITE);
+	g_return_val_if_fail (GO_IS_SELECTOR (selector), GO_RGB_WHITE);
 	
 	index = go_selector_get_active (selector, &flag);
 	state = go_selector_get_user_data (selector);
diff --git a/goffice/gtk/go-combo-color.c b/goffice/gtk/go-combo-color.c
index 64b9b74..761586e 100644
--- a/goffice/gtk/go-combo-color.c
+++ b/goffice/gtk/go-combo-color.c
@@ -97,8 +97,8 @@ go_combo_color_set_color_internal (GOComboColor *cc, GOColor color, gboolean is_
 				       width, color_height);
 
 	/* mostly transparent things should have an outline */
-	add_an_outline = (UINT_RGBA_A (color) < 0x80);
-	gdk_pixbuf_fill (color_pixbuf, add_an_outline ? RGBA_GREY (0x33) : color);
+	add_an_outline = (GO_UINT_RGBA_A (color) < 0x80);
+	gdk_pixbuf_fill (color_pixbuf, add_an_outline ? GO_RGBA_GREY (0x33) : color);
 	gdk_pixbuf_copy_area (color_pixbuf, 0, 0, width, color_height,
 		pixbuf, 0, color_y);
 	if (add_an_outline) {
@@ -244,7 +244,7 @@ color_table_setup (GOComboColor *cc,
 GOColor
 go_combo_color_get_color (GOComboColor *cc, gboolean *is_default)
 {
-	g_return_val_if_fail (GO_IS_COMBO_COLOR (cc), RGBA_BLACK);
+	g_return_val_if_fail (GO_IS_COMBO_COLOR (cc), GO_RGBA_BLACK);
 	return go_color_palette_get_current_color (cc->palette, is_default, NULL);
 }
 
@@ -263,7 +263,7 @@ go_combo_color_set_color_gdk (GOComboColor *cc, GdkColor *color)
 	g_return_if_fail (GO_IS_COMBO_COLOR (cc));
 
 	if (color != NULL)
-		go_color_palette_set_current_color (cc->palette, GDK_TO_UINT (*color));
+		go_color_palette_set_current_color (cc->palette, GO_GDK_TO_UINT (*color));
 	else
 		go_color_palette_set_color_to_default (cc->palette);
 }
diff --git a/goffice/gtk/go-gradient-selector.c b/goffice/gtk/go-gradient-selector.c
index 3016339..3bc950e 100644
--- a/goffice/gtk/go-gradient-selector.c
+++ b/goffice/gtk/go-gradient-selector.c
@@ -93,8 +93,8 @@ go_gradient_selector_new (GOGradientDirection initial_direction,
 	GOGradientSelectorState *state;
 
 	state = g_new (GOGradientSelectorState, 1);
-	state->start_color = RGBA_BLACK;
-	state->stop_color = RGBA_WHITE;
+	state->start_color = GO_RGBA_BLACK;
+	state->stop_color = GO_RGBA_WHITE;
 
 	palette = go_palette_new (GO_GRADIENT_MAX, 1.0, 4, 
 				  go_gradient_swatch_render_func, NULL,
diff --git a/goffice/gtk/go-marker-selector.c b/goffice/gtk/go-marker-selector.c
index af98f7e..4e82950 100644
--- a/goffice/gtk/go-marker-selector.c
+++ b/goffice/gtk/go-marker-selector.c
@@ -75,8 +75,8 @@ go_marker_selector_new (GOMarkerShape initial_shape,
 	GOMarkerSelectorState *state;
 
 	state = g_new (GOMarkerSelectorState, 1);
-	state->outline_color = RGBA_BLACK;
-	state->fill_color = RGBA_WHITE;
+	state->outline_color = GO_RGBA_BLACK;
+	state->fill_color = GO_RGBA_WHITE;
 
 	palette = go_palette_new (GO_MARKER_MAX, 1.0, 4,
 				  go_marker_palette_render_func, NULL,
diff --git a/goffice/gtk/go-pattern-selector.c b/goffice/gtk/go-pattern-selector.c
index 3201446..b403b8a 100644
--- a/goffice/gtk/go-pattern-selector.c
+++ b/goffice/gtk/go-pattern-selector.c
@@ -41,8 +41,8 @@ go_pattern_palette_render_func (cairo_t *cr,
 		pattern.fore = state->foreground;
 		pattern.back = state->background;
 	} else {
-		pattern.fore = RGBA_BLACK;
-		pattern.back = RGBA_WHITE;
+		pattern.fore = GO_RGBA_BLACK;
+		pattern.back = GO_RGBA_WHITE;
 	}
 	pattern.pattern = index;
 
@@ -76,8 +76,8 @@ go_pattern_selector_new (GOPatternType initial_type,
 	GOPatternSelectorState *state;
 
 	state = g_new (GOPatternSelectorState, 1);
-	state->foreground = RGBA_WHITE;
-	state->background = RGBA_BLACK;
+	state->foreground = GO_RGBA_WHITE;
+	state->background = GO_RGBA_BLACK;
 
 	palette = go_palette_new (GO_PATTERN_MAX, 1.0, 5,
 				  go_pattern_palette_render_func, NULL,
diff --git a/goffice/gtk/go-rotation-sel.c b/goffice/gtk/go-rotation-sel.c
index 3982899..88d0c62 100644
--- a/goffice/gtk/go-rotation-sel.c
+++ b/goffice/gtk/go-rotation-sel.c
@@ -64,7 +64,7 @@ cb_rotate_changed (GORotationSel *grs)
 	for (i = 0 ; i <= 12 ; i++)
 		if (grs->rotate_marks[i] != NULL) {
 			GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (grs->rotate_marks[i]));
-			colour = (grs->angle == (i-6)*15) ? RGBA_GREEN : RGBA_BLACK;
+			colour = (grs->angle == (i-6)*15) ? GO_RGBA_GREEN : GO_RGBA_BLACK;
 			if (style->fill.pattern.back != colour){
 				style->fill.pattern.back = colour;
 				goc_item_invalidate (grs->rotate_marks[i]);
@@ -121,14 +121,14 @@ cb_rotate_canvas_realize (GocCanvas *canvas, GORotationSel *grs)
 			NULL);
 		go_style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
 		go_style->line.width = 1.;
-		go_style->line.color = RGBA_BLACK;
-		go_style->fill.pattern.back = RGBA_BLACK;
+		go_style->line.color = GO_RGBA_BLACK;
+		go_style->fill.pattern.back = GO_RGBA_BLACK;
 		grs->rotate_marks[i] = item;
 	}
 	grs->line = goc_item_new (group, GOC_TYPE_LINE, NULL);
 	go_style = go_styled_object_get_style (GO_STYLED_OBJECT (grs->line));
 	go_style->line.width = 2.;
-	go_style->line.color = RGBA_BLACK;
+	go_style->line.color = GO_RGBA_BLACK;
 
 	{
 		int w, h;
diff --git a/goffice/utils/go-color.c b/goffice/utils/go-color.c
index d608e62..184f80c 100644
--- a/goffice/utils/go-color.c
+++ b/goffice/utils/go-color.c
@@ -38,7 +38,7 @@ go_color_from_str (gchar const *str, GOColor *res)
 	unsigned r, g, b, a;
 
 	if (sscanf (str, "%X:%X:%X:%X", &r, &g, &b, &a) == 4) {
-		*res = RGBA_TO_UINT (r, g, b, a);
+		*res = GO_RGBA_TO_UINT (r, g, b, a);
 		return TRUE;
 	}
 	return FALSE;
@@ -49,7 +49,7 @@ go_color_as_str (GOColor color)
 {
 	unsigned r, g, b, a;
 
-	UINT_TO_RGBA (color, &r, &g, &b, &a);
+	GO_UINT_TO_RGBA (color, &r, &g, &b, &a);
 	return g_strdup_printf ("%X:%X:%X:%X", r, g, b, a);
 }
 
@@ -57,11 +57,11 @@ PangoAttribute *
 go_color_to_pango (GOColor color, gboolean is_fore)
 {
 	guint16 r, g, b;
-	r  = UINT_RGBA_R (color);
+	r  = GO_UINT_RGBA_R (color);
 	r |= (r << 8);
-	g  = UINT_RGBA_G (color);
+	g  = GO_UINT_RGBA_G (color);
 	g |= (g << 8);
-	b  = UINT_RGBA_B (color);
+	b  = GO_UINT_RGBA_B (color);
 	b |= (b << 8);
 
 	if (is_fore)
@@ -76,11 +76,11 @@ go_color_to_pango (GOColor color, gboolean is_fore)
 GdkColor *
 go_color_to_gdk	(GOColor color, GdkColor *res)
 {
-	res->red    = UINT_RGBA_R (color);
+	res->red    = GO_UINT_RGBA_R (color);
 	res->red   |= (res->red << 8);
-	res->green  = UINT_RGBA_G (color);
+	res->green  = GO_UINT_RGBA_G (color);
 	res->green |= (res->green << 8);
-	res->blue   = UINT_RGBA_B (color);
+	res->blue   = GO_UINT_RGBA_B (color);
 	res->blue  |= (res->blue << 8);
 
 	return res;
diff --git a/goffice/utils/go-color.h b/goffice/utils/go-color.h
index b6072de..1059b59 100644
--- a/goffice/utils/go-color.h
+++ b/goffice/utils/go-color.h
@@ -45,56 +45,56 @@ typedef struct {
   cpp-perils...
 */
 
-#define GDK_TO_UINT(c)	RGBA_TO_UINT(((c).red>>8), ((c).green>>8), ((c).blue>>8), 0xff)
+#define GO_GDK_TO_UINT(c)	GO_RGBA_TO_UINT(((c).red>>8), ((c).green>>8), ((c).blue>>8), 0xff)
 
-#define RGB_TO_UINT(r,g,b)	((((guint)(r))<<16)|(((guint)(g))<<8)|((guint)(b)))
-#define RGB_TO_RGBA(x,a)	(((x) << 8) | ((((guint)a) & 0xff)))
-#define RGB_WHITE   RGB_TO_UINT(0xff, 0xff, 0xff)
-#define RGB_BLACK   RGB_TO_UINT(0x00, 0x00, 0x00)
-#define RGB_RED     RGB_TO_UINT(0xff, 0x00, 0x00)
-#define RGB_GREEN   RGB_TO_UINT(0x00, 0xff, 0x00)
-#define RGB_BLUE    RGB_TO_UINT(0x00, 0x00, 0xff)
-#define RGB_YELLOW  RGB_TO_UINT(0xff, 0xff, 0x00)
-#define RGB_VIOLET  RGB_TO_UINT(0xff, 0x00, 0xff)
-#define RGB_CYAN    RGB_TO_UINT(0x00, 0xff, 0xff)
-#define RGB_GREY(x) RGB_TO_UINT(x,x,x)
+#define GO_RGB_TO_UINT(r,g,b)	((((guint)(r))<<16)|(((guint)(g))<<8)|((guint)(b)))
+#define GO_RGB_TO_RGBA(x,a)	(((x) << 8) | ((((guint)a) & 0xff)))
+#define GO_RGB_WHITE  GO_RGB_TO_UINT(0xff, 0xff, 0xff)
+#define GO_RGB_BLACK   GO_RGB_TO_UINT(0x00, 0x00, 0x00)
+#define GO_RGB_RED     GO_RGB_TO_UINT(0xff, 0x00, 0x00)
+#define GO_RGB_GREEN   GO_RGB_TO_UINT(0x00, 0xff, 0x00)
+#define GO_RGB_BLUE   GO_RGB_TO_UINT(0x00, 0x00, 0xff)
+#define GO_RGB_YELLOW  GO_RGB_TO_UINT(0xff, 0xff, 0x00)
+#define GO_RGB_VIOLET  GO_RGB_TO_UINT(0xff, 0x00, 0xff)
+#define GO_RGB_CYAN    GO_RGB_TO_UINT(0x00, 0xff, 0xff)
+#define GO_RGB_GREY(x) GO_RGB_TO_UINT(x,x,x)
 
-#define RGBA_TO_UINT(r,g,b,a)	((((guint)(r))<<24)|(((guint)(g))<<16)|(((guint)(b))<<8)|(guint)(a))
-#define RGBA_WHITE  RGB_TO_RGBA(RGB_WHITE, 0xff)
-#define RGBA_BLACK  RGB_TO_RGBA(RGB_BLACK, 0xff)
-#define RGBA_RED    RGB_TO_RGBA(RGB_RED, 0xff)
-#define RGBA_GREEN  RGB_TO_RGBA(RGB_GREEN, 0xff)
-#define RGBA_BLUE   RGB_TO_RGBA(RGB_BLUE, 0xff)
-#define RGBA_YELLOW RGB_TO_RGBA(RGB_YELLOW, 0xff)
-#define RGBA_VIOLET RGB_TO_RGBA(RGB_VIOLET, 0xff)
-#define RGBA_CYAN   RGB_TO_RGBA(RGB_CYAN, 0xff)
-#define RGBA_GREY(x) RGB_TO_RGBA(RGB_GREY(x), 0xff)
+#define GO_RGBA_TO_UINT(r,g,b,a)	((((guint)(r))<<24)|(((guint)(g))<<16)|(((guint)(b))<<8)|(guint)(a))
+#define GO_RGBA_WHITE  GO_RGB_TO_RGBA(GO_RGB_WHITE, 0xff)
+#define GO_RGBA_BLACK GO_RGB_TO_RGBA(GO_RGB_BLACK, 0xff)
+#define GO_RGBA_RED    GO_RGB_TO_RGBA(GO_RGB_RED, 0xff)
+#define GO_RGBA_GREEN  GO_RGB_TO_RGBA(GO_RGB_GREEN, 0xff)
+#define GO_RGBA_BLUE   GO_RGB_TO_RGBA(GO_RGB_BLUE, 0xff)
+#define GO_RGBA_YELLOW GO_RGB_TO_RGBA(GO_RGB_YELLOW, 0xff)
+#define GO_RGBA_VIOLET GO_RGB_TO_RGBA(GO_RGB_VIOLET, 0xff)
+#define GO_RGBA_CYAN   GO_RGB_TO_RGBA(GO_RGB_CYAN, 0xff)
+#define GO_RGBA_GREY(x) GO_RGB_TO_RGBA(GO_RGB_GREY(x), 0xff)
 
-#define UINT_RGBA_R(x) (((guint)(x))>>24)
-#define UINT_RGBA_G(x) ((((guint)(x))>>16)&0xff)
-#define UINT_RGBA_B(x) ((((guint)(x))>>8)&0xff)
-#define UINT_RGBA_A(x) (((guint)(x))&0xff)
-#define UINT_RGBA_CHANGE_R(x, r) (((x)&(~(0xff<<24)))|(((r)&0xff)<<24))
-#define UINT_RGBA_CHANGE_G(x, g) (((x)&(~(0xff<<16)))|(((g)&0xff)<<16))
-#define UINT_RGBA_CHANGE_B(x, b) (((x)&(~(0xff<<8)))|(((b)&0xff)<<8))
-#define UINT_RGBA_CHANGE_A(x, a) (((x)&(~0xff))|((a)&0xff))
-#define UINT_TO_RGB(u,r,g,b) \
+#define GO_UINT_RGBA_R(x) (((guint)(x))>>24)
+#define GO_UINT_RGBA_G(x) ((((guint)(x))>>16)&0xff)
+#define GO_UINT_RGBA_B(x) ((((guint)(x))>>8)&0xff)
+#define GO_UINT_RGBA_A(x) (((guint)(x))&0xff)
+#define GO_UINT_RGBA_CHANGE_R(x, r) (((x)&(~(0xff<<24)))|(((r)&0xff)<<24))
+#define GO_UINT_RGBA_CHANGE_G(x, g) (((x)&(~(0xff<<16)))|(((g)&0xff)<<16))
+#define GO_UINT_RGBA_CHANGE_B(x, b) (((x)&(~(0xff<<8)))|(((b)&0xff)<<8))
+#define GO_UINT_RGBA_CHANGE_A(x, a) (((x)&(~0xff))|((a)&0xff))
+#define GO_UINT_TO_RGB(u,r,g,b) \
 { (*(r)) = ((u)>>16)&0xff; (*(g)) = ((u)>>8)&0xff; (*(b)) = (u)&0xff; }
-#define UINT_TO_RGBA(u,r,g,b,a) \
-{ UINT_TO_RGB(((u)>>8),r,g,b); (*(a)) = (u)&0xff; }
-#define MONO_INTERPOLATE(v1, v2, t) ((gint)go_rint((v2)*(t)+(v1)*(1-(t))))
-#define UINT_INTERPOLATE(c1, c2, t) \
-  RGBA_TO_UINT( MONO_INTERPOLATE(UINT_RGBA_R(c1), UINT_RGBA_R(c2), t), \
-		MONO_INTERPOLATE(UINT_RGBA_G(c1), UINT_RGBA_G(c2), t), \
-		MONO_INTERPOLATE(UINT_RGBA_B(c1), UINT_RGBA_B(c2), t), \
-		MONO_INTERPOLATE(UINT_RGBA_A(c1), UINT_RGBA_A(c2), t) )
+#define GO_UINT_TO_RGBA(u,r,g,b,a) \
+{GO_UINT_TO_RGB(((u)>>8),r,g,b); (*(a)) = (u)&0xff; }
+#define GO_MONO_INTERPOLATE(v1, v2, t) ((gint)go_rint((v2)*(t)+(v1)*(1-(t))))
+#define GO_UINT_INTERPOLATE(c1, c2, t) \
+  GO_RGBA_TO_UINT( GO_MONO_INTERPOLATE(GO_UINT_RGBA_R(c1), GO_UINT_RGBA_R(c2), t), \
+		GO_MONO_INTERPOLATE(GO_UINT_RGBA_G(c1), GO_UINT_RGBA_G(c2), t), \
+		GO_MONO_INTERPOLATE(GO_UINT_RGBA_B(c1), GO_UINT_RGBA_B(c2), t), \
+		GO_MONO_INTERPOLATE(GO_UINT_RGBA_A(c1), GO_UINT_RGBA_A(c2), t) )
 
-#define DOUBLE_RGBA_R(x) (double)UINT_RGBA_R(x)/255.0
-#define DOUBLE_RGBA_G(x) (double)UINT_RGBA_G(x)/255.0
-#define DOUBLE_RGBA_B(x) (double)UINT_RGBA_B(x)/255.0
-#define DOUBLE_RGBA_A(x) (double)UINT_RGBA_A(x)/255.0
+#define GO_DOUBLE_RGBA_R(x) (double)GO_UINT_RGBA_R(x)/255.0
+#define GO_DOUBLE_RGBA_G(x) (double)GO_UINT_RGBA_G(x)/255.0
+#define GO_DOUBLE_RGBA_B(x) (double)GO_UINT_RGBA_B(x)/255.0
+#define GO_DOUBLE_RGBA_A(x) (double)GO_UINT_RGBA_A(x)/255.0
 
-#define GO_COLOR_TO_CAIRO(x) DOUBLE_RGBA_R(x),DOUBLE_RGBA_G(x),DOUBLE_RGBA_B(x),DOUBLE_RGBA_A(x)
+#define GO_COLOR_TO_CAIRO(x) GO_DOUBLE_RGBA_R(x),GO_DOUBLE_RGBA_G(x),GO_DOUBLE_RGBA_B(x),GO_DOUBLE_RGBA_A(x)
 
 gboolean  go_color_from_str (char const *str, GOColor *res);
 gchar    *go_color_as_str   (GOColor color);
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 0d3f4fe..ef00203 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -538,14 +538,14 @@ static struct {
 	char const *name;
 	GOColor	go_color;
 } const format_colors[] = {
-	{ N_("Black"),	 RGBA_BLACK },
-	{ N_("Blue"),	 RGBA_BLUE },
-	{ N_("Cyan"),	 RGBA_CYAN },
-	{ N_("Green"),	 RGBA_GREEN },
-	{ N_("Magenta"), RGBA_VIOLET },
-	{ N_("Red"),	 RGBA_RED },
-	{ N_("White"),	 RGBA_WHITE },
-	{ N_("Yellow"),	 RGBA_YELLOW }
+	{ N_("Black"),	 GO_RGBA_BLACK },
+	{ N_("Blue"),	 GO_RGBA_BLUE },
+	{ N_("Cyan"),	 GO_RGBA_CYAN },
+	{ N_("Green"),	 GO_RGBA_GREEN },
+	{ N_("Magenta"), GO_RGBA_VIOLET },
+	{ N_("Red"),	 GO_RGBA_RED },
+	{ N_("White"),	 GO_RGBA_WHITE },
+	{ N_("Yellow"),	 GO_RGBA_YELLOW }
 };
 
 /*
@@ -5885,8 +5885,8 @@ go_format_output_date_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 				ODF_CLOSE_STRING;
 				gsf_xml_out_start_element (xout, STYLE "text-properties");
 				str = g_strdup_printf ("#%.2X%.2X%.2X", 
-						       UINT_RGBA_R (color), UINT_RGBA_G (color), 
-						       UINT_RGBA_B (color));
+						       GO_UINT_RGBA_R (color), GO_UINT_RGBA_G (color), 
+						       GO_UINT_RGBA_B (color));
 				gsf_xml_out_add_cstr_unchecked (xout, FOSTYLE "color", str);
 				g_free (str);
 				gsf_xml_out_end_element (xout); /*<style:text-properties>*/
@@ -6049,8 +6049,8 @@ go_format_output_fraction_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 				ODF_CLOSE_STRING;
 				gsf_xml_out_start_element (xout, STYLE "text-properties");
 				str = g_strdup_printf ("#%.2X%.2X%.2X", 
-						       UINT_RGBA_R (color), UINT_RGBA_G (color), 
-						       UINT_RGBA_B (color));
+						       GO_UINT_RGBA_R (color), GO_UINT_RGBA_G (color), 
+						       GO_UINT_RGBA_B (color));
 				gsf_xml_out_add_cstr_unchecked (xout, FOSTYLE "color", str);
 				g_free (str);
 				gsf_xml_out_end_element (xout); /*<style:text-properties>*/
@@ -6251,8 +6251,8 @@ go_format_output_number_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 				ODF_WRITE_NUMBER;
 				gsf_xml_out_start_element (xout, STYLE "text-properties");
 				str = g_strdup_printf ("#%.2X%.2X%.2X", 
-						       UINT_RGBA_R (color), UINT_RGBA_G (color), 
-						       UINT_RGBA_B (color));
+						       GO_UINT_RGBA_R (color), GO_UINT_RGBA_G (color), 
+						       GO_UINT_RGBA_B (color));
 				gsf_xml_out_add_cstr_unchecked (xout, FOSTYLE "color", str);
 				g_free (str);
 				gsf_xml_out_end_element (xout); /*<style:text-properties>*/
@@ -6498,8 +6498,8 @@ go_format_output_scientific_number_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 				ODF_CLOSE_STRING;
 				gsf_xml_out_start_element (xout, STYLE "text-properties");
 				str = g_strdup_printf ("#%.2X%.2X%.2X", 
-						       UINT_RGBA_R (color), UINT_RGBA_G (color), 
-						       UINT_RGBA_B (color));
+						       GO_UINT_RGBA_R (color), GO_UINT_RGBA_G (color), 
+						       GO_UINT_RGBA_B (color));
 				gsf_xml_out_add_cstr_unchecked (xout, FOSTYLE "color", str);
 				g_free (str);
 				gsf_xml_out_end_element (xout); /*<style:text-properties>*/
diff --git a/goffice/utils/go-image.c b/goffice/utils/go-image.c
index 60f3331..426f0c8 100644
--- a/goffice/utils/go-image.c
+++ b/goffice/utils/go-image.c
@@ -635,8 +635,8 @@ go_image_fill (GOImage *image, GOColor color)
 
 	dst = image->data;
 	if (image->target_cairo)
-		val = (UINT_RGBA_R (color) << 8) + (UINT_RGBA_G (color) << 16)
-			+ (UINT_RGBA_B (color) << 24) + UINT_RGBA_A (color);
+		val = (GO_UINT_RGBA_R (color) << 8) + (GO_UINT_RGBA_G (color) << 16)
+			+ (GO_UINT_RGBA_B (color) << 24) + GO_UINT_RGBA_A (color);
 	else
 		val = color;
 	for (i = 0; i < image->height; i++) {
diff --git a/goffice/utils/go-libxml-extras.c b/goffice/utils/go-libxml-extras.c
index 8b04b57..ee0ba0f 100644
--- a/goffice/utils/go-libxml-extras.c
+++ b/goffice/utils/go-libxml-extras.c
@@ -169,7 +169,7 @@ go_xml_node_get_gocolor (xmlNodePtr node, char const *name, GOColor *res)
 		r >>= 8;
 		g >>= 8;
 		b >>= 8;
-		*res = RGBA_TO_UINT (r,g,b,0xff);
+		*res = GO_RGBA_TO_UINT (r,g,b,0xff);
 		xmlFree (color);
 		return TRUE;
 	}
@@ -183,7 +183,7 @@ go_xml_node_set_gocolor (xmlNodePtr node, char const *name, GOColor val)
 	unsigned r, g, b;
 	char str[4 * sizeof (val)];
 
-	UINT_TO_RGB (val, &r, &g, &b);
+	GO_UINT_TO_RGB (val, &r, &g, &b);
 	sprintf (str, "%X:%X:%X", r, g, b);
 	go_xml_node_set_cstr (node, name, str);
 }
diff --git a/goffice/utils/go-marker.c b/goffice/utils/go-marker.c
index a56e355..316cc38 100644
--- a/goffice/utils/go-marker.c
+++ b/goffice/utils/go-marker.c
@@ -96,8 +96,8 @@ static void
 go_marker_init (GOMarker * marker)
 {
 	marker->shape		= GO_MARKER_NONE;
-	marker->outline_color	= RGBA_BLACK;
-	marker->fill_color	= RGBA_WHITE;
+	marker->outline_color	= GO_RGBA_BLACK;
+	marker->fill_color	= GO_RGBA_WHITE;
 	marker->size		= MARKER_DEFAULT_SIZE;
 }
 
diff --git a/goffice/utils/go-pattern.c b/goffice/utils/go-pattern.c
index 7e4b3f2..9199337 100644
--- a/goffice/utils/go-pattern.c
+++ b/goffice/utils/go-pattern.c
@@ -126,7 +126,7 @@ go_pattern_set_solid (GOPattern *pat, GOColor fore)
 {
 	g_return_if_fail (pat != NULL);
 	pat->pattern = GO_PATTERN_SOLID;
-	pat->fore = RGBA_BLACK;
+	pat->fore = GO_RGBA_BLACK;
 	pat->back = fore;
 }
 
@@ -270,10 +270,10 @@ go_pattern_create_cairo_pattern (GOPattern const *pattern, cairo_t *cr)
 			for (i = 0; i < 8; i++) {
 				for (j = 0; j < 8; j++) {
 					color = pattern_data[i] & (1 << j) ? pattern->fore : pattern->back;
-					iter[3] = UINT_RGBA_A (color);
-					MULT (iter[0], UINT_RGBA_B (color), iter[3], t);
-					MULT (iter[1], UINT_RGBA_G (color), iter[3], t);
-					MULT (iter[2], UINT_RGBA_R (color), iter[3], t);
+					iter[3] = GO_UINT_RGBA_A (color);
+					MULT (iter[0], GO_UINT_RGBA_B (color), iter[3], t);
+					MULT (iter[1], GO_UINT_RGBA_G (color), iter[3], t);
+					MULT (iter[2], GO_UINT_RGBA_R (color), iter[3], t);
 					iter += 4;
 				}
 				iter += stride - 32;
diff --git a/goffice/utils/go-style.c b/goffice/utils/go-style.c
index 964a2c3..80de8d1 100644
--- a/goffice/utils/go-style.c
+++ b/goffice/utils/go-style.c
@@ -749,7 +749,7 @@ marker_init (StylePrefState *state, gboolean enable, GOEditor *editor, GOCmdCont
 					       go_marker_get_fill_color (style->marker.mark));
 	else
 		go_marker_selector_set_colors (GO_SELECTOR (selector), 
-					       RGBA_BLUE, RGBA_BLUE);
+					       GO_RGBA_BLUE, GO_RGBA_BLUE);
 	w = go_gtk_builder_get_widget (gui, "marker_shape_label");
 	gtk_label_set_mnemonic_widget (GTK_LABEL (w), selector);
 	gtk_table_attach (GTK_TABLE (table), selector, 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
@@ -765,7 +765,7 @@ marker_init (StylePrefState *state, gboolean enable, GOEditor *editor, GOCmdCont
 			G_CALLBACK (cb_marker_fill_color_changed));
 	else {
 		w = create_go_combo_color (state,
-			RGBA_BLUE, RGBA_BLUE,
+			GO_RGBA_BLUE, GO_RGBA_BLUE,
 			gui, "pattern_background", "marker_fill_label",
 			G_CALLBACK (cb_marker_fill_color_changed));
 		gtk_widget_set_sensitive (w, FALSE);
@@ -780,7 +780,7 @@ marker_init (StylePrefState *state, gboolean enable, GOEditor *editor, GOCmdCont
 			G_CALLBACK (cb_marker_outline_color_changed));
 	else {
 		w = create_go_combo_color (state,
-			RGBA_BLUE, RGBA_BLUE,
+			GO_RGBA_BLUE, GO_RGBA_BLUE,
 			gui, "pattern_background", "marker_fill_label",
 			G_CALLBACK (cb_marker_outline_color_changed));
 		gtk_widget_set_sensitive (w, FALSE);
@@ -1176,9 +1176,9 @@ go_style_init (GOStyle *style)
 	style->line.miter_limit = 10.;
 	style->fill.type = GO_STYLE_FILL_NONE;
 	style->fill.gradient.brightness = -1.;
-	go_pattern_set_solid (&style->fill.pattern, RGBA_BLACK);
+	go_pattern_set_solid (&style->fill.pattern, GO_RGBA_BLACK);
 	style->font.font = go_font_new_by_index (0);
-	style->font.color = RGBA_BLACK;
+	style->font.color = GO_RGBA_BLACK;
 	style->text_layout.angle = 0.0;
 }
 
@@ -1885,7 +1885,7 @@ go_style_is_outline_visible (GOStyle const *style)
 	g_return_val_if_fail (GO_IS_STYLE (style), FALSE);
 
 	/* FIXME FIXME FIXME make this smarter */
-	return UINT_RGBA_A (style->line.color) > 0 && 
+	return GO_UINT_RGBA_A (style->line.color) > 0 && 
 		style->line.dash_type != GO_LINE_NONE;
 }
 
@@ -1895,7 +1895,7 @@ go_style_is_line_visible (GOStyle const *style)
 	g_return_val_if_fail (GO_IS_STYLE (style), FALSE);
 
 	/* FIXME FIXME FIXME TODO : make this smarter */
-	return UINT_RGBA_A (style->line.color) > 0 && 
+	return GO_UINT_RGBA_A (style->line.color) > 0 && 
 		style->line.dash_type != GO_LINE_NONE;
 }
 
@@ -1998,8 +1998,8 @@ go_style_set_fill_brightness (GOStyle *style, float brightness)
 
 	style->fill.gradient.brightness = brightness;
 	style->fill.pattern.fore = (brightness < 50.)
-		? UINT_INTERPOLATE(style->fill.pattern.back, RGBA_WHITE, 1. - brightness / 50.)
-		: UINT_INTERPOLATE(style->fill.pattern.back, RGBA_BLACK, brightness / 50. - 1.);
+		? GO_UINT_INTERPOLATE(style->fill.pattern.back, GO_RGBA_WHITE, 1. - brightness / 50.)
+		: GO_UINT_INTERPOLATE(style->fill.pattern.back, GO_RGBA_BLACK, brightness / 50. - 1.);
 }
 
 /**
diff --git a/plugins/plot_radar/gog-radar.c b/plugins/plot_radar/gog-radar.c
index a4ed4ec..70358a9 100644
--- a/plugins/plot_radar/gog-radar.c
+++ b/plugins/plot_radar/gog-radar.c
@@ -643,16 +643,16 @@ get_map_color (double z, gboolean hide_outliers)
 	if (hide_outliers && (z < 0. || z > 6.))
 		return 0;
 	if (z <= 0.)
-		return RGBA_BLUE;
+		return GO_RGBA_BLUE;
 	if (z <= 1.)
-		return RGBA_BLUE + ((int) (z * 255.) << 16);
+		return GO_RGBA_BLUE + ((int) (z * 255.) << 16);
 	if (z <= 2.)
-		return RGBA_GREEN + ((int) ((2. - z) * 255) << 8);
+		return GO_RGBA_GREEN + ((int) ((2. - z) * 255) << 8);
 	if (z <= 4.)
-		return RGBA_GREEN + ((int) ((z / 2. - 1.) * 255) << 24);
+		return GO_RGBA_GREEN + ((int) ((z / 2. - 1.) * 255) << 24);
 	if (z <= 6.)
-		return RGBA_RED + ((int) ((3. - z / 2.) * 255) << 16);
-	return RGBA_RED;
+		return GO_RGBA_RED + ((int) ((3. - z / 2.) * 255) << 16);
+	return GO_RGBA_RED;
 }
 
 static void
diff --git a/plugins/plot_surface/gog-contour.c b/plugins/plot_surface/gog-contour.c
index b3098cc..4994800 100644
--- a/plugins/plot_surface/gog-contour.c
+++ b/plugins/plot_surface/gog-contour.c
@@ -156,7 +156,7 @@ gog_contour_plot_foreach_elem  (GogPlot *plot, gboolean only_visible,
 	/* build the colors table */
 	color = g_new0 (GOColor, (j > 0)? j: 1);
 	if (j < 2)
-		color[0] = RGBA_WHITE;
+		color[0] = GO_RGBA_WHITE;
 	else for (i = 0; i < j; i++) {
 		gog_theme_fillin_style (theme, style, GOG_OBJECT (plot->series->data), i, FALSE);
 		color[i] = style->fill.pattern.back;
@@ -332,7 +332,7 @@ gog_contour_view_render (GogView *view, GogViewAllocation const *bbox)
 	/* build the colors table */
 	color = g_new0 (GOColor, max);
 	if (max < 2)
-		color[0] = RGBA_WHITE;
+		color[0] = GO_RGBA_WHITE;
 	else for (i = 0; i < (unsigned) max; i++) {
 		gog_theme_fillin_style (theme, style, GOG_OBJECT (series), i, FALSE);
 		color[i] = style->fill.pattern.back;
diff --git a/plugins/plot_xy/gog-xy.c b/plugins/plot_xy/gog-xy.c
index 96a42ec..897ad54 100644
--- a/plugins/plot_xy/gog-xy.c
+++ b/plugins/plot_xy/gog-xy.c
@@ -845,16 +845,16 @@ get_map_color (double z, gboolean hide_outliers)
 	if (hide_outliers && (z < 0. || z > 6.))
 		return 0;
 	if (z <= 0.)
-		return RGBA_BLUE;
+		return GO_RGBA_BLUE;
 	if (z <= 1.)
-		return RGBA_BLUE + ((int) (z * 255.) << 16);
+		return GO_RGBA_BLUE + ((int) (z * 255.) << 16);
 	if (z <= 2.)
-		return RGBA_GREEN + ((int) ((2. - z) * 255) << 8);
+		return GO_RGBA_GREEN + ((int) ((2. - z) * 255) << 8);
 	if (z <= 4.)
-		return RGBA_GREEN + ((int) ((z / 2. - 1.) * 255) << 24);
+		return GO_RGBA_GREEN + ((int) ((z / 2. - 1.) * 255) << 24);
 	if (z <= 6.)
-		return RGBA_RED + ((int) ((3. - z / 2.) * 255) << 16);
-	return RGBA_RED;
+		return GO_RGBA_RED + ((int) ((3. - z / 2.) * 255) << 16);
+	return GO_RGBA_RED;
 }
 
 typedef struct {
@@ -1123,7 +1123,7 @@ gog_xy_view_render (GogView *view, GogViewAllocation const *bbox)
 				neg_style = go_style_dup (GOG_STYLED_OBJECT (series)->style);
 				neg_style->fill.type = GO_STYLE_FILL_PATTERN;
 				neg_style->fill.pattern.pattern = GO_PATTERN_SOLID;
-				neg_style->fill.pattern.back = RGBA_WHITE;
+				neg_style->fill.pattern.back = GO_RGBA_WHITE;
 			}
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]