[libchamplain] Sync with last champlain api



commit 59162af692820cabe6e6d98d136e5f45eccdeeee
Author: Victor Poluceno <victorpoluceno gmail com>
Date:   Sat Jun 13 18:06:45 2009 -0300

    Sync with last champlain api

 bindings/python/champlain-gtk/pychamplaingtk.defs |   43 +++-
 bindings/python/champlain/pychamplain.defs        |  288 ++++++++++++++++++++-
 bindings/python/champlain/pychamplain.override    |   12 +-
 bindings/python/update-binding.sh                 |    4 +-
 4 files changed, 333 insertions(+), 14 deletions(-)
---
diff --git a/bindings/python/champlain-gtk/pychamplaingtk.defs b/bindings/python/champlain-gtk/pychamplaingtk.defs
index 865a1d1..c84b776 100644
--- a/bindings/python/champlain-gtk/pychamplaingtk.defs
+++ b/bindings/python/champlain-gtk/pychamplaingtk.defs
@@ -1,10 +1,10 @@
 ;; -*- scheme -*-
 ; object definitions ...
-(define-object ViewEmbed
-  (in-module "Champlain")
+(define-object ChamplainEmbed
+  (in-module "Gtk")
   (parent "GtkAlignment")
-  (c-name "ChamplainViewEmbed")
-  (gtype-id "CHAMPLAIN_TYPE_VIEW_EMBED")
+  (c-name "GtkChamplainEmbed")
+  (gtype-id "GTK_TYPE_CHAMPLAIN_EMBED")
 )
 
 ;; Enumerations and flags ...
@@ -14,23 +14,48 @@
 
 
 
-;; From champlain-view-embed.h
+;; From gtk-champlain-embed.h
 
-(define-function view_embed_get_type
-  (c-name "champlain_view_embed_get_type")
+(define-function gtk_champlain_embed_get_type
+  (c-name "gtk_champlain_embed_get_type")
   (return-type "GType")
 )
 
+(define-function gtk_champlain_embed_new
+  (c-name "gtk_champlain_embed_new")
+  (is-constructor-of "GtkChamplainEmbed")
+  (return-type "GtkWidget*")
+  (parameters
+  )
+)
+
+(define-method get_view
+  (of-object "GtkChamplainEmbed")
+  (c-name "gtk_champlain_embed_get_view")
+  (return-type "ChamplainView*")
+)
+
 (define-method embed_new
   (of-object "ChamplainView")
   (c-name "champlain_view_embed_new")
   (return-type "GtkWidget*")
 )
 
-(define-method get_view
-  (of-object "ChamplainViewEmbed")
+(define-function view_embed_get_view
   (c-name "champlain_view_embed_get_view")
   (return-type "ChamplainView*")
+  (parameters
+    '("GtkChamplainEmbed*" "embed")
+  )
+)
+
+(define-function view_embed_set_view
+  (c-name "champlain_view_embed_set_view")
+  (return-type "none")
+  (parameters
+    '("GtkChamplainEmbed*" "embed")
+    '("ChamplainView*" "view")
+  )
 )
 
 
diff --git a/bindings/python/champlain/pychamplain.defs b/bindings/python/champlain/pychamplain.defs
index f17236c..7a27fab 100644
--- a/bindings/python/champlain/pychamplain.defs
+++ b/bindings/python/champlain/pychamplain.defs
@@ -49,6 +49,13 @@
   (gtype-id "CHAMPLAIN_TYPE_NETWORK_MAP_SOURCE")
 )
 
+(define-object Polygon
+  (in-module "Champlain")
+  (parent "GObject")
+  (c-name "ChamplainPolygon")
+  (gtype-id "CHAMPLAIN_TYPE_POLYGON")
+)
+
 (define-object Tile
   (in-module "Champlain")
   (parent "GObject")
@@ -116,6 +123,11 @@
   (return-type "GType")
 )
 
+(define-function cache_dup_default
+  (c-name "champlain_cache_dup_default")
+  (return-type "ChamplainCache*")
+)
+
 (define-function cache_get_default
   (c-name "champlain_cache_get_default")
   (return-type "ChamplainCache*")
@@ -375,12 +387,250 @@
   )
 )
 
+(define-method get_zoom_level
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_zoom_level")
+  (return-type "gint")
+)
+
+(define-method get_min_zoom_level
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_min_zoom_level")
+  (return-type "gint")
+)
+
+(define-method get_max_zoom_level
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_max_zoom_level")
+  (return-type "gint")
+)
+
+(define-method get_map_source
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_map_source")
+  (return-type "ChamplainMapSource*")
+)
+
+(define-method get_decel_rate
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_decel_rate")
+  (return-type "gdouble")
+)
+
+(define-method get_scroll_mode
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_scroll_mode")
+  (return-type "ChamplainScrollMode")
+)
+
+(define-method get_keep_center_on_resize
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_keep_center_on_resize")
+  (return-type "gboolean")
+)
+
+(define-method get_show_license
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_show_license")
+  (return-type "gboolean")
+)
+
+(define-method get_zoom_on_double_click
+  (of-object "ChamplainView")
+  (c-name "champlain_view_get_zoom_on_double_click")
+  (return-type "gboolean")
+)
+
+(define-method add_polygon
+  (of-object "ChamplainView")
+  (c-name "champlain_view_add_polygon")
+  (return-type "none")
+  (parameters
+    '("ChamplainPolygon*" "polygon")
+  )
+)
+
+(define-method remove_polygon
+  (of-object "ChamplainView")
+  (c-name "champlain_view_remove_polygon")
+  (return-type "none")
+  (parameters
+    '("ChamplainPolygon*" "polygon")
+  )
+)
+
 
 
 ;; From champlain-defines.h
 
 
 
+;; From champlain-polygon.h
+
+(define-function polygon_get_type
+  (c-name "champlain_polygon_get_type")
+  (return-type "GType")
+)
+
+(define-function polygon_new
+  (c-name "champlain_polygon_new")
+  (is-constructor-of "ChamplainPolygon")
+  (return-type "ChamplainPolygon*")
+)
+
+(define-method append_point
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_append_point")
+  (return-type "ChamplainPoint*")
+  (parameters
+    '("gdouble" "lat")
+    '("gdouble" "lon")
+  )
+)
+
+(define-method insert_point
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_insert_point")
+  (return-type "ChamplainPoint*")
+  (parameters
+    '("gdouble" "lat")
+    '("gdouble" "lon")
+    '("gint" "pos")
+  )
+)
+
+(define-method clear_points
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_clear_points")
+  (return-type "none")
+)
+
+(define-method get_points
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_get_points")
+  (return-type "GList*")
+)
+
+(define-method set_fill_color
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_set_fill_color")
+  (return-type "none")
+  (parameters
+    '("const-ClutterColor*" "color")
+  )
+)
+
+(define-method set_stroke_color
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_set_stroke_color")
+  (return-type "none")
+  (parameters
+    '("const-ClutterColor*" "color")
+  )
+)
+
+(define-method get_fill_color
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_get_fill_color")
+  (return-type "ClutterColor*")
+)
+
+(define-method get_stroke_color
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_get_stroke_color")
+  (return-type "ClutterColor*")
+)
+
+(define-method get_fill
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_get_fill")
+  (return-type "gboolean")
+)
+
+(define-method set_fill
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_set_fill")
+  (return-type "none")
+  (parameters
+    '("gboolean" "value")
+  )
+)
+
+(define-method get_stroke
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_get_stroke")
+  (return-type "gboolean")
+)
+
+(define-method set_stroke
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_set_stroke")
+  (return-type "none")
+  (parameters
+    '("gboolean" "value")
+  )
+)
+
+(define-method set_stroke_width
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_set_stroke_width")
+  (return-type "none")
+  (parameters
+    '("gdouble" "value")
+  )
+)
+
+(define-method get_stroke_width
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_get_stroke_width")
+  (return-type "gdouble")
+)
+
+(define-method show
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_show")
+  (return-type "none")
+)
+
+(define-method hide
+  (of-object "ChamplainPolygon")
+  (c-name "champlain_polygon_hide")
+  (return-type "none")
+)
+
+
+
+;; From champlain-point.h
+
+(define-function point_get_type
+  (c-name "champlain_point_get_type")
+  (return-type "GType")
+)
+
+(define-method copy
+  (of-object "ChamplainPoint")
+  (c-name "champlain_point_copy")
+  (return-type "ChamplainPoint*")
+)
+
+(define-method free
+  (of-object "ChamplainPoint")
+  (c-name "champlain_point_free")
+  (return-type "none")
+)
+
+(define-function point_new
+  (c-name "champlain_point_new")
+  (is-constructor-of "ChamplainPoint")
+  (return-type "ChamplainPoint*")
+  (parameters
+    '("gdouble" "lat")
+    '("gdouble" "lon")
+  )
+)
+
+
+
 ;; From champlain-layer.h
 
 (define-function layer_get_type
@@ -567,6 +817,29 @@
 
 ;; From champlain-map-source-desc.h
 
+(define-function map_source_desc_get_type
+  (c-name "champlain_map_source_desc_get_type")
+  (return-type "GType")
+)
+
+(define-method copy
+  (of-object "ChamplainMapSourceDesc")
+  (c-name "champlain_map_source_desc_copy")
+  (return-type "ChamplainMapSourceDesc*")
+)
+
+(define-method free
+  (of-object "ChamplainMapSourceDesc")
+  (c-name "champlain_map_source_desc_free")
+  (return-type "none")
+)
+
+(define-function map_source_desc_new
+  (c-name "champlain_map_source_desc_new")
+  (is-constructor-of "ChamplainMapSourceDesc")
+  (return-type "ChamplainMapSourceDesc*")
+)
+
 
 
 ;; From champlain-map-source-factory.h
@@ -576,11 +849,22 @@
   (return-type "GType")
 )
 
+(define-function map_source_factory_dup_default
+  (c-name "champlain_map_source_factory_dup_default")
+  (return-type "ChamplainMapSourceFactory*")
+)
+
 (define-function map_source_factory_get_default
   (c-name "champlain_map_source_factory_get_default")
   (return-type "ChamplainMapSourceFactory*")
 )
 
+(define-method dup_list
+  (of-object "ChamplainMapSourceFactory")
+  (c-name "champlain_map_source_factory_dup_list")
+  (return-type "GSList*")
+)
+
 (define-method get_list
   (of-object "ChamplainMapSourceFactory")
   (c-name "champlain_map_source_factory_get_list")
@@ -602,6 +886,8 @@
   (return-type "gboolean")
   (parameters
     '("ChamplainMapSourceDesc*" "desc")
+    '("ChamplainMapSourceConstructor" "constructor")
+    '("gpointer" "user_data")
   )
 )
 
@@ -824,7 +1110,7 @@
   (c-name "champlain_marker_set_draw_background")
   (return-type "none")
   (parameters
-    '("gboolean" "wrap")
+    '("gboolean" "background")
   )
 )
 
