[libchamplain: 1/3] champlain_renderer_set_data: use guint8, not gchar
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain: 1/3] champlain_renderer_set_data: use guint8, not gchar
- Date: Sat, 26 Jan 2019 21:31:35 +0000 (UTC)
commit 0ecfc2f8686345e610fdda673648bf9765fd646a
Author: James Westman <flyingpimonster flyingpimonster net>
Date: Mon Jan 21 12:09:04 2019 -0600
champlain_renderer_set_data: use guint8, not gchar
This makes the function properly introspectable in languages like Vala,
since they no longer think the argument is a null-terminated string.
Fixes #42.
champlain-gtk/champlain-gtk-0.12.vapi | 1 +
champlain/champlain-0.12.vapi | 165 +++++++++++++++++++++++--
champlain/champlain-error-tile-renderer.c | 4 +-
champlain/champlain-file-cache.c | 2 +-
champlain/champlain-file-tile-source.c | 2 +-
champlain/champlain-image-renderer.c | 4 +-
champlain/champlain-memory-cache.c | 2 +-
champlain/champlain-network-bbox-tile-source.c | 2 +-
champlain/champlain-network-tile-source.c | 2 +-
champlain/champlain-renderer.c | 4 +-
champlain/champlain-renderer.h | 4 +-
11 files changed, 172 insertions(+), 20 deletions(-)
---
diff --git a/champlain-gtk/champlain-gtk-0.12.vapi b/champlain-gtk/champlain-gtk-0.12.vapi
index befa4af..1a35aa1 100644
--- a/champlain-gtk/champlain-gtk-0.12.vapi
+++ b/champlain-gtk/champlain-gtk-0.12.vapi
@@ -3,6 +3,7 @@
[CCode (cprefix = "GtkChamplain", gir_namespace = "GtkChamplain", gir_version = "0.12", lower_case_cprefix =
"gtk_champlain_")]
namespace GtkChamplain {
[CCode (cheader_filename = "champlain-gtk/champlain-gtk.h", type_id = "gtk_champlain_embed_get_type
()")]
+ [Version (since = "0.4")]
public class Embed : Gtk.Alignment, Atk.Implementor, Gtk.Buildable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public Embed ();
diff --git a/champlain/champlain-0.12.vapi b/champlain/champlain-0.12.vapi
index 73b3dc6..ed2a6ed 100644
--- a/champlain/champlain-0.12.vapi
+++ b/champlain/champlain-0.12.vapi
@@ -24,6 +24,7 @@ namespace Champlain {
}
[CCode (cheader_filename = "champlain/champlain.h", copy_function = "g_boxed_copy", free_function =
"g_boxed_free", type_id = "champlain_bounding_box_get_type ()")]
[Compact]
+ [Version (since = "0.6")]
public class BoundingBox {
public double bottom;
public double left;
@@ -31,15 +32,20 @@ namespace Champlain {
public double top;
[CCode (has_construct_function = false)]
public BoundingBox ();
+ [Version (since = "0.10")]
public void compose (Champlain.BoundingBox other);
public Champlain.BoundingBox copy ();
+ [Version (since = "0.12.4")]
public bool covers (double latitude, double longitude);
+ [Version (since = "0.10")]
public void extend (double latitude, double longitude);
public void free ();
public void get_center (out double latitude, out double longitude);
+ [Version (since = "0.10")]
public bool is_valid ();
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_coordinate_get_type ()")]
+ [Version (since = "0.10")]
public class Coordinate : GLib.InitiallyUnowned, Champlain.Location {
[CCode (has_construct_function = false)]
public Coordinate ();
@@ -47,12 +53,13 @@ namespace Champlain {
public Coordinate.full (double latitude, double longitude);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_custom_marker_get_type ()")]
- [Deprecated (since = "0.12.4")]
+ [Version (deprecated = true, deprecated_since = "0.12.4", since = "0.10")]
public class CustomMarker : Champlain.Marker, Atk.Implementor, Champlain.Location,
Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterActor*")]
public CustomMarker ();
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_error_tile_renderer_get_type
()")]
+ [Version (since = "0.8")]
public class ErrorTileRenderer : Champlain.Renderer {
[CCode (has_construct_function = false)]
public ErrorTileRenderer (uint tile_size);
@@ -61,20 +68,28 @@ namespace Champlain {
public uint tile_size { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_file_cache_get_type ()")]
+ [Version (since = "0.6")]
public class FileCache : Champlain.TileCache {
[CCode (has_construct_function = false)]
protected FileCache ();
[CCode (has_construct_function = false)]
+ [Version (since = "0.8")]
public FileCache.full (uint size_limit, string? cache_dir, Champlain.Renderer renderer);
public unowned string get_cache_dir ();
+ [Version (since = "0.4")]
public uint get_size_limit ();
+ [Version (since = "0.4")]
public void purge ();
+ [Version (since = "0.4")]
public void purge_on_idle ();
+ [Version (since = "0.4")]
public void set_size_limit (uint size_limit);
public string cache_dir { get; construct; }
+ [Version (since = "0.4")]
public uint size_limit { get; set construct; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_file_tile_source_get_type
()")]
+ [Version (since = "0.8")]
public class FileTileSource : Champlain.TileSource {
[CCode (has_construct_function = false)]
protected FileTileSource ();
@@ -83,6 +98,7 @@ namespace Champlain {
public void load_map_data (string map_path);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_image_renderer_get_type ()")]
+ [Version (since = "0.8")]
public class ImageRenderer : Champlain.Renderer {
[CCode (has_construct_function = false)]
public ImageRenderer ();
@@ -101,6 +117,7 @@ namespace Champlain {
public signal void panning_completed ();
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_label_get_type ()")]
+ [Version (since = "0.10")]
public class Label : Champlain.Marker, Atk.Implementor, Champlain.Location, Clutter.Animatable,
Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterActor*")]
public Label ();
@@ -112,6 +129,7 @@ namespace Champlain {
public Pango.AttrList get_attributes ();
public Clutter.Color? get_color ();
public bool get_draw_background ();
+ [Version (since = "0.12.10")]
public bool get_draw_shadow ();
public Pango.EllipsizeMode get_ellipsize ();
public unowned string get_font_name ();
@@ -126,6 +144,7 @@ namespace Champlain {
public void set_attributes (Pango.AttrList list);
public void set_color (Clutter.Color? color);
public void set_draw_background (bool background);
+ [Version (since = "0.12.10")]
public void set_draw_shadow (bool shadow);
public void set_ellipsize (Pango.EllipsizeMode mode);
public void set_font_name (string? font_name);
@@ -143,6 +162,7 @@ namespace Champlain {
public Pango.Alignment alignment { get; set; }
public Clutter.Color color { get; set; }
public bool draw_background { get; set; }
+ [Version (since = "0.12.10")]
public bool draw_shadow { get; set; }
public Pango.EllipsizeMode ellipsize { get; set; }
public string font_name { get; set; }
@@ -155,6 +175,7 @@ namespace Champlain {
public Pango.WrapMode wrap_mode { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_layer_get_type ()")]
+ [Version (since = "0.10")]
public abstract class Layer : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container,
Clutter.Scriptable {
[CCode (has_construct_function = false)]
protected Layer ();
@@ -162,6 +183,7 @@ namespace Champlain {
public virtual void set_view (Champlain.View view);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_license_get_type ()")]
+ [Version (since = "0.10")]
public class License : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container,
Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterActor*")]
public License ();
@@ -175,6 +197,7 @@ namespace Champlain {
public string extra_text { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_map_source_get_type ()")]
+ [Version (since = "0.4")]
public abstract class MapSource : GLib.InitiallyUnowned {
[CCode (has_construct_function = false)]
protected MapSource ();
@@ -186,22 +209,30 @@ namespace Champlain {
public virtual unowned string get_license_uri ();
public double get_longitude (uint zoom_level, double x);
public virtual uint get_max_zoom_level ();
+ [Version (since = "0.4.3")]
public double get_meters_per_pixel (uint zoom_level, double latitude, double longitude);
public virtual uint get_min_zoom_level ();
public virtual unowned string get_name ();
+ [Version (since = "0.6")]
public unowned Champlain.MapSource get_next_source ();
public virtual Champlain.MapProjection get_projection ();
+ [Version (since = "0.8")]
public unowned Champlain.Renderer get_renderer ();
public uint get_row_count (uint zoom_level);
public virtual uint get_tile_size ();
public double get_x (uint zoom_level, double longitude);
public double get_y (uint zoom_level, double latitude);
+ [Version (since = "0.6")]
public void set_next_source (Champlain.MapSource next_source);
+ [Version (since = "0.8")]
public void set_renderer (Champlain.Renderer renderer);
+ [Version (since = "0.6")]
public Champlain.MapSource next_source { get; set; }
+ [Version (since = "0.8")]
public Champlain.Renderer renderer { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_map_source_chain_get_type
()")]
+ [Version (since = "0.6")]
public class MapSourceChain : Champlain.MapSource {
[CCode (has_construct_function = false)]
public MapSourceChain ();
@@ -209,6 +240,7 @@ namespace Champlain {
public void push (Champlain.MapSource map_source);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_map_source_desc_get_type
()")]
+ [Version (since = "0.10")]
public class MapSourceDesc : GLib.Object {
[CCode (has_construct_function = false)]
protected MapSourceDesc ();
@@ -236,20 +268,27 @@ namespace Champlain {
public string uri_format { get; construct; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_map_source_factory_get_type
()")]
+ [Version (since = "0.4")]
public class MapSourceFactory : GLib.Object {
[CCode (has_construct_function = false)]
protected MapSourceFactory ();
public unowned Champlain.MapSource create (string id);
+ [Version (since = "0.6")]
public unowned Champlain.MapSource create_cached_source (string id);
+ [Version (since = "0.8")]
public unowned Champlain.MapSource create_error_source (uint tile_size);
+ [Version (since = "0.12.5")]
public unowned Champlain.MapSource create_memcached_source (string id);
public static Champlain.MapSourceFactory dup_default ();
public GLib.SList<weak Champlain.MapSourceDesc> get_registered ();
+ [Version (since = "0.10")]
public bool register (Champlain.MapSourceDesc desc);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_marker_get_type ()")]
+ [Version (since = "0.10")]
public class Marker : Clutter.Actor, Atk.Implementor, Champlain.Location, Clutter.Animatable,
Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Version (since = "0.12.4")]
public Marker ();
public void animate_in ();
public void animate_in_with_delay (uint delay);
@@ -274,6 +313,7 @@ namespace Champlain {
public signal void drag_motion (double dx, double dy, Clutter.Event event);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_marker_layer_get_type ()")]
+ [Version (since = "0.10")]
public class MarkerLayer : Champlain.Layer, Atk.Implementor, Champlain.Exportable,
Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false)]
public MarkerLayer ();
@@ -297,6 +337,7 @@ namespace Champlain {
public Champlain.SelectionMode selection_mode { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_memory_cache_get_type ()")]
+ [Version (since = "0.8")]
public class MemoryCache : Champlain.TileCache {
[CCode (has_construct_function = false)]
protected MemoryCache ();
@@ -308,44 +349,60 @@ namespace Champlain {
public uint size_limit { get; set construct; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id =
"champlain_network_bbox_tile_source_get_type ()")]
+ [Version (since = "0.8")]
public class NetworkBboxTileSource : Champlain.TileSource {
[CCode (has_construct_function = false)]
protected NetworkBboxTileSource ();
[CCode (has_construct_function = false)]
public NetworkBboxTileSource.full (string id, string name, string license, string
license_uri, uint min_zoom, uint max_zoom, uint tile_size, Champlain.MapProjection projection,
Champlain.Renderer renderer);
public unowned string get_api_uri ();
+ [Version (since = "0.10")]
public void load_map_data (Champlain.BoundingBox bbox);
public void set_api_uri (string api_uri);
+ [Version (since = "0.12.16")]
public void set_user_agent (string user_agent);
public string api_uri { get; set; }
[NoAccessorMethod]
public string proxy_uri { owned get; set; }
[NoAccessorMethod]
public Champlain.State state { get; set; }
+ [Version (since = "0.12.16")]
public string user_agent { set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_network_tile_source_get_type
()")]
+ [Version (since = "0.6")]
public class NetworkTileSource : Champlain.TileSource {
[CCode (has_construct_function = false)]
protected NetworkTileSource ();
[CCode (has_construct_function = false)]
+ [Version (since = "0.4")]
public NetworkTileSource.full (string id, string name, string license, string license_uri,
uint min_zoom, uint max_zoom, uint tile_size, Champlain.MapProjection projection, string uri_format,
Champlain.Renderer renderer);
+ [Version (since = "0.12.14")]
public int get_max_conns ();
public bool get_offline ();
public unowned string get_proxy_uri ();
public unowned string get_uri_format ();
+ [Version (since = "0.12.14")]
public void set_max_conns (int max_conns);
public void set_offline (bool offline);
public void set_proxy_uri (string proxy_uri);
+ [Version (since = "0.4")]
public void set_uri_format (string uri_format);
+ [Version (since = "0.12.16")]
public void set_user_agent (string user_agent);
+ [Version (since = "0.12.14")]
public int max_conns { get; set; }
+ [Version (since = "0.4")]
public bool offline { get; set; }
+ [Version (since = "0.4")]
public string proxy_uri { get; set; }
+ [Version (since = "0.4")]
public string uri_format { get; set construct; }
+ [Version (since = "0.12.16")]
public string user_agent { set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_null_tile_source_get_type
()")]
+ [Version (since = "0.8")]
public class NullTileSource : Champlain.TileSource {
[CCode (has_construct_function = false)]
protected NullTileSource ();
@@ -353,11 +410,13 @@ namespace Champlain {
public NullTileSource.full (Champlain.Renderer renderer);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_path_layer_get_type ()")]
+ [Version (since = "0.10")]
public class PathLayer : Champlain.Layer, Atk.Implementor, Champlain.Exportable, Clutter.Animatable,
Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false)]
public PathLayer ();
public void add_node (Champlain.Location location);
public bool get_closed ();
+ [Version (since = "0.12.4")]
public GLib.List<weak uint> get_dash ();
public bool get_fill ();
public Clutter.Color? get_fill_color ();
@@ -370,6 +429,7 @@ namespace Champlain {
public void remove_all ();
public void remove_node (Champlain.Location location);
public void set_closed (bool value);
+ [Version (since = "0.12.4")]
public void set_dash (GLib.List<uint> dash_pattern);
public void set_fill (bool value);
public void set_fill_color (Clutter.Color? color);
@@ -386,6 +446,7 @@ namespace Champlain {
public bool visible { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_point_get_type ()")]
+ [Version (since = "0.10")]
public class Point : Champlain.Marker, Atk.Implementor, Champlain.Exportable, Champlain.Location,
Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterActor*")]
public Point ();
@@ -399,13 +460,15 @@ namespace Champlain {
public double size { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_renderer_get_type ()")]
+ [Version (since = "0.8")]
public class Renderer : GLib.InitiallyUnowned {
[CCode (has_construct_function = false)]
protected Renderer ();
public virtual void render (Champlain.Tile tile);
- public virtual void set_data (string data, uint size);
+ public virtual void set_data ([CCode (array_length_cname = "size", array_length_pos = 1.1,
array_length_type = "guint")] uint8[] data);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_scale_get_type ()")]
+ [Version (since = "0.10")]
public class Scale : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container,
Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterActor*")]
public Scale ();
@@ -419,14 +482,17 @@ namespace Champlain {
public Champlain.Unit unit { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_tile_get_type ()")]
+ [Version (since = "0.4")]
public class Tile : Clutter.Actor, Atk.Implementor, Champlain.Exportable, Clutter.Animatable,
Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false)]
public Tile ();
+ [Version (since = "0.8")]
public void display_content ();
[CCode (has_construct_function = false)]
public Tile.full (uint x, uint y, uint size, uint zoom_level);
public unowned Clutter.Actor get_content ();
public unowned string get_etag ();
+ [Version (since = "0.6")]
public bool get_fade_in ();
public unowned GLib.TimeVal? get_modified_time ();
public uint get_size ();
@@ -436,6 +502,7 @@ namespace Champlain {
public uint get_zoom_level ();
public void set_content (Clutter.Actor actor);
public void set_etag (string etag);
+ [Version (since = "0.6")]
public void set_fade_in (bool fade_in);
public void set_modified_time (GLib.TimeVal time);
public void set_size (uint size);
@@ -445,15 +512,18 @@ namespace Champlain {
public void set_zoom_level (uint zoom_level);
public Clutter.Actor content { get; set; }
public string etag { get; set; }
+ [Version (since = "0.6")]
public bool fade_in { get; set; }
public uint size { get; set; }
public Champlain.State state { get; set; }
public uint x { get; set; }
public uint y { get; set; }
public uint zoom_level { get; set; }
+ [Version (since = "0.10")]
public signal void render_complete (void* data, uint size, bool error);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_tile_cache_get_type ()")]
+ [Version (since = "0.6")]
public abstract class TileCache : Champlain.MapSource {
[CCode (has_construct_function = false)]
protected TileCache ();
@@ -462,115 +532,188 @@ namespace Champlain {
public virtual void store_tile (Champlain.Tile tile, string contents, size_t size);
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_tile_source_get_type ()")]
+ [Version (since = "0.6")]
public abstract class TileSource : Champlain.MapSource {
[CCode (has_construct_function = false)]
protected TileSource ();
public unowned Champlain.TileCache get_cache ();
public void set_cache (Champlain.TileCache cache);
+ [Version (since = "0.4")]
public void set_id (string id);
+ [Version (since = "0.4")]
public void set_license (string license);
+ [Version (since = "0.4")]
public void set_license_uri (string license_uri);
public void set_max_zoom_level (uint zoom_level);
public void set_min_zoom_level (uint zoom_level);
+ [Version (since = "0.4")]
public void set_name (string name);
+ [Version (since = "0.4")]
public void set_projection (Champlain.MapProjection projection);
public void set_tile_size (uint tile_size);
public Champlain.TileCache cache { get; set; }
[NoAccessorMethod]
+ [Version (since = "0.4")]
public string id { owned get; set construct; }
[NoAccessorMethod]
+ [Version (since = "0.4")]
public string license { owned get; set construct; }
[NoAccessorMethod]
+ [Version (since = "0.4")]
public string license_uri { owned get; set construct; }
[NoAccessorMethod]
+ [Version (since = "0.4")]
public uint max_zoom_level { get; set construct; }
[NoAccessorMethod]
+ [Version (since = "0.4")]
public uint min_zoom_level { get; set construct; }
[NoAccessorMethod]
+ [Version (since = "0.4")]
public string name { owned get; set construct; }
[NoAccessorMethod]
+ [Version (since = "0.4")]
public Champlain.MapProjection projection { get; set construct; }
[NoAccessorMethod]
+ [Version (since = "0.4")]
public uint tile_size { get; set construct; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_view_get_type ()")]
+ [Version (since = "0.1")]
public class View : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container,
Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterActor*")]
+ [Version (since = "0.4")]
public View ();
+ [Version (since = "0.2")]
public void add_layer (Champlain.Layer layer);
+ [Version (since = "0.12.5")]
public void add_overlay_source (Champlain.MapSource map_source, uint8 opacity);
- [Deprecated (since = "0.12.4")]
+ [Version (deprecated = true, deprecated_since = "0.12.4", since = "0.10")]
public void bin_layout_add (Clutter.Actor child, Clutter.BinAlignment x_align,
Clutter.BinAlignment y_align);
public void center_on (double latitude, double longitude);
+ [Version (since = "0.10")]
public void ensure_layers_visible (bool animate);
+ [Version (since = "0.10")]
public void ensure_visible (Champlain.BoundingBox bbox, bool animate);
+ [Version (since = "0.12")]
public bool get_animate_zoom ();
+ [Version (since = "0.12.4")]
public unowned Clutter.Content get_background_pattern ();
+ [Version (since = "0.12.4")]
public Champlain.BoundingBox get_bounding_box ();
+ [Version (since = "0.12.6")]
public Champlain.BoundingBox get_bounding_box_for_zoom_level (uint zoom_level);
+ [Version (since = "0.10")]
public double get_center_latitude ();
+ [Version (since = "0.10")]
public double get_center_longitude ();
+ [Version (since = "0.4")]
public double get_deceleration ();
public bool get_horizontal_wrap ();
+ [Version (since = "0.4")]
public bool get_keep_center_on_resize ();
+ [Version (since = "0.10")]
public bool get_kinetic_mode ();
+ [Version (since = "0.10")]
public unowned Champlain.License get_license_actor ();
+ [Version (since = "0.4")]
public unowned Champlain.MapSource get_map_source ();
+ [Version (since = "0.4")]
public uint get_max_zoom_level ();
+ [Version (since = "0.4")]
public uint get_min_zoom_level ();
+ [Version (since = "0.12.5")]
public GLib.List<weak Champlain.MapSource> get_overlay_sources ();
+ [Version (since = "0.10")]
public Champlain.State get_state ();
+ [Version (since = "0.12.14")]
public void get_viewport_anchor (out int anchor_x, out int anchor_y);
+ [Version (since = "0.10")]
public void get_viewport_origin (out int x, out int y);
+ [Version (since = "0.12.11")]
public unowned Champlain.BoundingBox get_world ();
+ [Version (since = "0.4")]
public uint get_zoom_level ();
+ [Version (since = "0.4")]
public bool get_zoom_on_double_click ();
+ [Version (since = "0.4")]
public void go_to (double latitude, double longitude);
+ [Version (since = "0.10")]
public double latitude_to_y (double latitude);
+ [Version (since = "0.10")]
public double longitude_to_x (double longitude);
+ [Version (since = "0.8")]
public void reload_tiles ();
+ [Version (since = "0.4.1")]
public void remove_layer (Champlain.Layer layer);
+ [Version (since = "0.12.5")]
public void remove_overlay_source (Champlain.MapSource map_source);
+ [Version (since = "0.12")]
public void set_animate_zoom (bool value);
+ [Version (since = "0.12.4")]
public void set_background_pattern (Clutter.Content background);
+ [Version (since = "0.4")]
public void set_deceleration (double rate);
public void set_horizontal_wrap (bool wrap);
+ [Version (since = "0.4")]
public void set_keep_center_on_resize (bool value);
+ [Version (since = "0.10")]
public void set_kinetic_mode (bool kinetic);
+ [Version (since = "0.4")]
public void set_map_source (Champlain.MapSource map_source);
+ [Version (since = "0.4")]
public void set_max_zoom_level (uint zoom_level);
+ [Version (since = "0.4")]
public void set_min_zoom_level (uint zoom_level);
+ [Version (since = "0.12.11")]
public void set_world (Champlain.BoundingBox bbox);
+ [Version (since = "0.4")]
public void set_zoom_level (uint zoom_level);
+ [Version (since = "0.4")]
public void set_zoom_on_double_click (bool value);
+ [Version (since = "0.4")]
public void stop_go_to ();
public Cairo.Surface to_surface (bool include_layers);
+ [Version (since = "0.10")]
public double x_to_longitude (double x);
+ [Version (since = "0.10")]
public double y_to_latitude (double y);
public void zoom_in ();
public void zoom_out ();
+ [Version (since = "0.12")]
public bool animate_zoom { get; set; }
+ [Version (since = "0.12.4")]
public Clutter.Actor background_pattern { get; set; }
+ [Version (since = "0.10")]
public double deceleration { get; set; }
[NoAccessorMethod]
public uint goto_animation_duration { get; set; }
[NoAccessorMethod]
public Clutter.AnimationMode goto_animation_mode { get; set; }
public bool horizontal_wrap { get; set; }
+ [Version (since = "0.2.7")]
public bool keep_center_on_resize { get; set; }
+ [Version (since = "0.10")]
public bool kinetic_mode { get; set; }
[NoAccessorMethod]
public double latitude { get; set; }
[NoAccessorMethod]
public double longitude { get; set; }
+ [Version (since = "0.2")]
public Champlain.MapSource map_source { get; set; }
+ [Version (since = "0.4")]
public uint max_zoom_level { get; set; }
+ [Version (since = "0.4")]
public uint min_zoom_level { get; set; }
+ [Version (since = "0.4")]
public Champlain.State state { get; }
+ [Version (since = "0.12.11")]
public Champlain.BoundingBox world { get; set; }
public uint zoom_level { get; set; }
+ [Version (since = "0.4")]
public bool zoom_on_double_click { get; set; }
+ [Version (since = "0.4")]
public signal void animation_completed ();
+ [Version (since = "0.10")]
public signal void layer_relocated ();
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_viewport_get_type ()")]
@@ -597,18 +740,26 @@ namespace Champlain {
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_exportable_get_type ()")]
public interface Exportable : GLib.Object {
+ [Version (since = "0.12.12")]
public abstract unowned Cairo.Surface get_surface ();
+ [Version (since = "0.12.12")]
public abstract void set_surface (Cairo.Surface surface);
+ [Version (since = "0.12.12")]
public abstract Cairo.Surface surface { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_location_get_type ()")]
public interface Location : GLib.Object {
+ [Version (since = "0.10")]
public abstract double get_latitude ();
+ [Version (since = "0.10")]
public abstract double get_longitude ();
+ [Version (since = "0.10")]
public abstract void set_location (double latitude, double longitude);
[NoAccessorMethod]
+ [Version (since = "0.10")]
public abstract double latitude { get; set; }
[NoAccessorMethod]
+ [Version (since = "0.10")]
public abstract double longitude { get; set; }
}
[CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_MAP_PROJECTION_", type_id =
"champlain_map_projection_get_type ()")]
@@ -642,20 +793,20 @@ namespace Champlain {
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_MFF_RELIEF")]
public const string MAP_SOURCE_MFF_RELIEF;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OAM")]
- [Deprecated]
+ [Version (deprecated = true)]
public const string MAP_SOURCE_OAM;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_AERIAL_MAP")]
- [Deprecated]
+ [Version (deprecated = true)]
public const string MAP_SOURCE_OSM_AERIAL_MAP;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP")]
public const string MAP_SOURCE_OSM_CYCLE_MAP;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK")]
public const string MAP_SOURCE_OSM_MAPNIK;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST")]
- [Deprecated]
+ [Version (deprecated = true)]
public const string MAP_SOURCE_OSM_MAPQUEST;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER")]
- [Deprecated]
+ [Version (deprecated = true)]
public const string MAP_SOURCE_OSM_OSMARENDER;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP")]
public const string MAP_SOURCE_OSM_TRANSPORT_MAP;
diff --git a/champlain/champlain-error-tile-renderer.c b/champlain/champlain-error-tile-renderer.c
index 10fbc9b..b70d38d 100644
--- a/champlain/champlain-error-tile-renderer.c
+++ b/champlain/champlain-error-tile-renderer.c
@@ -46,7 +46,7 @@ enum
static void set_data (ChamplainRenderer *renderer,
- const gchar *data,
+ const guint8 *data,
guint size);
static void render (ChamplainRenderer *renderer,
ChamplainTile *tile);
@@ -180,7 +180,7 @@ champlain_error_tile_renderer_new (guint tile_size)
static void
-set_data (ChamplainRenderer *renderer, const gchar *data, guint size)
+set_data (ChamplainRenderer *renderer, const guint8 *data, guint size)
{
/* always render the error tile no matter what data is set */
}
diff --git a/champlain/champlain-file-cache.c b/champlain/champlain-file-cache.c
index d567ec1..6e7ff27 100644
--- a/champlain/champlain-file-cache.c
+++ b/champlain/champlain-file-cache.c
@@ -656,7 +656,7 @@ file_loaded_cb (GFile *file,
g_signal_connect (tile, "render-complete", G_CALLBACK (tile_rendered_cb), user_data);
- champlain_renderer_set_data (renderer, contents, length);
+ champlain_renderer_set_data (renderer, (guint8*) contents, length);
g_free (contents);
champlain_renderer_render (renderer, tile);
}
diff --git a/champlain/champlain-file-tile-source.c b/champlain/champlain-file-tile-source.c
index 4ebdbf2..18e36ad 100644
--- a/champlain/champlain-file-tile-source.c
+++ b/champlain/champlain-file-tile-source.c
@@ -144,7 +144,7 @@ champlain_file_tile_source_load_map_data (ChamplainFileTileSource *self,
}
renderer = champlain_map_source_get_renderer (CHAMPLAIN_MAP_SOURCE (self));
- champlain_renderer_set_data (renderer, data, length);
+ champlain_renderer_set_data (renderer, (guint8*) data, length);
g_free (data);
}
diff --git a/champlain/champlain-image-renderer.c b/champlain/champlain-image-renderer.c
index 3694e0c..9a59dce 100644
--- a/champlain/champlain-image-renderer.c
+++ b/champlain/champlain-image-renderer.c
@@ -50,7 +50,7 @@ struct _RendererData
};
static void set_data (ChamplainRenderer *renderer,
- const gchar *data,
+ const guint8 *data,
guint size);
static void render (ChamplainRenderer *renderer,
ChamplainTile *tile);
@@ -118,7 +118,7 @@ champlain_image_renderer_new (void)
static void
-set_data (ChamplainRenderer *renderer, const gchar *data, guint size)
+set_data (ChamplainRenderer *renderer, const guint8 *data, guint size)
{
ChamplainImageRendererPrivate *priv = GET_PRIVATE (renderer);
diff --git a/champlain/champlain-memory-cache.c b/champlain/champlain-memory-cache.c
index af23ccf..754a730 100644
--- a/champlain/champlain-memory-cache.c
+++ b/champlain/champlain-memory-cache.c
@@ -358,7 +358,7 @@ fill_tile (ChamplainMapSource *map_source,
g_signal_connect (tile, "render-complete", G_CALLBACK (tile_rendered_cb), map_source);
- champlain_renderer_set_data (renderer, member->data, member->size);
+ champlain_renderer_set_data (renderer, (guint8*) member->data, member->size);
champlain_renderer_render (renderer, tile);
return;
diff --git a/champlain/champlain-network-bbox-tile-source.c b/champlain/champlain-network-bbox-tile-source.c
index c8b7f0b..7726cf3 100644
--- a/champlain/champlain-network-bbox-tile-source.c
+++ b/champlain/champlain-network-bbox-tile-source.c
@@ -339,7 +339,7 @@ load_map_data_cb (G_GNUC_UNUSED SoupSession *session, SoupMessage *msg,
g_object_set (G_OBJECT (self), "state", CHAMPLAIN_STATE_DONE, NULL);
renderer = champlain_map_source_get_renderer (CHAMPLAIN_MAP_SOURCE (self));
- champlain_renderer_set_data (renderer, msg->response_body->data, msg->response_body->length);
+ champlain_renderer_set_data (renderer, (guint8*) msg->response_body->data, msg->response_body->length);
}
diff --git a/champlain/champlain-network-tile-source.c b/champlain/champlain-network-tile-source.c
index 1376225..b3d35d0 100644
--- a/champlain/champlain-network-tile-source.c
+++ b/champlain/champlain-network-tile-source.c
@@ -765,7 +765,7 @@ tile_loaded_cb (G_GNUC_UNUSED SoupSession *session,
g_signal_connect (tile, "render-complete", G_CALLBACK (tile_rendered_cb), data);
- champlain_renderer_set_data (renderer, msg->response_body->data, msg->response_body->length);
+ champlain_renderer_set_data (renderer, (guint8*) msg->response_body->data, msg->response_body->length);
champlain_renderer_render (renderer, tile);
return;
diff --git a/champlain/champlain-renderer.c b/champlain/champlain-renderer.c
index 2f64949..c3ba180 100644
--- a/champlain/champlain-renderer.c
+++ b/champlain/champlain-renderer.c
@@ -58,7 +58,7 @@ champlain_renderer_class_init (ChamplainRendererClass *klass)
/**
* champlain_renderer_set_data:
* @renderer: a #ChamplainRenderer
- * @data: data used for tile rendering
+ * @data: (array length=size): data used for tile rendering
* @size: size of the data in bytes
*
* Sets the data which is used to render tiles by the renderer.
@@ -67,7 +67,7 @@ champlain_renderer_class_init (ChamplainRendererClass *klass)
*/
void
champlain_renderer_set_data (ChamplainRenderer *renderer,
- const gchar *data,
+ const guint8 *data,
guint size)
{
g_return_if_fail (CHAMPLAIN_IS_RENDERER (renderer));
diff --git a/champlain/champlain-renderer.h b/champlain/champlain-renderer.h
index 14fd3eb..6200b54 100644
--- a/champlain/champlain-renderer.h
+++ b/champlain/champlain-renderer.h
@@ -66,7 +66,7 @@ struct _ChamplainRendererClass
GInitiallyUnownedClass parent_class;
void (*set_data)(ChamplainRenderer *renderer,
- const gchar *data,
+ const guint8 *data,
guint size);
void (*render)(ChamplainRenderer *renderer,
ChamplainTile *tile);
@@ -75,7 +75,7 @@ struct _ChamplainRendererClass
GType champlain_renderer_get_type (void);
void champlain_renderer_set_data (ChamplainRenderer *renderer,
- const gchar *data,
+ const guint8 *data,
guint size);
void champlain_renderer_render (ChamplainRenderer *renderer,
ChamplainTile *tile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]