Re: [ANNOUNCE] libchamplain 0.6



Hi,

I rebuilded with memphis specifics included and it worked. A result
from this is that now bindings for libchamplain are dependent on
libmemphis vala bindings otherwise vala compilation won't work.
Another remark is that in champlain-0.6.pc it doesn't state
memphis-0.2 as a requirement which has the effect that
"vala-gen-introspect" doesn't work unless this is added.

The third patch includes the missing memphis types and other
declarations. Please let me know if I forgot something or it is not
working as supposed.
It would be nice if someone makes a example with memphis rendering. :)

Regards,
Tomaž

On Sat, May 29, 2010 at 1:02 AM, Łukasz Jernaś <deejay1 srem org> wrote:
> On Tue, May 25, 2010 at 8:22 PM, Tomaž Vajngerl <quikee gmail com> wrote:
>> Hi,
>>
>> Attaching additional patch with rebuilded gi and vapi with actual
>> stuff added in 0.6 - except some libmemphis specifics.
>
> The bindings and the demo seem to work fine, apart from some minor
> whitespace warnings in the first patch, can you work out the memphis
> specifics also?
>
> /me would like to see a 0.6.1 release soon with the vala bindings...
>
> Regards,
> --
> Łukasz [DeeJay1] Jernaś
>
From 82e3985eb4ff65d4793bdbfba6700c1f10864d60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= <quikee gmail com>
Date: Sat, 29 May 2010 11:19:45 +0200
Subject: [PATCH 3/3] Add memphis specific stuff inside champlain bindings.

---
 bindings/vala/champlain/champlain-0.6.deps         |    2 +
 bindings/vala/champlain/champlain-0.6.vapi         |    3 ++
 .../vala/champlain/champlain-0.6/champlain-0.6.gi  |   26 ++++++++++++++++++++
 bindings/vala/champlain/create.sh                  |    2 +-
 4 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/bindings/vala/champlain/champlain-0.6.deps b/bindings/vala/champlain/champlain-0.6.deps
index 39ce1f0..ad1aa40 100644
--- a/bindings/vala/champlain/champlain-0.6.deps
+++ b/bindings/vala/champlain/champlain-0.6.deps
@@ -1 +1,3 @@
 clutter-1.0
+memphis-0.2
+
diff --git a/bindings/vala/champlain/champlain-0.6.vapi b/bindings/vala/champlain/champlain-0.6.vapi
index 25d5220..d702134 100644
--- a/bindings/vala/champlain/champlain-0.6.vapi
+++ b/bindings/vala/champlain/champlain-0.6.vapi
@@ -73,6 +73,7 @@ namespace Champlain {
 	}
 	[CCode (cheader_filename = "champlain/champlain.h")]
 	public class MapDataSource : GLib.InitiallyUnowned {
+		public virtual unowned Memphis.Map get_map_data ();
 		[NoAccessorMethod]
 		public Champlain.BoundingBox bounding_box { owned get; set; }
 		[NoAccessorMethod]
@@ -198,11 +199,13 @@ namespace Champlain {
 		public MemphisTileSource.full (string id, string name, string license, string license_uri, uint min_zoom, uint max_zoom, uint tile_size, Champlain.MapProjection projection, Champlain.MapDataSource map_data_source);
 		public Clutter.Color get_background_color ();
 		public unowned Champlain.MapDataSource get_map_data_source ();
+		public unowned Memphis.Rule get_rule (string id);
 		public unowned GLib.List get_rule_ids ();
 		public void load_rules (string rules_path);
 		public void remove_rule (string id);
 		public void set_background_color (Clutter.Color color);
 		public void set_map_data_source (Champlain.MapDataSource map_data_source);
+		public void set_rule (Memphis.Rule rule);
 		public Champlain.MapDataSource map_data_source { get; set construct; }
 	}
 	[CCode (cheader_filename = "champlain/champlain.h")]
diff --git a/bindings/vala/champlain/champlain-0.6/champlain-0.6.gi b/bindings/vala/champlain/champlain-0.6/champlain-0.6.gi
index 7e0b58a..2c066c2 100644
--- a/bindings/vala/champlain/champlain-0.6/champlain-0.6.gi
+++ b/bindings/vala/champlain/champlain-0.6/champlain-0.6.gi
@@ -305,8 +305,20 @@
 			</constructor>
 		</object>
 		<object name="ChamplainMapDataSource" parent="GInitiallyUnowned" type-name="ChamplainMapDataSource" get-type="champlain_map_data_source_get_type">
+			<method name="get_map_data" symbol="champlain_map_data_source_get_map_data">
+				<return-type type="MemphisMap*"/>
+				<parameters>
+					<parameter name="data_source" type="ChamplainMapDataSource*"/>
+				</parameters>
+			</method>
 			<property name="bounding-box" type="ChamplainBoundingBox*" readable="1" writable="1" construct="0" construct-only="0"/>
 			<property name="state" type="ChamplainState" readable="1" writable="1" construct="0" construct-only="0"/>
+			<vfunc name="get_map_data">
+				<return-type type="MemphisMap*"/>
+				<parameters>
+					<parameter name="data_source" type="ChamplainMapDataSource*"/>
+				</parameters>
+			</vfunc>
 		</object>
 		<object name="ChamplainMapSource" parent="GInitiallyUnowned" type-name="ChamplainMapSource" get-type="champlain_map_source_get_type">
 			<method name="fill_tile" symbol="champlain_map_source_fill_tile">
@@ -811,6 +823,13 @@
 					<parameter name="tile_source" type="ChamplainMemphisTileSource*"/>
 				</parameters>
 			</method>
+			<method name="get_rule" symbol="champlain_memphis_tile_source_get_rule">
+				<return-type type="MemphisRule*"/>
+				<parameters>
+					<parameter name="tile_source" type="ChamplainMemphisTileSource*"/>
+					<parameter name="id" type="gchar*"/>
+				</parameters>
+			</method>
 			<method name="get_rule_ids" symbol="champlain_memphis_tile_source_get_rule_ids">
 				<return-type type="GList*"/>
 				<parameters>
@@ -859,6 +878,13 @@
 					<parameter name="map_data_source" type="ChamplainMapDataSource*"/>
 				</parameters>
 			</method>
+			<method name="set_rule" symbol="champlain_memphis_tile_source_set_rule">
+				<return-type type="void"/>
+				<parameters>
+					<parameter name="tile_source" type="ChamplainMemphisTileSource*"/>
+					<parameter name="rule" type="MemphisRule*"/>
+				</parameters>
+			</method>
 			<property name="map-data-source" type="ChamplainMapDataSource*" readable="1" writable="1" construct="1" construct-only="0"/>
 		</object>
 		<object name="ChamplainNetworkMapDataSource" parent="ChamplainMapDataSource" type-name="ChamplainNetworkMapDataSource" get-type="champlain_network_map_data_source_get_type">
diff --git a/bindings/vala/champlain/create.sh b/bindings/vala/champlain/create.sh
index 402d908..f9a8c3c 100644
--- a/bindings/vala/champlain/create.sh
+++ b/bindings/vala/champlain/create.sh
@@ -1 +1 @@
-vapigen --library champlain-0.6 --pkg clutter-1.0 champlain-0.6/champlain-0.6.gi --metadata champlain-0.6/champlain-0.6.metadata
+vapigen --library champlain-0.6 --pkg clutter-1.0 --pkg memphis-0.2 champlain-0.6/champlain-0.6.gi --metadata champlain-0.6/champlain-0.6.metadata
-- 
1.7.0.4



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