diff --git a/bindings/python/champlain/pychamplain.override b/bindings/python/champlain/pychamplain.override
index dcb4cd7..2523834 100644
--- a/bindings/python/champlain/pychamplain.override
+++ b/bindings/python/champlain/pychamplain.override
@@ -19,14 +19,20 @@ ignore-glob
 %%
 ignore
 	champlain_zoom_level_set_actor
+	// deprecated methods
+	champlain_cache_get_default
+	champlain_map_source_factory_get_default
+	champlain_map_source_factory_get_list
+	champlain_network_map_source_fill_tile
+
 %%
-override champlain_map_source_factory_get_list kwargs
+override champlain_map_source_factory_dup_list kwargs
 static PyObject *
-_wrap_champlain_map_source_factory_get_list(PyGObject *self) {
+_wrap_champlain_map_source_factory_dup_list(PyGObject *self) {
 	GSList *iter, *list;
 	PyObject *ret;
 
-	list = champlain_map_source_factory_get_list(CHAMPLAIN_MAP_SOURCE_FACTORY(self->obj));
+	list = champlain_map_source_factory_dup_list(CHAMPLAIN_MAP_SOURCE_FACTORY(self->obj));
 	
 	ret = PyList_New(0);
 	for(iter = list; iter != NULL; iter = iter->next) {
diff --git a/bindings/python/update-binding.sh b/bindings/python/update-binding.sh
index 0e79f2b..ba0accd 100755
--- a/bindings/python/update-binding.sh
+++ b/bindings/python/update-binding.sh
@@ -9,6 +9,8 @@ python /usr/share/pygobject/2.0/codegen/h2def.py	\
 	champlain-cache.h			\
 	champlain-view.h			\
 	champlain-defines.h			\
+	champlain-polygon.h			\
+	champlain-point.h			\
 	champlain-layer.h			\
 	champlain-map-source.h			\
 	champlain-map-source-desc.h		\
@@ -25,7 +27,7 @@ cd ../champlain-gtk
 python /usr/share/pygobject/2.0/codegen/h2def.py	\
 	-m champlain				\
 	champlain-gtk.h				\
-	champlain-view-embed.h			\
+	gtk-champlain-embed.h			\
  > ../bindings/python/champlain-gtk/pychamplaingtk.defs
 
 # Keep original version



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