[goffice] compilation: use double, not floats.



commit b18ca37f39cbe123dd027ac4d0ca4c3b928969e5
Author: Morten Welinder <terra gnome org>
Date:   Wed Nov 18 16:14:50 2009 -0500

    compilation: use double, not floats.

 goffice/app/go-cmd-context-impl.h |    4 ++--
 goffice/app/go-cmd-context.c      |    2 +-
 goffice/app/io-context-priv.h     |    4 ++--
 goffice/graph/gog-renderer.c      |    2 +-
 goffice/utils/go-style.c          |    2 +-
 goffice/utils/go-style.h          |   22 ++++++++++++----------
 6 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/goffice/app/go-cmd-context-impl.h b/goffice/app/go-cmd-context-impl.h
index 683d28e..85e09b4 100644
--- a/goffice/app/go-cmd-context-impl.h
+++ b/goffice/app/go-cmd-context-impl.h
@@ -17,7 +17,7 @@ typedef struct {
 		void (*error_info)  	(GOCmdContext *gcc, GOErrorInfo *err);
 	} error;
 
-	void    (*progress_set)		(GOCmdContext *gcc, float val);
+	void    (*progress_set)		(GOCmdContext *gcc, double val);
 	void    (*progress_message_set)	(GOCmdContext *gcc, gchar const *msg);
 } GOCmdContextClass;
 
@@ -25,7 +25,7 @@ typedef struct {
 #define GO_IS_CMD_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GO_TYPE_CMD_CONTEXT))
 
 /* protected, these do not really belong here, they are associated with io-context */
-void  go_cmd_context_progress_set	  (GOCmdContext *gcc, float f);
+void  go_cmd_context_progress_set	  (GOCmdContext *gcc, double f);
 void  go_cmd_context_progress_message_set (GOCmdContext *gcc, char const *msg);
 
 G_END_DECLS
diff --git a/goffice/app/go-cmd-context.c b/goffice/app/go-cmd-context.c
index 102b67f..72c538c 100644
--- a/goffice/app/go-cmd-context.c
+++ b/goffice/app/go-cmd-context.c
@@ -101,7 +101,7 @@ go_error_invalid (void)
 }
 
 void
-go_cmd_context_progress_set (GOCmdContext *context, gfloat f)
+go_cmd_context_progress_set (GOCmdContext *context, double f)
 {
 	g_return_if_fail (GO_IS_CMD_CONTEXT (context));
 
diff --git a/goffice/app/io-context-priv.h b/goffice/app/io-context-priv.h
index 452eda6..c38ec36 100644
--- a/goffice/app/io-context-priv.h
+++ b/goffice/app/io-context-priv.h
@@ -40,7 +40,7 @@ typedef struct {
 } GOProgressHelper;
 
 typedef struct {
-	gfloat min, max;
+	double min, max;
 } GOProgressRange;
 
 struct _GOIOContext {
@@ -52,7 +52,7 @@ struct _GOIOContext {
 	gboolean	 warning_occurred;
 
 	GList	*progress_ranges;
-	gfloat	 progress_min, progress_max;
+	double	 progress_min, progress_max;
 	gdouble  last_progress;
 	gdouble  last_time;
 	GOProgressHelper helper;
diff --git a/goffice/graph/gog-renderer.c b/goffice/graph/gog-renderer.c
index f8033af..a12ca32 100644
--- a/goffice/graph/gog-renderer.c
+++ b/goffice/graph/gog-renderer.c
@@ -70,7 +70,7 @@ struct _GogRenderer {
 
 	GogGraph *model;
 	GogView	 *view;
-	float	  scale, scale_x, scale_y;
+	double	  scale, scale_x, scale_y;
 
 	GClosure *font_watcher;
 	gboolean  needs_update;
diff --git a/goffice/utils/go-style.c b/goffice/utils/go-style.c
index 72478ac..06d80cb 100644
--- a/goffice/utils/go-style.c
+++ b/goffice/utils/go-style.c
@@ -2006,7 +2006,7 @@ go_style_set_font (GOStyle *style, GOFont const *font)
 }
 
 void
-go_style_set_fill_brightness (GOStyle *style, float brightness)
+go_style_set_fill_brightness (GOStyle *style, double brightness)
 {
 	double limit;
 	g_return_if_fail (GO_IS_STYLE (style));
diff --git a/goffice/utils/go-style.h b/goffice/utils/go-style.h
index c141c9e..ae84d07 100644
--- a/goffice/utils/go-style.h
+++ b/goffice/utils/go-style.h
@@ -61,7 +61,7 @@ typedef struct {
 	/* <0 == no outline,
 	 * =0 == hairline : unscaled, minimum useful (can be bigger than visible) size.
 	 * >0 in pts */
-	float	 	 width;
+	double	 	 width;
 	GOLineDashType 	 dash_type;
 	gboolean	 auto_dash;
 	GOColor	 	 color; /* color is used as background for compatibility
@@ -99,7 +99,7 @@ struct _GOStyle {
 		GOPattern pattern;
 		struct {
 			GOGradientDirection dir;
-			float   brightness; /* < 0 => 2 color */
+			double brightness; /* < 0 => 2 color */
 		} gradient;
 		struct {
 			GOImageType	 type;
@@ -118,18 +118,19 @@ struct _GOStyle {
 	} text_layout;
 };
 
-GOStyle  *go_style_new		(void);
-GOStyle  *go_style_dup		(GOStyle const *style);
+GOStyle  *go_style_new			(void);
+GOStyle  *go_style_dup			(GOStyle const *style);
 void	   go_style_assign		(GOStyle *dst, GOStyle const *src);
-void	   go_style_apply_theme	(GOStyle *dst, GOStyle const *src, GOStyleFlag fields);
+void	   go_style_apply_theme		(GOStyle *dst, GOStyle const *src,
+					 GOStyleFlag fields);
 
 GOMarker const *go_style_get_marker 	(GOStyle *style);
 void            go_style_set_marker 	(GOStyle *style, GOMarker *marker);
 
-void	   go_style_set_font_desc		(GOStyle *style,
-						 PangoFontDescription *desc);
-void	   go_style_set_font			(GOStyle *style, GOFont const *font);
-void	   go_style_set_fill_brightness	(GOStyle *style, float brightness);
+void	   go_style_set_font_desc	(GOStyle *style,
+					 PangoFontDescription *desc);
+void	   go_style_set_font		(GOStyle *style, GOFont const *font);
+void	   go_style_set_fill_brightness	(GOStyle *style, double brightness);
 void	   go_style_set_text_angle     	(GOStyle *style, double angle);
 
 gboolean   go_style_is_different_size	(GOStyle const *a, GOStyle const *b);
@@ -150,7 +151,8 @@ gpointer   go_style_get_editor	     	(GOStyle *style,
 					 GOCmdContext *cc,
 					 GObject *object_with_style);
 
-cairo_pattern_t *go_style_create_cairo_pattern (GOStyle const *style, cairo_t *cr);
+cairo_pattern_t *go_style_create_cairo_pattern (GOStyle const *style,
+						cairo_t *cr);
 gboolean go_style_set_cairo_line (GOStyle const *style, cairo_t *cr);
 
 G_END_DECLS



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