]> err.no Git - libchamplain/commitdiff
Sync with last champlain api
authorVictor Poluceno <victorpoluceno@gmail.com>
Sat, 13 Jun 2009 21:06:45 +0000 (18:06 -0300)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sun, 14 Jun 2009 15:41:37 +0000 (11:41 -0400)
bindings/python/champlain-gtk/pychamplaingtk.defs
bindings/python/champlain/pychamplain.defs
bindings/python/champlain/pychamplain.override
bindings/python/update-binding.sh

index 865a1d1acc06fc6bbe676f1dff6e32185d3e3a0f..c84b776438ac5000cfce658b0568c757d6924dd6 100644 (file)
@@ -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 ...
 
 
 
-;; 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")
+  )
 )
 
 
index f17236c5d5af1f175f9cf308286c5a8d3bba59ed..7a27fab3d817b6b8caaddac3a9eeafc20d7324af 100644 (file)
   (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")
   (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*")
   )
 )
 
+(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
 
 ;; 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
   (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")
   (return-type "gboolean")
   (parameters
     '("ChamplainMapSourceDesc*" "desc")
+    '("ChamplainMapSourceConstructor" "constructor")
+    '("gpointer" "user_data")
   )
 )
 
   (c-name "champlain_marker_set_draw_background")
   (return-type "none")
   (parameters
-    '("gboolean" "wrap")
+    '("gboolean" "background")
   )
 )
 
index dcb4cd7cd74d90f5f1280d20a1a99a9f96deae90..2523834261072dc853e9c063d3c753d4475a7888 100644 (file)
@@ -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) {
index 0e79f2be00385ed3f8a7788b400306cbc7024f3e..ba0accd36952263588591016b2d13037f9e5a0b5 100755 (executable)
@@ -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