From: Simon Wenner Date: Sat, 11 Apr 2009 23:53:44 +0000 (-0400) Subject: Partly fix Bug 577591: Adopt the new coding style for champlain-map.h X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b28b1a6e8b9d7cce65e2e7f00ac10712707549b;p=libchamplain Partly fix Bug 577591: Adopt the new coding style for champlain-map.h and champlain-zoom-level.c --- diff --git a/champlain/champlain-map.c b/champlain/champlain-map.c index a239ff4..a69feda 100644 --- a/champlain/champlain-map.c +++ b/champlain/champlain-map.c @@ -36,7 +36,9 @@ map_new (void) } void -map_load_level(Map *map, ChamplainMapSource *map_source, gint zoom_level) +map_load_level(Map *map, + ChamplainMapSource *map_source, + gint zoom_level) { if (map->previous_level) g_object_unref (map->previous_level); @@ -54,7 +56,10 @@ map_load_level(Map *map, ChamplainMapSource *map_source, gint zoom_level) } void -map_load_visible_tiles (Map *map, ChamplainView *view, ChamplainMapSource *source, ChamplainRectangle viewport) +map_load_visible_tiles (Map *map, + ChamplainView *view, + ChamplainMapSource *source, + ChamplainRectangle viewport) { gint size; @@ -134,7 +139,8 @@ map_load_visible_tiles (Map *map, ChamplainView *view, ChamplainMapSource *sourc } gboolean -map_zoom_in (Map *map, ChamplainMapSource *source) +map_zoom_in (Map *map, + ChamplainMapSource *source) { guint new_level = champlain_zoom_level_get_zoom_level (map->current_level) + 1; if(new_level <= champlain_map_source_get_max_zoom_level (source)) @@ -146,7 +152,8 @@ map_zoom_in (Map *map, ChamplainMapSource *source) } gboolean -map_zoom_out (Map *map, ChamplainMapSource *source) +map_zoom_out (Map *map, + ChamplainMapSource *source) { gint new_level = champlain_zoom_level_get_zoom_level (map->current_level) - 1; if(new_level >= champlain_map_source_get_min_zoom_level (source)) @@ -164,7 +171,9 @@ map_free (Map *map) } gboolean -map_zoom_to (Map *map, ChamplainMapSource *source, guint zoomLevel) +map_zoom_to (Map *map, + ChamplainMapSource *source, + guint zoomLevel) { if (zoomLevel<= champlain_map_source_get_max_zoom_level (source)) { diff --git a/champlain/champlain-map.h b/champlain/champlain-map.h index 4192da6..6550712 100644 --- a/champlain/champlain-map.h +++ b/champlain/champlain-map.h @@ -37,16 +37,25 @@ struct _Map Map *map_new (void); -void map_load_visible_tiles (Map *map, ChamplainView * view, ChamplainMapSource *source, ChamplainRectangle viewport); +void map_load_visible_tiles (Map *map, + ChamplainView * view, + ChamplainMapSource *source, + ChamplainRectangle viewport); void map_free (Map *map); -gboolean map_zoom_in (Map *map, ChamplainMapSource *map_source); +gboolean map_zoom_in (Map *map, + ChamplainMapSource *map_source); -gboolean map_zoom_out (Map *map, ChamplainMapSource *map_source); +gboolean map_zoom_out (Map *map, + ChamplainMapSource *map_source); -gboolean map_zoom_to (Map *map, ChamplainMapSource *map_source, guint zoomLevel); +gboolean map_zoom_to (Map *map, + ChamplainMapSource *map_source, + guint zoomLevel); -void map_load_level(Map *map, ChamplainMapSource *map_source, gint zoom_level); +void map_load_level(Map *map, + ChamplainMapSource *map_source, + gint zoom_level); #endif diff --git a/champlain/champlain-zoom-level.c b/champlain/champlain-zoom-level.c index cfae4f7..3f533a2 100644 --- a/champlain/champlain-zoom-level.c +++ b/champlain/champlain-zoom-level.c @@ -57,9 +57,9 @@ struct _ChamplainZoomLevelPrivate { static void champlain_zoom_level_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec) + guint property_id, + GValue *value, + GParamSpec *pspec) { ChamplainZoomLevel *self = CHAMPLAIN_ZOOM_LEVEL (object); switch (property_id) @@ -83,9 +83,9 @@ champlain_zoom_level_get_property (GObject *object, static void champlain_zoom_level_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec) + guint property_id, + const GValue *value, + GParamSpec *pspec) { ChamplainZoomLevel *self = CHAMPLAIN_ZOOM_LEVEL (object); switch (property_id) @@ -156,40 +156,40 @@ champlain_zoom_level_class_init (ChamplainZoomLevelClass *klass) g_object_class_install_property (object_class, PROP_WIDTH, g_param_spec_uint ("width", - "Width", - "The width of this zoom level", - 0, - G_MAXINT, - 0, - G_PARAM_READWRITE)); + "Width", + "The width of this zoom level", + 0, + G_MAXINT, + 0, + G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_HEIGHT, g_param_spec_uint ("height", - "height", - "The height of this zoom level", - 0, - G_MAXINT, - 0, - G_PARAM_READWRITE)); + "height", + "The height of this zoom level", + 0, + G_MAXINT, + 0, + G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_ZOOM_LEVEL, g_param_spec_int ("zoom-level", - "zoom-level", - "The level of this zoom level", - G_MININT, - G_MAXINT, - 0, - G_PARAM_READWRITE)); + "zoom-level", + "The level of this zoom level", + G_MININT, + G_MAXINT, + 0, + G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_ACTOR, g_param_spec_object ("actor", - "Actor", - "The actor containing all the tiles", - CLUTTER_TYPE_ACTOR, - G_PARAM_READABLE)); + "Actor", + "The actor containing all the tiles", + CLUTTER_TYPE_ACTOR, + G_PARAM_READABLE)); } static void @@ -210,7 +210,7 @@ champlain_zoom_level_new (void) void champlain_zoom_level_add_tile (ChamplainZoomLevel *self, - ChamplainTile *tile) + ChamplainTile *tile) { g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self)); @@ -223,7 +223,7 @@ champlain_zoom_level_add_tile (ChamplainZoomLevel *self, void champlain_zoom_level_remove_tile (ChamplainZoomLevel *self, - ChamplainTile *tile) + ChamplainTile *tile) { g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self)); @@ -246,7 +246,7 @@ champlain_zoom_level_tile_count (ChamplainZoomLevel *self) ChamplainTile * champlain_zoom_level_get_nth_tile (ChamplainZoomLevel *self, - guint index) + guint index) { g_return_val_if_fail (CHAMPLAIN_ZOOM_LEVEL (self), NULL); @@ -288,7 +288,7 @@ champlain_zoom_level_get_zoom_level (ChamplainZoomLevel *self) void champlain_zoom_level_set_width (ChamplainZoomLevel *self, - guint width) + guint width) { g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self)); @@ -300,7 +300,7 @@ champlain_zoom_level_set_width (ChamplainZoomLevel *self, void champlain_zoom_level_set_height (ChamplainZoomLevel *self, - guint height) + guint height) { g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self)); @@ -313,7 +313,7 @@ champlain_zoom_level_set_height (ChamplainZoomLevel *self, void champlain_zoom_level_set_zoom_level (ChamplainZoomLevel *self, - gint zoom_level) + gint zoom_level) { g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self)); diff --git a/champlain/champlain-zoom-level.h b/champlain/champlain-zoom-level.h index b252b90..0228158 100644 --- a/champlain/champlain-zoom-level.h +++ b/champlain/champlain-zoom-level.h @@ -63,8 +63,10 @@ guint champlain_zoom_level_get_height (ChamplainZoomLevel *self); gint champlain_zoom_level_get_zoom_level (ChamplainZoomLevel *self); ClutterActor* champlain_zoom_level_get_actor (ChamplainZoomLevel *self); -void champlain_zoom_level_set_width (ChamplainZoomLevel *self, guint width); -void champlain_zoom_level_set_height (ChamplainZoomLevel *self, guint height); +void champlain_zoom_level_set_width (ChamplainZoomLevel *self, + guint width); +void champlain_zoom_level_set_height (ChamplainZoomLevel *self, + guint height); void champlain_zoom_level_set_zoom_level (ChamplainZoomLevel *self, gint zoom_level);