[libchamplainmm] Layer: Add missing symbols



commit 35f1dd498501c95127a661893b7ebae3d7416669
Author: Juan R. García Blanco <juanrgar gmail com>
Date:   Fri Mar 7 23:16:52 2014 +0100

    Layer: Add missing symbols
    
        * Wrap champlain_layer_set_view object method.
        * Wrap champlain_layer_get_bounding_box object method.
        * Add vfuncs for set_view and get_bounding_box.

 champlain/src/champlain_vfuncs.defs |   15 +++++++++++++++
 champlain/src/layer.ccg             |   23 +++++++++++++++++++++++
 champlain/src/layer.hg              |   22 ++++++++++++++--------
 tools/m4/convert_libchamplain.m4    |    6 ++++++
 4 files changed, 58 insertions(+), 8 deletions(-)
---
diff --git a/champlain/src/champlain_vfuncs.defs b/champlain/src/champlain_vfuncs.defs
index 50f8bc2..4369f3e 100644
--- a/champlain/src/champlain_vfuncs.defs
+++ b/champlain/src/champlain_vfuncs.defs
@@ -22,3 +22,18 @@
   (of-object "ChamplainLocation")
   (return-type "gdouble")
 )
+
+; ChamplainLayer
+
+(define-vfunc set_view
+  (of-object "ChamplainLayer")
+  (return-type "void")
+  (parameters
+    '("ChamplainView*" "view")
+  )
+)
+
+(define-vfunc get_bounding_box
+  (of-object "ChamplainLayer")
+  (return-type "ChamplainBoundingBox*")
+)
diff --git a/champlain/src/layer.ccg b/champlain/src/layer.ccg
index e69de29..98e7f82 100644
--- a/champlain/src/layer.ccg
+++ b/champlain/src/layer.ccg
@@ -0,0 +1,23 @@
+/* Copyright (c) 2014  Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 2.1 of the License,
+ * or (at your option) any later version.
+ *
+ * libchamplainmm is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <champlain/champlain.h>
+
+namespace Champlain
+{
+} // namespace Champlain
diff --git a/champlain/src/layer.hg b/champlain/src/layer.hg
index 63da71e..dab7f7c 100644
--- a/champlain/src/layer.hg
+++ b/champlain/src/layer.hg
@@ -16,27 +16,33 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <cluttermm.h>
+#include <cluttermm/actor.h>
+#include <champlainmm/view.h>
+#include <champlainmm/bounding-box.h>
 
 _DEFS(champlainmm,champlain)
-
-_CC_INCLUDE(champlain/champlain.h)
-_PINCLUDE(cluttermm/private/group_p.h)
+_PINCLUDE(cluttermm/private/actor_p.h)
 
 namespace Champlain
 {
 
-class Layer :
-    public Clutter::Group
+class Layer : public Clutter::Actor
 {
-  _CLASS_GOBJECT(Layer, ChamplainLayer, CHAMPLAIN_LAYER,
-                 Clutter::Group, ClutterGroup)
+  _CLASS_GOBJECT(Layer, ChamplainLayer, CHAMPLAIN_LAYER, Clutter::Actor, ClutterActor)
 
 protected:
   _CTOR_DEFAULT()
 
 public:
   _WRAP_CREATE()
+
+  _WRAP_METHOD(void set_view(const Glib::RefPtr<View>& view), champlain_layer_set_view)
+
+  _WRAP_METHOD(BoundingBox get_bounding_box() const, champlain_layer_get_bounding_box)
+
+  _WRAP_VFUNC(void set_view(const Glib::RefPtr<View>& view), set_view)
+
+  _WRAP_VFUNC(BoundingBox get_bounding_box() const, get_bounding_box)
 };
 
 } // namespace Champlain
diff --git a/tools/m4/convert_libchamplain.m4 b/tools/m4/convert_libchamplain.m4
index b712c7d..f09cfed 100644
--- a/tools/m4/convert_libchamplain.m4
+++ b/tools/m4/convert_libchamplain.m4
@@ -28,6 +28,8 @@ _CONVERSION(`const GList*',`Glib::ListHandle<Glib::RefPtr<BaseMarker> >',`$2(con
 
 # BoundingBox
 _CONVERSION(`BoundingBox&',`ChamplainBoundingBox*',`($3).gobj()')
+_CONVERSION(`BoundingBox',`ChamplainBoundingBox*',`($3).gobj()')
+_CONVERSION(`ChamplainBoundingBox*',`BoundingBox',`Glib::wrap($3)')
 
 # Cache
 _CONVERSION(`ChamplainCache*',`Glib::RefPtr<Cache>',`Glib::wrap($3)')
@@ -58,3 +60,7 @@ _CONVERSION(`ChamplainTile*',`const Glib::RefPtr<Tile>&',`Glib::wrap($3)')
 _CONVERSION(`ChamplainTile*',`Glib::RefPtr<Tile>',`Glib::wrap($3)')
 _CONVERSION(`ChamplainTile*',`Glib::RefPtr<const Tile>',`Glib::wrap($3)')
 _CONVERSION(`const Glib::RefPtr<Tile>&',`ChamplainTile*',__CONVERT_REFPTR_TO_P($3))
+
+# View
+_CONVERSION(`const Glib::RefPtr<View>&',`ChamplainView*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`ChamplainView*',`const Glib::RefPtr<View>&',`Glib::wrap($3)')


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