}
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);
}
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;
}
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))
}
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))
}
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))
{
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
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)
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)
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
void
champlain_zoom_level_add_tile (ChamplainZoomLevel *self,
- ChamplainTile *tile)
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
void
champlain_zoom_level_remove_tile (ChamplainZoomLevel *self,
- ChamplainTile *tile)
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
ChamplainTile *
champlain_zoom_level_get_nth_tile (ChamplainZoomLevel *self,
- guint index)
+ guint index)
{
g_return_val_if_fail (CHAMPLAIN_ZOOM_LEVEL (self), NULL);
void
champlain_zoom_level_set_width (ChamplainZoomLevel *self,
- guint width)
+ guint width)
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
void
champlain_zoom_level_set_height (ChamplainZoomLevel *self,
- guint height)
+ guint height)
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (self));
void
champlain_zoom_level_set_zoom_level (ChamplainZoomLevel *self,
- gint zoom_level)
+ gint zoom_level)
{
g_return_if_fail (CHAMPLAIN_ZOOM_LEVEL (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);