[libchamplainmm] View: Add missing symbols



commit 51350fa2146f1b65ba1419793b8b169265754450
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Sat Jul 26 11:15:32 2014 +0200

    View: Add missing symbols

 champlain/src/view.hg |   68 +++++++++++++++++++++++++++++++++---------------
 1 files changed, 47 insertions(+), 21 deletions(-)
---
diff --git a/champlain/src/view.hg b/champlain/src/view.hg
index 3a7b5d2..7a09bde 100644
--- a/champlain/src/view.hg
+++ b/champlain/src/view.hg
@@ -18,12 +18,14 @@
 
 #include <cluttermm/actor.h>
 #include <cluttermm/content.h>
-#include <cluttermm/types.h>
+#include <cluttermm/bin-layout.h>
 #include <champlainmm/bounding-box.h>
 #include <champlainmm/map-source.h>
 #include <champlainmm/layer.h>
 #include <champlainmm/license.h>
 
+#include <vector>
+
 _DEFS(champlainmm,champlain)
 _PINCLUDE(cluttermm/private/actor_p.h)
 
@@ -33,12 +35,35 @@ namespace Champlain
 class Layer;
 class License;
 
+/** A Clutter::Actor to display maps.
+ *
+ * The View is a Clutter::Actor to display maps. It supports two modes
+ * of scrolling:
+ * <itemizedlist>
+ *   <listitem><para>Push: the normal behavior where the maps don't move
+ *   after the user stopped scrolling;</para></listitem>
+ *   <listitem><para>Kinetic: the iPhone-like behavior where the maps
+ *   decelerate after the user stopped scrolling.</para></listitem>
+ * </itemizedlist>
+ *
+ * You can use the same View to display many types of maps. In
+ * Champlain they are called map sources. You can change the property_map_source()
+ * property at anytime to replace the current displayed map.
+ *
+ * The maps are downloaded from Internet from open maps sources (like
+ * <ulink role="online-location"
+ * url="http://www.openstreetmap.org";>OpenStreetMap</ulink>).  Maps are divided
+ * in tiles for each zoom level. When a tile is requested, View will
+ * first check if it is in cache (in the user's cache dir under champlain). If
+ * an error occurs during download, an error tile will be displayed.
+ *
+ * The button-press-event and button-release-event signals are emitted each
+ * time a mouse button is pressed and released on the view.
+ *
+ * @newin{0,1}
+ */
 class View : public Clutter::Actor
 {
-  /** 
-   *
-   * @newin{0,1}
-   */
   _CLASS_GOBJECT(View, ChamplainView, CHAMPLAIN_VIEW, Clutter::Actor, ClutterActor)
 
 protected:
@@ -59,13 +84,16 @@ public:
   _WRAP_METHOD(void set_min_zoom_level(guint zoom_level), champlain_view_set_min_zoom_level)
   _WRAP_METHOD(void set_max_zoom_level(guint zoom_level), champlain_view_set_max_zoom_level)
 
-  _WRAP_METHOD(void ensure_visible(BoundingBox& bbox, bool animate), champlain_view_ensure_visible)
-  _WRAP_METHOD(void ensure_layers_visible(bool animate), champlain_view_ensure_layers_visible)
+  _WRAP_METHOD(void ensure_visible(BoundingBox& bbox, bool animate = true), champlain_view_ensure_visible)
+  _WRAP_METHOD(void ensure_layers_visible(bool animate = true), champlain_view_ensure_layers_visible)
 
   _WRAP_METHOD(void set_map_source(const Glib::RefPtr<MapSource>& map_source), champlain_view_set_map_source)
   _WRAP_METHOD(void add_overlay_source(const Glib::RefPtr<MapSource>& map_source, guint8 opacity), 
champlain_view_add_overlay_source)
   _WRAP_METHOD(void remove_overlay_source(const Glib::RefPtr<MapSource>& map_source), 
champlain_view_remove_overlay_source)
-  // TODO get_overlay_sources
+#m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<MapSource> >',`Glib::ListHandler< 
Glib::RefPtr<MapSource> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector< Glib::RefPtr<MapSource> > get_overlay_sources(), 
champlain_view_get_overlay_sources)
+#m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<const MapSource> >',`Glib::ListHandler< 
Glib::RefPtr<const MapSource> >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector< Glib::RefPtr<const MapSource> > get_overlay_sources() const, 
champlain_view_get_overlay_sources)
 
   _WRAP_METHOD(void set_deceleration(double rate), champlain_view_set_deceleration)
   _WRAP_METHOD(void set_kinetic_mode(bool kinetic = true), champlain_view_set_kinetic_mode)
