diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-31 04:32:08 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-31 07:09:19 +0800 |
commit | ec73f5522ff2d6f8c476f02a9daaff32ef1db069 (patch) | |
tree | 14729b8cbf271405e732b84ca2ca944ceb0815e5 /widgets/misc | |
parent | c7e371bc5bc8d7898236ac36e1ea0bc08518b791 (diff) | |
download | gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.gz gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.bz2 gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.lz gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.xz gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.tar.zst gsoc2013-evolution-ec73f5522ff2d6f8c476f02a9daaff32ef1db069.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/e-calendar-item.c | 20 | ||||
-rw-r--r-- | widgets/misc/e-canvas-background.c | 26 | ||||
-rw-r--r-- | widgets/misc/e-canvas-background.h | 8 | ||||
-rw-r--r-- | widgets/misc/e-canvas-utils.c | 22 | ||||
-rw-r--r-- | widgets/misc/e-canvas-utils.h | 28 | ||||
-rw-r--r-- | widgets/misc/e-canvas-vbox.c | 20 | ||||
-rw-r--r-- | widgets/misc/e-canvas-vbox.h | 14 | ||||
-rw-r--r-- | widgets/misc/e-canvas.c | 6 | ||||
-rw-r--r-- | widgets/misc/e-map.c | 52 | ||||
-rw-r--r-- | widgets/misc/e-map.h | 18 |
10 files changed, 107 insertions, 107 deletions
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 9829d81279..84adf6185f 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -57,7 +57,7 @@ static void e_calendar_item_realize (GnomeCanvasItem *item); static void e_calendar_item_unrealize (GnomeCanvasItem *item); static void e_calendar_item_unmap (GnomeCanvasItem *item); static void e_calendar_item_update (GnomeCanvasItem *item, - double *affine, + gdouble *affine, ArtSVP *clip_path, gint flags); static void e_calendar_item_draw (GnomeCanvasItem *item, @@ -85,9 +85,9 @@ static void e_calendar_item_draw_day_numbers (ECalendarItem *calitem, gint start_weekday, gint cells_x, gint cells_y); -static double e_calendar_item_point (GnomeCanvasItem *item, - double x, - double y, +static gdouble e_calendar_item_point (GnomeCanvasItem *item, + gdouble x, + gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item); @@ -100,8 +100,8 @@ static gint e_calendar_item_key_press_event (ECalendarItem *item, GdkEvent *event); static gint e_calendar_item_event (GnomeCanvasItem *item, GdkEvent *event); -static void e_calendar_item_bounds (GnomeCanvasItem *item, double *x1, double *y1, - double *x2, double *y2); +static void e_calendar_item_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, + gdouble *x2, gdouble *y2); static gboolean e_calendar_item_button_press (ECalendarItem *calitem, GdkEvent *event); @@ -880,7 +880,7 @@ e_calendar_item_unmap (GnomeCanvasItem *item) static void e_calendar_item_update (GnomeCanvasItem *item, - double *affine, + gdouble *affine, ArtSVP *clip_path, gint flags) { @@ -1749,7 +1749,7 @@ e_calendar_item_get_week_number (ECalendarItem *calitem, Since we are the only item we just return ourself and 0 for the distance. This is needed so that we get button/motion events. */ static double -e_calendar_item_point (GnomeCanvasItem *item, double x, double y, +e_calendar_item_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { @@ -1912,8 +1912,8 @@ e_calendar_item_event (GnomeCanvasItem *item, GdkEvent *event) } static void -e_calendar_item_bounds (GnomeCanvasItem *item, double *x1, double *y1, - double *x2, double *y2) +e_calendar_item_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, + gdouble *x2, gdouble *y2) { ECalendarItem *calitem; diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c index f9879c2614..ab70082e95 100644 --- a/widgets/misc/e-canvas-background.c +++ b/widgets/misc/e-canvas-background.c @@ -50,10 +50,10 @@ struct _ECanvasBackgroundPrivate { GdkColor color; /* Fill color */ GdkBitmap *stipple; /* Stipple for fill */ GdkGC *gc; /* GC for filling */ - double x1; - double x2; - double y1; - double y2; + gdouble x1; + gdouble x2; + gdouble y1; + gdouble y2; guint needs_redraw : 1; }; @@ -88,9 +88,9 @@ get_color(ECanvasBackground *ecb) } static void -ecb_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) +ecb_bounds (GnomeCanvasItem *item, gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2) { - double i2c [6]; + gdouble i2c [6]; ArtPoint c1, c2, i1, i2; ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); @@ -106,16 +106,16 @@ ecb_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y art_affine_point (&c2, &i2, i2c); if (ecb->priv->x1 < 0) - c1.x = -(double)UINT_MAX; + c1.x = -(gdouble)UINT_MAX; if (ecb->priv->y1 < 0) - c1.y = -(double)UINT_MAX; + c1.y = -(gdouble)UINT_MAX; if (ecb->priv->x2 < 0) - c2.x = (double)UINT_MAX; + c2.x = (gdouble)UINT_MAX; if (ecb->priv->y2 < 0) - c2.y = (double)UINT_MAX; + c2.y = (gdouble)UINT_MAX; *x1 = c1.x; *y1 = c1.y; @@ -127,7 +127,7 @@ ecb_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y * GnomeCanvasItem::update method */ static void -ecb_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, gint flags) +ecb_update (GnomeCanvasItem *item, gdouble *affine, ArtSVP *clip_path, gint flags) { ArtPoint o1, o2; ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); @@ -377,7 +377,7 @@ ecb_draw (GnomeCanvasItem *item, { ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); gint x1, x2, y1, y2; - double i2c [6]; + gdouble i2c [6]; ArtPoint upper_left, lower_right, ecb_base_point; /* @@ -410,7 +410,7 @@ ecb_draw (GnomeCanvasItem *item, } static double -ecb_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, +ecb_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); diff --git a/widgets/misc/e-canvas-background.h b/widgets/misc/e-canvas-background.h index 7e3ac19a13..e1e24d0663 100644 --- a/widgets/misc/e-canvas-background.h +++ b/widgets/misc/e-canvas-background.h @@ -36,10 +36,10 @@ G_BEGIN_DECLS * or NULL pointer for no color (transparent) * fill_color_gdk GdkColor* RW Allocated GdkColor for fill * fill_stipple GdkBitmap* RW Stipple pattern for fill - * x1 double RW Coordinates for edges of background rectangle - * x2 double RW Default is all of them = -1. - * y1 double RW Which means that the entire space is shown. - * y2 double RW If you need the rectangle to have negative coordinates, use an affine. + * x1 gdouble RW Coordinates for edges of background rectangle + * x2 gdouble RW Default is all of them = -1. + * y1 gdouble RW Which means that the entire space is shown. + * y2 gdouble RW If you need the rectangle to have negative coordinates, use an affine. */ #define E_CANVAS_BACKGROUND_TYPE (e_canvas_background_get_type ()) diff --git a/widgets/misc/e-canvas-utils.c b/widgets/misc/e-canvas-utils.c index 9e097b02bd..c4163feea1 100644 --- a/widgets/misc/e-canvas-utils.c +++ b/widgets/misc/e-canvas-utils.c @@ -24,9 +24,9 @@ #include "e-canvas-utils.h" void -e_canvas_item_move_absolute (GnomeCanvasItem *item, double dx, double dy) +e_canvas_item_move_absolute (GnomeCanvasItem *item, gdouble dx, gdouble dy) { - double translate[6]; + gdouble translate[6]; g_return_if_fail (item != NULL); g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); @@ -64,7 +64,7 @@ compute_offset(gint top, gint bottom, gint page_top, gint page_bottom) } static void -e_canvas_show_area (GnomeCanvas *canvas, double x1, double y1, double x2, double y2) +e_canvas_show_area (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GtkAdjustment *h, *v; gint dx = 0, dy = 0; @@ -96,7 +96,7 @@ e_canvas_show_area (GnomeCanvas *canvas, double x1, double y1, double x2, double } void -e_canvas_item_show_area (GnomeCanvasItem *item, double x1, double y1, double x2, double y2) +e_canvas_item_show_area (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { g_return_if_fail (item != NULL); g_return_if_fail (GNOME_IS_CANVAS_ITEM (item)); @@ -108,7 +108,7 @@ e_canvas_item_show_area (GnomeCanvasItem *item, double x1, double y1, double x2, } static gboolean -e_canvas_area_shown (GnomeCanvas *canvas, double x1, double y1, double x2, double y2) +e_canvas_area_shown (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { GtkAdjustment *h, *v; gint dx = 0, dy = 0; @@ -141,7 +141,7 @@ e_canvas_area_shown (GnomeCanvas *canvas, double x1, double y1, double x2, doubl } gboolean -e_canvas_item_area_shown (GnomeCanvasItem *item, double x1, double y1, double x2, double y2) +e_canvas_item_area_shown (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble x2, gdouble y2) { g_return_val_if_fail (item != NULL, FALSE); g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), FALSE); @@ -153,10 +153,10 @@ e_canvas_item_area_shown (GnomeCanvasItem *item, double x1, double y1, double x2 } typedef struct { - double x1; - double y1; - double x2; - double y2; + gdouble x1; + gdouble y1; + gdouble x2; + gdouble y2; GnomeCanvas *canvas; } DoubsAndCanvas; @@ -172,7 +172,7 @@ show_area_timeout (gpointer data) } void -e_canvas_item_show_area_delayed (GnomeCanvasItem *item, double x1, double y1, double x2, double y2, gint delay) +e_canvas_item_show_area_delayed (GnomeCanvasItem *item, gdouble x1, gdouble y1, gdouble x2, gdouble y2, gint delay) { DoubsAndCanvas *dac; diff --git a/widgets/misc/e-canvas-utils.h b/widgets/misc/e-canvas-utils.h index cda34e99b5..8f7600e72d 100644 --- a/widgets/misc/e-canvas-utils.h +++ b/widgets/misc/e-canvas-utils.h @@ -28,27 +28,27 @@ G_BEGIN_DECLS void e_canvas_item_move_absolute (GnomeCanvasItem *item, - double dx, - double dy); + gdouble dx, + gdouble dy); void e_canvas_item_show_area (GnomeCanvasItem *item, - double x1, - double y1, - double x2, - double y2); + gdouble x1, + gdouble y1, + gdouble x2, + gdouble y2); void e_canvas_item_show_area_delayed (GnomeCanvasItem *item, - double x1, - double y1, - double x2, - double y2, + gdouble x1, + gdouble y1, + gdouble x2, + gdouble y2, gint delay); /* Returns TRUE if the area is already shown on the screen (including spacing.) This is equivelent to returning FALSE iff show_area would do anything. */ gboolean e_canvas_item_area_shown (GnomeCanvasItem *item, - double x1, - double y1, - double x2, - double y2); + gdouble x1, + gdouble y1, + gdouble x2, + gdouble y2); G_END_DECLS diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c index af159b2000..e9d78f220c 100644 --- a/widgets/misc/e-canvas-vbox.c +++ b/widgets/misc/e-canvas-vbox.c @@ -256,9 +256,9 @@ e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item) e_canvas_vbox->items = g_list_append(e_canvas_vbox->items, item); g_object_weak_ref (G_OBJECT (item), e_canvas_vbox_remove_item, e_canvas_vbox); - if ( GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED ) { + if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) { gnome_canvas_item_set(item, - "width", (double) e_canvas_vbox->minimum_width, + "width", (gdouble) e_canvas_vbox->minimum_width, NULL); e_canvas_item_request_reflow(item); } @@ -270,9 +270,9 @@ e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *i e_canvas_vbox->items = g_list_prepend(e_canvas_vbox->items, item); g_object_weak_ref (G_OBJECT (item), e_canvas_vbox_remove_item, e_canvas_vbox); - if ( GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED ) { + if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) { gnome_canvas_item_set(item, - "width", (double) e_canvas_vbox->minimum_width, + "width", (gdouble) e_canvas_vbox->minimum_width, NULL); e_canvas_item_request_reflow(item); } @@ -288,7 +288,7 @@ e_canvas_vbox_resize_children (GnomeCanvasItem *item) for ( list = e_canvas_vbox->items; list; list = list->next ) { GnomeCanvasItem *child = GNOME_CANVAS_ITEM(list->data); gnome_canvas_item_set(child, - "width", (double) e_canvas_vbox->minimum_width, + "width", (gdouble) e_canvas_vbox->minimum_width, NULL); } } @@ -297,7 +297,7 @@ static void e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) { ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX(item); - if ( GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED ) { + if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) { gdouble old_height; gdouble running_height; @@ -322,8 +322,8 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) "width", &item_width, NULL); e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), - (double) 0, - (double) running_height); + (gdouble) 0, + (gdouble) running_height); running_height += item_height; if (max_width < item_width) max_width = item_width; @@ -338,8 +338,8 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags ) NULL); e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), - (double) 0, - (double) running_height); + (gdouble) 0, + (gdouble) running_height); running_height += item_height; if (max_width < item_width) diff --git a/widgets/misc/e-canvas-vbox.h b/widgets/misc/e-canvas-vbox.h index b41b8f80ec..9fb5b8ba34 100644 --- a/widgets/misc/e-canvas-vbox.h +++ b/widgets/misc/e-canvas-vbox.h @@ -34,9 +34,9 @@ G_BEGIN_DECLS * * name type read/write description * -------------------------------------------------------------------------------- - * width double RW width of the CanvasVbox - * height double R height of the CanvasVbox - * spacing double RW Spacing between items. + * width gdouble RW width of the CanvasVbox + * height gdouble R height of the CanvasVbox + * spacing gdouble RW Spacing between items. */ #define E_CANVAS_VBOX_TYPE (e_canvas_vbox_get_type ()) @@ -55,10 +55,10 @@ struct _ECanvasVbox /* item specific fields */ GList *items; /* Of type GnomeCanvasItem */ - double width; - double minimum_width; - double height; - double spacing; + gdouble width; + gdouble minimum_width; + gdouble height; + gdouble spacing; }; struct _ECanvasVboxClass diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c index 314837edf1..6d12cae087 100644 --- a/widgets/misc/e-canvas.c +++ b/widgets/misc/e-canvas.c @@ -279,11 +279,11 @@ e_canvas_key (GtkWidget *widget, GdkEventKey *event) #define HACKISH_AFFINE static double -gnome_canvas_item_invoke_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, +gnome_canvas_item_invoke_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy, GnomeCanvasItem **actual_item) { #ifdef HACKISH_AFFINE - double i2w[6], w2c[6], i2c[6], c2i[6]; + gdouble i2w[6], w2c[6], i2c[6], c2i[6]; ArtPoint c, i; #endif @@ -312,7 +312,7 @@ static gint pick_current_item (GnomeCanvas *canvas, GdkEvent *event) { gint button_down; - double x, y; + gdouble x, y; gint cx, cy; gint retval; diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index e6a223a121..f4968432a0 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -71,7 +71,7 @@ struct _EMapPrivate { /* Realtime zoom data */ EMapZoomState zoom_state; - double zoom_target_long, zoom_target_lat; + gdouble zoom_target_long, zoom_target_lat; /* Dots */ GPtrArray *points; @@ -633,7 +633,7 @@ e_map_new (void) * Latitude E <-90, 90] */ void -e_map_window_to_world (EMap *map, double win_x, double win_y, double *world_longitude, double *world_latitude) +e_map_window_to_world (EMap *map, gdouble win_x, gdouble win_y, gdouble *world_longitude, gdouble *world_latitude) { EMapPrivate *priv; gint width, height; @@ -646,14 +646,14 @@ e_map_window_to_world (EMap *map, double win_x, double win_y, double *world_long width = gdk_pixbuf_get_width (priv->map_render_pixbuf); height = gdk_pixbuf_get_height (priv->map_render_pixbuf); - *world_longitude = (win_x + priv->xofs - (double) width / 2.0) / - ((double) width / 2.0) * 180.0; - *world_latitude = ((double) height / 2.0 - win_y - priv->yofs) / - ((double) height / 2.0) * 90.0; + *world_longitude = (win_x + priv->xofs - (gdouble) width / 2.0) / + ((gdouble) width / 2.0) * 180.0; + *world_latitude = ((gdouble) height / 2.0 - win_y - priv->yofs) / + ((gdouble) height / 2.0) * 90.0; } void -e_map_world_to_window (EMap *map, double world_longitude, double world_latitude, double *win_x, double *win_y) +e_map_world_to_window (EMap *map, gdouble world_longitude, gdouble world_latitude, gdouble *win_x, gdouble *win_y) { EMapPrivate *priv; gint width, height; @@ -689,7 +689,7 @@ e_map_get_magnification (EMap *map) } void -e_map_zoom_to_location (EMap *map, double longitude, double latitude) +e_map_zoom_to_location (EMap *map, gdouble longitude, gdouble latitude) { EMapPrivate *priv; @@ -753,7 +753,7 @@ e_map_thaw (EMap *map) /* --- Point manipulation --- */ EMapPoint * -e_map_add_point (EMap *map, gchar *name, double longitude, double latitude, guint32 color_rgba) +e_map_add_point (EMap *map, gchar *name, gdouble longitude, gdouble latitude, guint32 color_rgba) { EMapPrivate *priv; EMapPoint *point; @@ -798,7 +798,7 @@ e_map_remove_point (EMap *map, EMapPoint *point) } void -e_map_point_get_location (EMapPoint *point, double *longitude, double *latitude) +e_map_point_get_location (EMapPoint *point, gdouble *longitude, gdouble *latitude) { *longitude = point->longitude; *latitude = point->latitude; @@ -847,7 +847,7 @@ e_map_point_is_in_view (EMap *map, EMapPoint *point) { EMapPrivate *priv; GtkAllocation allocation; - double x, y; + gdouble x, y; priv = map->priv; if (!priv->map_render_pixbuf) return FALSE; @@ -863,12 +863,12 @@ e_map_point_is_in_view (EMap *map, EMapPoint *point) } EMapPoint * -e_map_get_closest_point (EMap *map, double longitude, double latitude, gboolean in_view) +e_map_get_closest_point (EMap *map, gdouble longitude, gdouble latitude, gboolean in_view) { EMapPrivate *priv; EMapPoint *point_chosen = NULL, *point; - double min_dist = 0.0, dist; - double dx, dy; + gdouble min_dist = 0.0, dist; + gdouble dx, dy; gint i; priv = map->priv; @@ -947,7 +947,7 @@ update_render_pixbuf (EMap *map, EMapPoint *point; GtkAllocation allocation; gint width, height, orig_width, orig_height; - double zoom; + gdouble zoom; gint i; if (!GTK_WIDGET_REALIZED (map)) @@ -965,10 +965,10 @@ update_render_pixbuf (EMap *map, /* Compute scaled width and height based on the extreme dimension */ - if ((double) width / orig_width > (double) height / orig_height) - zoom = (double) width / (double) orig_width; + if ((gdouble) width / orig_width > (gdouble) height / orig_height) + zoom = (gdouble) width / (gdouble) orig_width; else - zoom = (double) height / (double) orig_height; + zoom = (gdouble) height / (gdouble) orig_height; if (priv->zoom_state == E_MAP_ZOOMED_IN) zoom *= 2.0; @@ -1097,7 +1097,7 @@ update_render_point (EMap *map, EMapPoint *point) { EMapPrivate *priv; GdkPixbuf *pb; - double px, py; + gdouble px, py; priv = map->priv; pb = priv->map_render_pixbuf; @@ -1129,7 +1129,7 @@ static void repaint_point (EMap *map, EMapPoint *point) { GdkRectangle area; - double px, py; + gdouble px, py; if (!e_map_point_is_in_view (map, point)) return; @@ -1434,14 +1434,14 @@ blowup_window_area (GdkWindow *window, gint area_x, gint area_y, gint target_x, if (area_width > area_height) { strong_axis = AXIS_X; - axis_factor = (double) area_height / (double) area_width; + axis_factor = (gdouble) area_height / (gdouble) area_width; zoom_chunk = MAX (1, area_width / 250); i = (area_width * (zoom_factor - 1.0)) / zoom_chunk; } else { strong_axis = AXIS_Y; - axis_factor = (double) area_width / (double) area_height; + axis_factor = (gdouble) area_width / (gdouble) area_height; zoom_chunk = MAX (1, area_height / 250); i = (area_height * (zoom_factor - 1.0)) / zoom_chunk; } @@ -1537,7 +1537,7 @@ zoom_in_smooth (EMap *map) EMapPrivate *priv; GdkWindow *window; gint width, height; - double x, y; + gdouble x, y; g_return_if_fail (map); g_return_if_fail (GTK_WIDGET_REALIZED (GTK_WIDGET (map))); @@ -1594,7 +1594,7 @@ zoom_in (EMap *map) GtkAllocation allocation; GdkRectangle area; EMapPrivate *priv; - double x, y; + gdouble x, y; priv = map->priv; @@ -1628,8 +1628,8 @@ zoom_out (EMap *map) GtkAllocation allocation; GdkRectangle area; EMapPrivate *priv; - double longitude, latitude; - double x, y; + gdouble longitude, latitude; + gdouble x, y; priv = map->priv; diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h index b3d7997401..4730f7662b 100644 --- a/widgets/misc/e-map.h +++ b/widgets/misc/e-map.h @@ -59,7 +59,7 @@ struct _EMapClass { struct _EMapPoint { gchar *name; /* Can be NULL */ - double longitude, latitude; + gdouble longitude, latitude; guint32 rgba; gpointer user_data; }; @@ -80,15 +80,15 @@ void e_map_thaw (EMap *map); /* Translates window-relative coords to lat/long */ void e_map_window_to_world (EMap *map, - double win_x, double win_y, - double *world_longitude, double *world_latitude); + gdouble win_x, gdouble win_y, + gdouble *world_longitude, gdouble *world_latitude); /* Translates lat/long to window-relative coordinates. Note that the * returned coordinates can be negative or greater than the current size * of the allocation area */ void e_map_world_to_window (EMap *map, - double world_longitude, double world_latitude, - double *win_x, double *win_y); + gdouble world_longitude, gdouble world_latitude, + gdouble *win_x, gdouble *win_y); /* --- Zoom --- */ @@ -101,7 +101,7 @@ void e_map_set_smooth_zoom (EMap *map, gboolean state); gboolean e_map_get_smooth_zoom (EMap *map); /* NB: Function definition will change shortly */ -void e_map_zoom_to_location (EMap *map, double longitude, double latitude); +void e_map_zoom_to_location (EMap *map, gdouble longitude, gdouble latitude); /* Zoom to mag factor 1.0 */ void e_map_zoom_out (EMap *map); @@ -109,13 +109,13 @@ void e_map_zoom_out (EMap *map); /* --- Points --- */ EMapPoint *e_map_add_point (EMap *map, gchar *name, - double longitude, double latitude, + gdouble longitude, gdouble latitude, guint32 color_rgba); void e_map_remove_point (EMap *map, EMapPoint *point); void e_map_point_get_location (EMapPoint *point, - double *longitude, double *latitude); + gdouble *longitude, gdouble *latitude); gchar *e_map_point_get_name (EMapPoint *point); @@ -129,7 +129,7 @@ gpointer e_map_point_get_data (EMapPoint *point); gboolean e_map_point_is_in_view (EMap *map, EMapPoint *point); -EMapPoint *e_map_get_closest_point (EMap *map, double longitude, double latitude, +EMapPoint *e_map_get_closest_point (EMap *map, gdouble longitude, gdouble latitude, gboolean in_view); #endif |