[libchamplainmm] Add incomplete wrapper for ChamplainLicense



commit 11798b6eb94a3d02a134050860d6f346355def65
Author: Juan R. García Blanco <juanrgar gmail com>
Date:   Sun Jun 8 18:53:52 2014 +0200

    Add incomplete wrapper for ChamplainLicense

 champlain/champlainmm.h                            |    1 +
 champlain/champlainmm/.gitignore                   |    1 +
 champlain/src/champlain_signals.defs               |   24 +++++++++++
 champlain/src/filelist.am                          |    1 +
 champlain/src/license.ccg                          |   23 ++++++++++
 champlain/src/license.hg                           |   44 ++++++++++++++++++++
 .../extradefs/generate_extra_defs_libchamplain.cc  |    1 +
 tools/m4/convert_libchamplain.m4                   |    3 +
 8 files changed, 98 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlainmm.h b/champlain/champlainmm.h
index 9d14d5d..ecfe2e2 100644
--- a/champlain/champlainmm.h
+++ b/champlain/champlainmm.h
@@ -27,6 +27,7 @@
 #include <champlainmm/debug.h>
 #include <champlainmm/defines.h>
 #include <champlainmm/layer.h>
+#include <champlainmm/license.h>
 #include <champlainmm/map-source-desc.h>
 #include <champlainmm/map-source-factory.h>
 #include <champlainmm/map-source.h>
diff --git a/champlain/champlainmm/.gitignore b/champlain/champlainmm/.gitignore
index b199571..8076e3b 100644
--- a/champlain/champlainmm/.gitignore
+++ b/champlain/champlainmm/.gitignore
@@ -2,6 +2,7 @@ bounding-box.*
 defines.*
 label.*
 layer.*
+license.*
 location.*
 map-source-desc.*
 map-source-factory.*
diff --git a/champlain/src/champlain_signals.defs b/champlain/src/champlain_signals.defs
index ed2a83d..ccc8a7f 100644
--- a/champlain/src/champlain_signals.defs
+++ b/champlain/src/champlain_signals.defs
@@ -1,3 +1,5 @@
+;; ChamplainBoundingBox is neither a GObject nor a GInterface. Not checked for signals and properties.
+
 ;; From ChamplainLabel
 
 (define-property image
@@ -110,6 +112,26 @@
 
 ;; From ChamplainLayer
 
+;; From ChamplainLicense
+
+(define-property extra-text
+  (of-object "ChamplainLicense")
+  (prop-type "GParamString")
+  (docs "Additional license text")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property alignment
+  (of-object "ChamplainLicense")
+  (prop-type "GParamEnum")
+  (docs "The license's alignment")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
 ;; From ChamplainLocation
 
 (define-property latitude
@@ -293,6 +315,8 @@
   (construct-only #f)
 )
 
+;; From ChamplainRenderer
+
 ;; From ChamplainTile
 
 (define-signal render-complete
diff --git a/champlain/src/filelist.am b/champlain/src/filelist.am
index 647873d..2481e29 100644
--- a/champlain/src/filelist.am
+++ b/champlain/src/filelist.am
@@ -14,6 +14,7 @@ files_hg  =                                   \
        marker.hg                               \
        defines.hg                              \
        layer.hg                                \
+       license.hg                              \
        location.hg                             \
        map-source-desc.hg                      \
        map-source-factory.hg                   \
diff --git a/champlain/src/license.ccg b/champlain/src/license.ccg
new file mode 100644
index 0000000..98e7f82
--- /dev/null
+++ b/champlain/src/license.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/license.hg b/champlain/src/license.hg
new file mode 100644
index 0000000..64c4ab7
--- /dev/null
+++ b/champlain/src/license.hg
@@ -0,0 +1,44 @@
+/* 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 <cluttermm/actor.h>
+
+_DEFS(champlainmm,champlain)
+_PINCLUDE(cluttermm/private/actor_p.h)
+
+namespace Champlain
+{
+
+class License : public Clutter::Actor
+{
+
+/** An actor that displays license text.
+ *
+ * @newin{0,1}
+ */
+  _CLASS_GOBJECT(License, ChamplainLicense, CHAMPLAIN_LICENSE, Clutter::Actor, ClutterActor)
+
+protected:
+  _CTOR_DEFAULT()
+
+public:
+  _WRAP_CREATE()
+
+};
+
+} // namespace Champlain
diff --git a/tools/extradefs/generate_extra_defs_libchamplain.cc 
b/tools/extradefs/generate_extra_defs_libchamplain.cc
index 3165b77..1ec3623 100644
--- a/tools/extradefs/generate_extra_defs_libchamplain.cc
+++ b/tools/extradefs/generate_extra_defs_libchamplain.cc
@@ -29,6 +29,7 @@ main(int argc, char *argv[])
   std::cout << get_defs(CHAMPLAIN_TYPE_BOUNDING_BOX)
             << get_defs(CHAMPLAIN_TYPE_LABEL)
             << get_defs(CHAMPLAIN_TYPE_LAYER)
+            << get_defs(CHAMPLAIN_TYPE_LICENSE)
             << get_defs(CHAMPLAIN_TYPE_LOCATION)
             << get_defs(CHAMPLAIN_TYPE_MAP_SOURCE)
             << get_defs(CHAMPLAIN_TYPE_MARKER_LAYER)
diff --git a/tools/m4/convert_libchamplain.m4 b/tools/m4/convert_libchamplain.m4
index 486ea03..285c649 100644
--- a/tools/m4/convert_libchamplain.m4
+++ b/tools/m4/convert_libchamplain.m4
@@ -37,6 +37,9 @@ _CONVERSION(`ChamplainCache*',`Glib::RefPtr<Cache>',`Glib::wrap($3)')
 # Layer
 _CONVERSION(`const Glib::RefPtr<Layer>&',`ChamplainLayer*',__CONVERT_REFPTR_TO_P)
 
+# License
+_CONVERSION(`ChamplainLicense*',`Glib::RefPtr<License>', `Glib::wrap($3)')
+
 # MapSource
 _CONVERSION(`ChamplainMapSource*',`Glib::RefPtr<MapSource>',`Glib::wrap($3)')
 _CONVERSION(`ChamplainMapSource*',`Glib::RefPtr<const MapSource>',`Glib::wrap($3)')


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