@@ -80,16 +108,16 @@ public:
   _WRAP_METHOD(guint get_zoom_level() const, champlain_view_get_zoom_level)
   _WRAP_METHOD(guint get_min_zoom_level() const, champlain_view_get_min_zoom_level)
   _WRAP_METHOD(guint get_max_zoom_level() const, champlain_view_get_max_zoom_level)
-  _WRAP_METHOD(Glib::RefPtr<MapSource> get_map_source(), champlain_view_get_map_source)
-  _WRAP_METHOD(Glib::RefPtr<const MapSource> get_map_source() const, champlain_view_get_map_source, 
constversion)
+  _WRAP_METHOD(Glib::RefPtr<MapSource> get_map_source(), champlain_view_get_map_source, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const MapSource> get_map_source() const, champlain_view_get_map_source, 
refreturn, constversion)
   _WRAP_METHOD(double get_deceleration() const, champlain_view_get_deceleration)
   _WRAP_METHOD(bool get_kinetic_mode() const, champlain_view_get_kinetic_mode)
   _WRAP_METHOD(bool get_keep_center_on_resize() const, champlain_view_get_keep_center_on_resize)
   _WRAP_METHOD(bool get_zoom_on_double_click() const, champlain_view_get_zoom_on_double_click)
   _WRAP_METHOD(bool get_animate_zoom() const, champlain_view_get_animate_zoom)
   _WRAP_METHOD(State get_state() const, champlain_view_get_state)
-  _WRAP_METHOD(Glib::RefPtr<Clutter::Content> get_background_pattern(), 
champlain_view_get_background_pattern)
-  _WRAP_METHOD(Glib::RefPtr<const Clutter::Content> get_background_pattern() const, 
champlain_view_get_background_pattern, constversion)
+  _WRAP_METHOD(Glib::RefPtr<Clutter::Content> get_background_pattern(), 
champlain_view_get_background_pattern, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Clutter::Content> get_background_pattern() const, 
champlain_view_get_background_pattern, refreturn, constversion)
 
   _WRAP_METHOD(void reload_tiles(), champlain_view_reload_tiles)
 
@@ -98,14 +126,13 @@ public:
   _WRAP_METHOD(double longitude_to_x(double longitude) const, champlain_view_longitude_to_x)
   _WRAP_METHOD(double latitude_to_y(double latitude) const, champlain_view_latitude_to_y)
 
-// TODO
-//  _WRAP_METHOD(void get_viewport_origin(int
+  _WRAP_METHOD(void get_viewport_origin(int& x, int& y) const, champlain_view_get_viewport_origin)
 
-// TODO
-//  _WRAP_METHOD(void bin_layout_add(), champlain_view_bin_layout_add, deprecated)
+#m4 _CONVERSION(`Clutter::BinAlignment', `ClutterBinAlignment', `(($2) ($3))')
+  _WRAP_METHOD(void bin_layout_add(const Glib::RefPtr<Clutter::Actor>& child, Clutter::BinAlignment x_align, 
Clutter::BinAlignment y_align), champlain_view_bin_layout_add, deprecated)
 
-  _WRAP_METHOD(Glib::RefPtr<License> get_license_actor(), champlain_view_get_license_actor)
-  _WRAP_METHOD(Glib::RefPtr<const License> get_license_actor() const, champlain_view_get_license_actor, 
constversion)
+  _WRAP_METHOD(Glib::RefPtr<License> get_license_actor(), champlain_view_get_license_actor, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const License> get_license_actor() const, champlain_view_get_license_actor, 
refreturn, constversion)
 
   _WRAP_METHOD(BoundingBox get_bounding_box() const, champlain_view_get_bounding_box)
   _WRAP_METHOD(BoundingBox get_bounding_box_for_zoom_level(guint zoom_level) const, 
champlain_view_get_bounding_box_for_zoom_level)
@@ -126,9 +153,8 @@ public:
   _WRAP_PROPERTY("goto-animation-mode", Clutter::AnimationMode)
   _WRAP_PROPERTY("goto-animation-duration", guint)
 
-// animation_completed is a detailed signal
-//  _WRAP_SIGNAL(void animation_completed(), "animation_completed", no_default_handler)
-  _WRAP_SIGNAL(void layer_relocated(), "layer_relocated", no_default_handler)
+  _WRAP_SIGNAL(void animation_completed(), "animation-completed", no_default_handler)
+  _WRAP_SIGNAL(void layer_relocated(), "layer-relocated", no_default_handler)
 };
 
 } // namespace Champlain


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