]> err.no Git - libchamplain/commitdiff
Use a more specific object type for add_layer
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Mon, 9 Mar 2009 20:28:47 +0000 (22:28 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Mon, 9 Mar 2009 20:28:47 +0000 (22:28 +0200)
champlain/champlain-view.c
champlain/champlain-view.h

index 713a81037c7b9f119a07119bfa5ce1477923030b..238698434aa13eeed64ba89f0f156adc9962953b 100644 (file)
@@ -1027,21 +1027,22 @@ champlain_view_set_zoom_level (ChamplainView *view, gint zoom_level)
 /**
  * champlain_view_add_layer:
  * @view: a #ChamplainView
- * @layer: a #ClutterActor
+ * @layer: a #ChamplainLayer
  *
  * Adds a new layer to the view
  *
  * Since: 0.2
  */
 void
-champlain_view_add_layer (ChamplainView *view, ClutterActor *layer)
+champlain_view_add_layer (ChamplainView *view, ChamplainLayer *layer)
 {
   g_return_if_fail (CHAMPLAIN_IS_VIEW (view));
   g_return_if_fail (CLUTTER_IS_ACTOR (layer));
 
   ChamplainViewPrivate *priv = GET_PRIVATE (view);
-  clutter_container_add (CLUTTER_CONTAINER (priv->user_layers), layer, NULL);
-  clutter_actor_raise_top (layer);
+  clutter_container_add (CLUTTER_CONTAINER (priv->user_layers),
+      CLUTTER_ACTOR (layer), NULL);
+  clutter_actor_raise_top (CLUTTER_ACTOR (layer));
 
   if (priv->map)
     g_idle_add (marker_reposition, view);
index 177740455120a5f616f04fb87804ccbc9e23eada..0b75eb8f0a441cfc5172be9fdcccf2bb99696157 100644 (file)
@@ -24,8 +24,9 @@
 #define CHAMPLAIN_VIEW_H
 
 #include <champlain/champlain-defines.h>
-#include <champlain/champlain-zoom-level.h>
+#include <champlain/champlain-layer.h>
 #include <champlain/champlain-map-source.h>
+#include <champlain/champlain-zoom-level.h>
 
 #include <glib.h>
 #include <glib-object.h>
@@ -79,7 +80,7 @@ void champlain_view_set_zoom_level (ChamplainView *champlainView, gint zoom_leve
 
 void champlain_view_set_map_source (ChamplainView *champlainView, ChamplainMapSource *map_source);
 
-void champlain_view_add_layer (ChamplainView *champlainView, ClutterActor *layer);
+void champlain_view_add_layer (ChamplainView *champlainView, ChamplainLayer *layer);
 
 void champlain_view_set_size (ChamplainView *view, guint width, guint height);