On 04/26/2011 02:22 PM, Christian Krause wrote: > Hi, > > On 04/25/2011 02:00 PM, Michael Schwendt wrote: >> Package gpx-viewer in Fedora 15 has been retired by fab >> Package gpx-viewer in Fedora 14 has been retired by fab >> Package gpx-viewer in Fedora 13 has been retired by fab > >> Please complete the package end-of-life procedure, > > I have just started to use gpx-viewer. ;-) I know that it is not too > stable, but according to its bzr repository the author still submit > patches occasionally... Attached to this email is a patch against the bzr trunk that gets the code building and running on gtk3 + champlain-0.10 + unique-3.0 + gdl-3.0. Note that the resulting program is not by any means stable, but this should be a good start for someone who wanted to take care of getting this thing running again. ~tom == Fedora Project
diff -up gpx-viewer/configure.ac.BAD gpx-viewer/configure.ac --- gpx-viewer/configure.ac.BAD 2011-04-26 23:05:24.134955686 -0400 +++ gpx-viewer/configure.ac 2011-04-26 23:07:57.321809095 -0400 @@ -36,23 +36,23 @@ PKG_PROG_PKG_CONFIG PKG_CHECK_MODULES([gtk],[ - gtk+-2.0 >= 2.16 + gtk+-3.0 >= 2.16 gmodule-2.0 ]) PKG_CHECK_MODULES([libxml], [ libxml-2.0 ]) PKG_CHECK_MODULES([libgdl], [ - gdl-1.0 + gdl-3.0 ]) PKG_CHECK_MODULES([champlain], [ - champlain-gtk-0.8 >= 0.8.0 - champlain-0.8 >= 0.8.0 + champlain-gtk-0.10 >= 0.8.0 + champlain-0.10 >= 0.8.0 ]) # Check for unique. This is optional. PKG_CHECK_MODULES([unique], - [unique-1.0], + [unique-3.0], [ have_unique="yes" AC_DEFINE(HAVE_UNIQUE,1,[unique support enabled])], diff -up gpx-viewer/Makefile.am.BAD gpx-viewer/Makefile.am --- gpx-viewer/Makefile.am.BAD 2011-04-26 23:06:03.044042441 -0400 +++ gpx-viewer/Makefile.am 2011-04-26 23:08:17.836475154 -0400 @@ -51,7 +51,7 @@ gpx_viewer_SOURCES=\ src/gpx-viewer.c -gpx_viewer_VALAFLAGS= --pkg=config --pkg=unique-1.0 --pkg=clutter-1.0 --pkg=gtk+-2.0 --pkg=libxml-2.0 --pkg=champlain-0.8 --pkg=gpx-viewer --pkg=champlain-gtk-0.8 --basedir=$(top_builddir)/src --vapidir=$(top_srcdir)/vapi -H $(top_builddir)/src/gpx.h --use-header +gpx_viewer_VALAFLAGS= --pkg=config --pkg=unique-3.0 --pkg=clutter-1.0 --pkg=gtk+-3.0 --pkg=libxml-2.0 --pkg=champlain-0.10 --pkg=gpx-viewer --pkg=champlain-gtk-0.10 --basedir=$(top_builddir)/src --vapidir=$(top_srcdir)/vapi -H $(top_builddir)/src/gpx.h --use-header LIBS=\ @gtk_LIBS@\ diff -up gpx-viewer/manager/Makefile.BAD gpx-viewer/manager/Makefile --- gpx-viewer/manager/Makefile.BAD 2011-04-26 23:02:11.545756298 -0400 +++ gpx-viewer/manager/Makefile 2011-04-26 23:02:45.527567801 -0400 @@ -16,13 +16,13 @@ LIBS= # # GTk Dependencies # -GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0 ) -GTK_LIBS=$(shell pkg-config --libs gtk+-2.0 ) +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-3.0 ) +GTK_LIBS=$(shell pkg-config --libs gtk+-3.0 ) ifeq ($(GTK_CFLAGS),) -$(error Failed to find Gtk+-2.0) +$(error Failed to find Gtk+-3.0) else -$(info Found Gtk+-2.0) +$(info Found Gtk+-3.0) endif CFLAGS+=$(GTK_CFLAGS) @@ -113,7 +113,7 @@ $(SOURCE_DIR): $(SOURCE_DIR)/%.c: %.vala $(VALA_SOURCES) $(info Parsing '$^' int '$@') - $(QUIET)$(VALAC) -C $^ --pkg=cairo --pkg=gio-2.0 --pkg=gtk+-2.0 --pkg=libxml-2.0 --vapidir=./vapi/ -b $(SOURCE_DIR) + $(QUIET)$(VALAC) -C $^ --pkg=cairo --pkg=gtk+-3.0 --pkg=libxml-2.0 --vapidir=./vapi/ -b $(SOURCE_DIR) $(PROGRAM): $(OBJ_DIR_FILES) $(info Linking '$^' into '$@') diff -up gpx-viewer/src/gpx-graph.vala.BAD gpx-viewer/src/gpx-graph.vala --- gpx-viewer/src/gpx-graph.vala.BAD 2011-04-26 23:11:51.075595973 -0400 +++ gpx-viewer/src/gpx-graph.vala 2011-04-26 23:45:43.503848159 -0400 @@ -21,6 +21,7 @@ using Gtk; using Gpx; using Gpx.Viewer; using GLib; +using Cairo; using Config; static const string LOG_DOMAIN="GPX_GRAPH"; @@ -149,7 +150,7 @@ namespace Gpx this.motion_notify_event.connect(motion_notify_event_cb); this.button_release_event.connect(button_release_event_cb); - this.expose_event.connect(a_expose_event); + this.draw.connect(a_expose_event); } public void set_track(Gpx.Track? track) @@ -178,12 +179,13 @@ namespace Gpx */ private Gpx.Point? get_point_from_position(double x, double y) { - + Gtk.Allocation allocation; if(this.track == null) return null; - if(x > LEFT_OFFSET && x < (this.allocation.width-10)) + this.get_allocation(out allocation); + if(x > LEFT_OFFSET && x < (allocation.width-10)) { double elapsed_time = track.get_total_time(); - time_t time = (time_t)((x-LEFT_OFFSET)/(this.allocation.width-10-LEFT_OFFSET)*elapsed_time); + time_t time = (time_t)((x-LEFT_OFFSET)/(allocation.width-10-LEFT_OFFSET)*elapsed_time); weak List<Point?> iter = this.track.points.first(); /* calculated time is offset from start time, get real time */ time += iter.data.get_time(); @@ -278,29 +280,28 @@ namespace Gpx private Gpx.Point start = null; private Gpx.Point stop = null; - bool a_expose_event(Gdk.EventExpose event) + private bool a_expose_event(Gtk.Widget widget, Context ctx) { - var ctx = Gdk.cairo_create(this.window); + Gtk.Allocation allocation; + Gdk.Window* my_window = this.get_window(); /* If no valid surface, render it */ if(surf == null) update_surface(this); /* Draw the actual surface on the widget */ - ctx.set_source_surface(this.surf, 0, 0); - Gdk.cairo_region(ctx, event.region); - ctx.clip(); ctx.paint(); ctx.translate(LEFT_OFFSET,20); /* Draw selection, if available */ + this.get_allocation(out allocation); if(start != null && stop != null) { if(start.get_time() != stop.get_time()) { Gpx.Point f = this.track.points.first().data; double elapsed_time = track.get_total_time(); - double graph_width = this.allocation.width-LEFT_OFFSET-10; - double graph_height = this.allocation.height-20-BOTTOM_OFFSET; + double graph_width = allocation.width-LEFT_OFFSET-10; + double graph_height = allocation.height-20-BOTTOM_OFFSET; ctx.set_source_rgba(0.3, 0.2, 0.3, 0.8); ctx.rectangle((start.get_time()-f.get_time())/elapsed_time*graph_width, 0, @@ -314,8 +315,8 @@ namespace Gpx { Gpx.Point f = this.track.points.first().data; double elapsed_time = track.get_total_time(); - double graph_width = this.allocation.width-LEFT_OFFSET-10; - double graph_height = this.allocation.height-20-BOTTOM_OFFSET; + double graph_width = allocation.width-LEFT_OFFSET-10; + double graph_height = allocation.height-20-BOTTOM_OFFSET; double hl = (highlight-f.get_time())/elapsed_time*graph_width; @@ -375,10 +376,13 @@ namespace Gpx } private void update_surface(Gtk.Widget win) { - var ctx = Gdk.cairo_create(win.window); + Gtk.Allocation allocation; + win.get_allocation(out allocation); + Gdk.Window* my_window = win.get_window(); + var ctx = Gdk.cairo_create(my_window); this.surf = new Cairo.Surface.similar(ctx.get_target(), Cairo.Content.COLOR_ALPHA, - win.allocation.width, win.allocation.height); + allocation.width, allocation.height); ctx = new Cairo.Context(this.surf); log(LOG_DOMAIN, LogLevelFlags.LEVEL_DEBUG, "Updating surface"); @@ -477,8 +481,8 @@ namespace Gpx Point f = track.points.data; /* Draw Grid */ - double graph_width = win.allocation.width-LEFT_OFFSET-10; - double graph_height = win.allocation.height-20-BOTTOM_OFFSET; + double graph_width = allocation.width-LEFT_OFFSET-10; + double graph_height = allocation.height-20-BOTTOM_OFFSET; if(graph_height < 50 ) return; var layout = Pango.cairo_create_layout(ctx); double j =0.0; diff -up gpx-viewer/src/gpx-parser.vala.BAD gpx-viewer/src/gpx-parser.vala --- gpx-viewer/src/gpx-parser.vala.BAD 2011-04-26 23:09:45.588260773 -0400 +++ gpx-viewer/src/gpx-parser.vala 2011-04-26 23:11:00.251341692 -0400 @@ -462,8 +462,8 @@ namespace Gpx if(lat != null && lon != null) { Point p = new Point(); - double flat = lat.to_double(); - double flon = lon.to_double(); + double flat = double.parse(lat); + double flon = double.parse(lon); p.set_position(flat, flon); var info = point->children; while(info != null) @@ -473,7 +473,7 @@ namespace Gpx { var content = info->get_content(); if(content != null) - p.elevation = content.to_double(); + p.elevation = double.parse(content); } else if (info->name == "time") { @@ -517,8 +517,8 @@ namespace Gpx if(lat != null && lon != null) { Point p = new Point(); - double flat = lat.to_double(); - double flon = lon.to_double(); + double flat = double.parse(lat); + double flon = double.parse(lon); p.set_position(flat, flon); var info = node->children; while(info != null) @@ -556,8 +556,8 @@ namespace Gpx if(lat != null && lon != null) { Point p = new Point(); - double flat = lat.to_double(); - double flon = lon.to_double(); + double flat = double.parse(lat); + double flon = double.parse(lon); p.set_position(flat, flon); var info = trkseg->children; while(info != null) @@ -567,7 +567,7 @@ namespace Gpx { var content = info->get_content(); if(content != null) - p.elevation = content.to_double(); + p.elevation = double.parse(content); } else if (info->name == "time") { diff -up gpx-viewer/src/gpx-viewer.c.BAD gpx-viewer/src/gpx-viewer.c --- gpx-viewer/src/gpx-viewer.c.BAD 2011-04-27 13:22:55.411393942 -0400 +++ gpx-viewer/src/gpx-viewer.c 2011-04-27 16:22:19.153468687 -0400 @@ -81,9 +81,9 @@ typedef struct Route { GpxFile *file; GpxTrack *track; - ChamplainPolygon *polygon; - ChamplainBaseMarker *start; - ChamplainBaseMarker *stop; + ChamplainPathLayer *polygon; + ChamplainMarker *start; + ChamplainMarker *stop; gboolean visible; } Route; @@ -455,6 +455,16 @@ static void interface_update_heading(Gtk } } +static void +append_point (ChamplainMarkerLayer *layer, gdouble lon, gdouble lat) +{ + ClutterActor *point; + static ClutterColor color = { 0xa4, 0x00, 0x00, 0xff }; + + point = champlain_point_new_full (10, &color); + champlain_location_set_location (CHAMPLAIN_LOCATION (point), lon, lat); + champlain_marker_layer_add_marker (layer, CHAMPLAIN_MARKER (point)); +} /** * Creates a Polygon for Route, and adds it to the view @@ -468,16 +478,16 @@ static void interface_map_plot_route(Cha g_warning("Route allready has a polygon.\n"); return; } - route->polygon = champlain_polygon_new(); + route->polygon = champlain_marker_layer_new_full (CHAMPLAIN_SELECTION_NONE); for (iter = g_list_first(route->track->points); iter; iter = iter->next) { GpxPoint *p = iter->data; - champlain_polygon_append_point(route->polygon, p->lat_dec, p->lon_dec); + append_point(route->polygon, p->lat_dec, p->lon_dec); } - champlain_polygon_set_stroke_width(route->polygon, 4.0); - champlain_polygon_set_stroke_color(route->polygon, &normal_track_color); - champlain_view_add_polygon(CHAMPLAIN_VIEW(view), route->polygon); - if(!route->visible) champlain_polygon_hide(route->polygon); + champlain_path_layer_set_stroke_width(route->polygon, 4.0); + champlain_path_layer_set_stroke_color(route->polygon, &normal_track_color); + champlain_view_add_layer(CHAMPLAIN_VIEW(view), route->polygon); + champlain_path_layer_set_visible(route->polygon, route->visible); } @@ -540,7 +550,7 @@ void routes_list_changed_cb(GtkTreeSelec if (active_route) { /* Give it ' non-active' colour */ - champlain_polygon_set_stroke_color(active_route->polygon, &normal_track_color); + champlain_path_layer_set_stroke_color(active_route->polygon, &normal_track_color); /* Hide stop marker */ if(active_route->stop) clutter_actor_hide(CLUTTER_ACTOR(active_route->stop)); @@ -555,30 +565,33 @@ void routes_list_changed_cb(GtkTreeSelec gpx_graph_set_track(gpx_graph, NULL); /* Hide graph */ gtk_widget_hide(GTK_WIDGET(gpx_graph_container)); - /* if not visible hide track again */ - if(!active_route->visible) { - champlain_polygon_hide(route->polygon); - } + /* if not visible hide track again */ + champlain_path_layer_set_visible(route->polygon, active_route->visible); } active_route = route; if (route) { ChamplainView *view = gtk_champlain_embed_get_view(GTK_CHAMPLAIN_EMBED(champlain_view)); + ChamplainBoundingBox *bbox = champlain_bounding_box_new(); gpx_playback_set_track(playback, active_route->track); if(route->polygon != NULL) - champlain_polygon_set_stroke_color(route->polygon, &highlight_track_color); + champlain_path_layer_set_stroke_color(route->polygon, &highlight_track_color); /* if (route->visible) */ { - champlain_polygon_show(route->polygon); + champlain_path_layer_set_visible(route->polygon, route->visible); } if (route->track->top && route->track->bottom) { - champlain_view_ensure_visible(view, - route->track->top->lat_dec, route->track->top->lon_dec, - route->track->bottom->lat_dec, route->track->bottom->lon_dec, FALSE); + /* Setup bbox */ + bbox->left = route->track->top->lon_dec; + bbox->right = route->track->top->lon_dec; + bbox->bottom = route->track->bottom->lat_dec; + bbox->top = route->track->bottom->lat_dec; + + champlain_view_ensure_visible(view, bbox, FALSE); } if (gpx_track_get_total_time(active_route->track) > 5) @@ -696,12 +709,12 @@ static void graph_selection_changed(GpxG { if(start) { - champlain_base_marker_set_position(CHAMPLAIN_BASE_MARKER(active_route->start), start->lat_dec, start->lon_dec); + champlain_location_set_location(CHAMPLAIN_LOCATION(active_route->start), start->lat_dec, start->lon_dec); } if(stop) { - champlain_base_marker_set_position(CHAMPLAIN_BASE_MARKER(active_route->stop), stop->lat_dec, stop->lon_dec); + champlain_location_set_location(CHAMPLAIN_LOCATION(active_route->stop), stop->lat_dec, stop->lon_dec); } } } @@ -710,7 +723,7 @@ static void graph_selection_changed(GpxG static void graph_point_clicked(GpxGraph *graph, GpxPoint *point) { ChamplainView *view = gtk_champlain_embed_get_view(GTK_CHAMPLAIN_EMBED(champlain_view)); - ChamplainBaseMarker *marker[2] = {NULL, NULL}; + ChamplainMarker *marker[2] = {NULL, NULL}; gpx_viewer_map_view_click_marker_show(GPX_VIEWER_MAP_VIEW(champlain_view), point); if(click_marker_source >0) @@ -861,20 +874,20 @@ static void interface_plot_add_track(Gtk const gchar *path2 = gtk_icon_info_get_filename(ii); if (path2) { - route->start = (ChamplainBaseMarker *)champlain_marker_new_from_file(path2, NULL); - champlain_marker_set_draw_background(CHAMPLAIN_MARKER(route->start), FALSE); + route->start = champlain_label_new_from_file(path2, NULL); + champlain_label_set_draw_background(CHAMPLAIN_LABEL(route->start), FALSE); } gtk_icon_info_free(ii); } if (!route->start) { - route->start = (ChamplainBaseMarker *)champlain_marker_new(); + route->start = champlain_label_new(); } /* Create the marker */ - champlain_base_marker_set_position(CHAMPLAIN_BASE_MARKER(route->start), + champlain_location_set_location(CHAMPLAIN_LOCATION(route->start), ((GpxPoint*)start->data)->lat_dec, ((GpxPoint*)start->data)->lon_dec); - champlain_marker_set_color(CHAMPLAIN_MARKER(route->start), &waypoint); + champlain_label_set_color(CHAMPLAIN_LABEL(route->start), &waypoint); gpx_viewer_map_view_add_marker(GPX_VIEWER_MAP_VIEW(champlain_view), route->start); ii = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), @@ -885,20 +898,20 @@ static void interface_plot_add_track(Gtk const gchar *path2 = gtk_icon_info_get_filename(ii); if (path2) { - route->stop = (ChamplainBaseMarker *)champlain_marker_new_from_file(path2, NULL); - champlain_marker_set_draw_background(CHAMPLAIN_MARKER(route->stop), FALSE); + route->stop = champlain_label_new_from_file(path2, NULL); + champlain_label_set_draw_background(CHAMPLAIN_LABEL(route->stop), FALSE); } gtk_icon_info_free(ii); } if (!route->stop) { - route->stop = (ChamplainBaseMarker *)champlain_marker_new(); + route->stop = champlain_label_new(); } /* Create the marker */ - champlain_base_marker_set_position(CHAMPLAIN_BASE_MARKER(route->stop), + champlain_location_set_location(CHAMPLAIN_LOCATION(route->stop), stop->lat_dec, stop->lon_dec); - champlain_marker_set_color(CHAMPLAIN_MARKER(route->stop), &waypoint); + champlain_label_set_color(CHAMPLAIN_LABEL(route->stop), &waypoint); gpx_viewer_map_view_add_marker(GPX_VIEWER_MAP_VIEW(champlain_view), route->stop); clutter_actor_hide(CLUTTER_ACTOR(route->stop)); @@ -954,14 +967,7 @@ void row_visible_toggled(GtkCellRenderer gboolean active = !gtk_cell_renderer_toggle_get_active(toggle); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, 3, active, -1); route->visible = active; - if (active) - { - champlain_polygon_show(route->polygon); - } - else - { - champlain_polygon_hide(route->polygon); - } + champlain_path_layer_set_visible(route->polygon, active); } } } @@ -1068,20 +1074,20 @@ static void interface_create_fake_master const gchar *path2 = gtk_icon_info_get_filename(ii); if (path2) { - route->start = (ChamplainBaseMarker *)champlain_marker_new_from_file(path2, NULL); - champlain_marker_set_draw_background(CHAMPLAIN_MARKER(route->start), FALSE); + route->start = champlain_label_new_from_file(path2, NULL); + champlain_label_set_draw_background(CHAMPLAIN_LABEL(route->start), FALSE); } gtk_icon_info_free(ii); } if (!route->start) { - route->start = (ChamplainBaseMarker *)champlain_marker_new(); + route->start = champlain_label_new(); } /* Create the marker */ - champlain_base_marker_set_position(CHAMPLAIN_BASE_MARKER(route->start), + champlain_location_set_location(CHAMPLAIN_LOCATION(route->start), ((GpxPoint*)start->data)->lat_dec, ((GpxPoint*)start->data)->lon_dec); - champlain_marker_set_color(CHAMPLAIN_MARKER(route->start), &waypoint); + champlain_label_set_color(CHAMPLAIN_LABEL(route->start), &waypoint); gpx_viewer_map_view_add_marker(GPX_VIEWER_MAP_VIEW(champlain_view), route->start); ii = gtk_icon_theme_lookup_icon(gtk_icon_theme_get_default(), @@ -1092,20 +1098,20 @@ static void interface_create_fake_master const gchar *path2 = gtk_icon_info_get_filename(ii); if (path2) { - route->stop = (ChamplainBaseMarker *)champlain_marker_new_from_file(path2, NULL); - champlain_marker_set_draw_background(CHAMPLAIN_MARKER(route->stop), FALSE); + route->stop = champlain_label_new_from_file(path2, NULL); + champlain_label_set_draw_background(CHAMPLAIN_LABEL(route->stop), FALSE); } gtk_icon_info_free(ii); } if (!route->stop) { - route->stop = (ChamplainBaseMarker *)champlain_marker_new(); + route->stop = champlain_label_new(); } /* Create the marker */ - champlain_base_marker_set_position(CHAMPLAIN_BASE_MARKER(route->stop), + champlain_location_set_location(CHAMPLAIN_LOCATION(route->stop), (stop)->lat_dec, (stop)->lon_dec); - champlain_marker_set_color(CHAMPLAIN_MARKER(route->stop), &waypoint); + champlain_label_set_color(CHAMPLAIN_LABEL(route->stop), &waypoint); gpx_viewer_map_view_add_marker(GPX_VIEWER_MAP_VIEW(champlain_view), route->stop); clutter_actor_hide(CLUTTER_ACTOR(route->stop)); @@ -1378,6 +1384,7 @@ static void create_interface(void) int pos; gint w,h; GtkRecentFilter *grf; + ChamplainBoundingBox *bbox = champlain_bounding_box_new (); /* Open UI description file */ builder = gtk_builder_new(); @@ -1580,11 +1587,22 @@ static void create_interface(void) /* Try to center the track on map correctly */ if (lon1 < 1000.0 && lon2 < 1000.0) { + /* Setup bbox */ + bbox->left = lon1; + bbox->right = lon2; + bbox->bottom = lat1; + bbox->top = lat2; + champlain_view_set_zoom_level(view, 15); - champlain_view_ensure_visible(view, lat1, lon1, lat2, lon2, FALSE); + champlain_view_ensure_visible(view, bbox, FALSE); } } +static gboolean create_interface_wrapper() +{ + create_interface(); + return FALSE; +} void open_gpx_file(GtkMenu *item) { @@ -1757,7 +1775,6 @@ int main(int argc, char **argv) bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); - gtk_set_locale(); /* Setup the commandline parser */ context = g_option_context_new( @@ -1858,7 +1875,7 @@ int main(int argc, char **argv) G_CALLBACK(route_playback_state_changed), NULL); /* Create the interface on main loop begin */ - gtk_init_add((GtkFunction)create_interface,NULL); + g_idle_add((GSourceFunc)create_interface_wrapper,NULL); /* Start the main loop */ gtk_main(); diff -up gpx-viewer/src/gpx-viewer-mapwidget.vala.BAD gpx-viewer/src/gpx-viewer-mapwidget.vala --- gpx-viewer/src/gpx-viewer-mapwidget.vala.BAD 2011-04-26 23:56:09.104836646 -0400 +++ gpx-viewer/src/gpx-viewer-mapwidget.vala 2011-04-27 13:12:25.159175565 -0400 @@ -33,7 +33,7 @@ namespace Gpx private Clutter.Color waypoint_color; /* Marker */ - private Champlain.Marker click_marker = null; + private Champlain.Label click_marker = null; /** * Show marker at Point @@ -49,7 +49,13 @@ namespace Gpx { var path = info.get_filename(); if(path != null){ - click_marker = new Champlain.Marker.from_file(path); + try + { + click_marker = new Champlain.Label.from_file(path); + } + catch (GLib.Error err) { + warning ("%s", err.message); + } click_marker.draw_background = false; } } @@ -59,14 +65,14 @@ namespace Gpx } - click_marker.set_position((float)p.lat_dec,(float)p.lon_dec); + click_marker.set_location(p.lat_dec,p.lon_dec); click_marker.show(); } public void click_marker_ensure_visible() { if(click_marker != null) { - Champlain.BaseMarker[2]? marker = {click_marker, null}; - this.view.ensure_markers_visible(marker,false); + Champlain.Marker[2]? marker = {click_marker, null}; + this.view.ensure_layers_visible(false); } } public void click_marker_hide() @@ -77,7 +83,7 @@ namespace Gpx /* Waypoint layer */ - private Champlain.Layer waypoint_layer = new Champlain.Layer(); + private Champlain.MarkerLayer waypoint_layer = new Champlain.MarkerLayer(); private bool _show_waypoints = false; public bool show_waypoints { get { return _show_waypoints;} @@ -93,12 +99,12 @@ namespace Gpx public void add_waypoint(Gpx.Point p) { - Champlain.Marker marker = new Marker.with_text(p.name, "Serif 12", null, waypoint_color); - marker.set_position(p.lat_dec, p.lon_dec); - waypoint_layer.add(marker); + Champlain.Label marker = new Champlain.Label.with_text(p.name, "Serif 12", null, waypoint_color); + marker.set_location(p.lat_dec, p.lon_dec); + waypoint_layer.add_marker(marker); } /* Marker layer */ - private Champlain.Layer marker_layer = new Champlain.Layer(); + private Champlain.MarkerLayer marker_layer = new Champlain.MarkerLayer(); private bool _show_markers = false; public bool show_markers { @@ -112,9 +118,9 @@ namespace Gpx } } - public void add_marker(BaseMarker marker) + public void add_marker(Marker marker) { - marker_layer.add(marker); + marker_layer.add_marker(marker); } @@ -147,13 +153,11 @@ namespace Gpx /* Do default setup of the view. */ /* We want kinetic scroling. */ - view.scroll_mode = Champlain.ScrollMode.KINETIC; - /* We do want to show the scale */ - view.show_scale = true; + view.set_kinetic_mode(true); /* Create a ListStore with all the available maps. Used for selectors */ - var fact= Champlain.MapSourceFactory.dup_default(); - var l = fact.dup_list(); + var fact = Champlain.MapSourceFactory.dup_default(); + var l = fact.get_registered(); foreach(weak MapSourceDesc a in l) { Gtk.TreeIter iter; @@ -182,14 +186,12 @@ namespace Gpx { if(event.button == 2 || event.button == 3) { - double lat,lon; + double lat = view.y_to_latitude(event.y); + double lon = view.x_to_longitude(event.x); unowned Clutter.Event e = Clutter.get_current_event(); - if(view.get_coords_from_event(e, out lat, out lon)) - { - clicked(lat,lon); - stdout.printf("button release event: %f %f\n",lat,lon); - return true; - } + clicked(lat,lon); + stdout.printf("button release event: %f %f\n",lat,lon); + return true; } return false; } @@ -233,7 +235,7 @@ namespace Gpx * * Fired when the zoomlevel changed. */ - signal void zoom_level_changed(int zoom, int min_zoom, int max_zoom); + signal void zoom_level_changed(uint zoom, uint min_zoom, uint max_zoom); } diff -up gpx-viewer/vapi/champlain-0.10.vapi.BAD gpx-viewer/vapi/champlain-0.10.vapi --- gpx-viewer/vapi/champlain-0.10.vapi.BAD 2011-04-27 16:31:36.931016304 -0400 +++ gpx-viewer/vapi/champlain-0.10.vapi 2011-04-27 12:45:33.867229039 -0400 @@ -0,0 +1,754 @@ +/* champlain-0.10.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Champlain", lower_case_cprefix = "champlain_", gir_namespace = "Champlain", gir_version = "0.10")] +namespace Champlain { + [CCode (cheader_filename = "champlain/champlain.h")] + public class Adjustment : GLib.Object { + public Champlain.AdjustmentPrivate priv; + [CCode (has_construct_function = false)] + public Adjustment (double value, double lower, double upper, double step_increment, double page_increment, double page_size); + public bool clamp (bool interpolate, uint n_frames, uint fps); + public bool get_elastic (); + public double get_value (); + public void get_values (double value, double lower, double upper, double step_increment, double page_increment, double page_size); + public void interpolate (double value, uint n_frames, uint fps); + public void interpolate_stop (); + public void set_elastic (bool elastic); + public void set_value (double value); + public void set_values (double value, double lower, double upper, double step_increment, double page_increment, double page_size); + public bool elastic { get; set; } + [NoAccessorMethod] + public double lower { get; set; } + [NoAccessorMethod] + public double page_increment { get; set; } + [NoAccessorMethod] + public double page_size { get; set; } + [NoAccessorMethod] + public double step_increment { get; set; } + [NoAccessorMethod] + public double upper { get; set; } + public double value { get; set; } + public virtual signal void changed (); + } + [Compact] + [CCode (copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "champlain_bounding_box_get_type ()", cheader_filename = "champlain/champlain.h")] + public class BoundingBox { + public double bottom; + public double left; + public double right; + public double top; + public void compose (Champlain.BoundingBox other); + public Champlain.BoundingBox copy (); + public void extend (double latitude, double longitude); + public void free (); + public void get_center (out double latitude, out double longitude); + public bool is_valid (); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Coordinate : GLib.InitiallyUnowned, Champlain.Location { + public Champlain.CoordinatePrivate priv; + [CCode (has_construct_function = false)] + public Coordinate (); + [CCode (has_construct_function = false)] + public Coordinate.full (double latitude, double longitude); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class CustomMarker : Champlain.Marker, Atk.Implementor, Champlain.Location, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { + public Champlain.CustomMarkerPrivate priv; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public CustomMarker (); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class ErrorTileRenderer : Champlain.Renderer { + public Champlain.ErrorTileRendererPrivate priv; + [CCode (has_construct_function = false)] + public ErrorTileRenderer (uint tile_size); + public uint get_tile_size (); + public void set_tile_size (uint size); + public uint tile_size { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class FileCache : Champlain.TileCache { + public Champlain.FileCachePrivate priv; + [CCode (has_construct_function = false)] + public FileCache.full (uint size_limit, string? cache_dir, Champlain.Renderer renderer); + public unowned string get_cache_dir (); + public uint get_size_limit (); + public void purge (); + public void purge_on_idle (); + public void set_size_limit (uint size_limit); + public string cache_dir { get; construct; } + public uint size_limit { get; set construct; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class FileTileSource : Champlain.TileSource { + [CCode (has_construct_function = false)] + public FileTileSource.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 void load_map_data (string map_path); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class ImageRenderer : Champlain.Renderer { + public Champlain.ImageRendererPrivate priv; + [CCode (has_construct_function = false)] + public ImageRenderer (); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class KineticScrollView : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { + public Champlain.KineticScrollViewPrivate priv; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public KineticScrollView (bool kinetic); + public void stop (); + [NoAccessorMethod] + public double decel_rate { get; set; } + [NoAccessorMethod] + public bool mode { get; set; } + [NoAccessorMethod] + public uint motion_buffer { get; set; } + public signal void panning_completed (); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Label : Champlain.Marker, Atk.Implementor, Champlain.Location, Clutter.Animatable, Clutter.Scriptable { + public Champlain.LabelPrivate priv; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Label (); + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Label.from_file (string filename) throws GLib.Error; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Label.full (string text, Clutter.Actor actor); + public Pango.Alignment get_alignment (); + public Pango.AttrList get_attributes (); + public Clutter.Color get_color (); + public bool get_draw_background (); + public Pango.EllipsizeMode get_ellipsize (); + public unowned string get_font_name (); + public unowned Clutter.Actor get_image (); + public bool get_single_line_mode (); + public unowned string get_text (); + public Clutter.Color get_text_color (); + public bool get_use_markup (); + public bool get_wrap (); + public Pango.WrapMode get_wrap_mode (); + public void set_alignment (Pango.Alignment alignment); + public void set_attributes (Pango.AttrList list); + public void set_color (Clutter.Color? color); + public void set_draw_background (bool background); + public void set_ellipsize (Pango.EllipsizeMode mode); + public void set_font_name (string? font_name); + public void set_image (Clutter.Actor? image); + public void set_single_line_mode (bool mode); + public void set_text (string text); + public void set_text_color (Clutter.Color? color); + public void set_use_markup (bool use_markup); + public void set_wrap (bool wrap); + public void set_wrap_mode (Pango.WrapMode wrap_mode); + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Label.with_image (Clutter.Actor actor); + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Label.with_text (string text, string? font, Clutter.Color? text_color, Clutter.Color? label_color); + public Pango.Alignment alignment { get; set; } + public Clutter.Color color { get; set; } + public bool draw_background { get; set; } + public Pango.EllipsizeMode ellipsize { get; set; } + public string font_name { get; set; } + public Clutter.Actor image { get; set; } + public bool single_line_mode { get; set; } + public string text { get; set; } + public Clutter.Color text_color { get; set; } + public bool use_markup { get; set; } + public bool wrap { get; set; } + public Pango.WrapMode wrap_mode { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Layer : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable { + public virtual Champlain.BoundingBox get_bounding_box (); + public virtual void set_view (Champlain.View view); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class License : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable { + public Champlain.LicensePrivate priv; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public License (); + public void connect_view (Champlain.View view); + public void disconnect_view (); + public Pango.Alignment get_alignment (); + public unowned string get_extra_text (); + public void set_alignment (Pango.Alignment alignment); + public void set_extra_text (string text); + public Pango.Alignment alignment { get; set; } + public string extra_text { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class MapSource : GLib.InitiallyUnowned { + public Champlain.MapSourcePrivate priv; + public virtual void fill_tile (Champlain.Tile tile); + public uint get_column_count (uint zoom_level); + public virtual unowned string get_id (); + public double get_latitude (uint zoom_level, double y); + public virtual unowned string get_license (); + public virtual unowned string get_license_uri (); + public double get_longitude (uint zoom_level, double x); + public virtual uint get_max_zoom_level (); + 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 (); + public unowned Champlain.MapSource get_next_source (); + public virtual Champlain.MapProjection get_projection (); + 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); + public void set_next_source (Champlain.MapSource next_source); + public void set_renderer (Champlain.Renderer renderer); + public Champlain.MapSource next_source { get; set; } + public Champlain.Renderer renderer { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class MapSourceChain : Champlain.MapSource { + public Champlain.MapSourceChainPrivate priv; + [CCode (has_construct_function = false)] + public MapSourceChain (); + public void pop (); + public void push (Champlain.MapSource map_source); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class MapSourceDesc : GLib.Object { + public Champlain.MapSourceDescPrivate priv; + public void* get_data (); + public unowned string get_id (); + public unowned string get_license (); + public unowned string get_license_uri (); + public uint get_max_zoom_level (); + public uint get_min_zoom_level (); + public unowned string get_name (); + public Champlain.MapProjection get_projection (); + public uint get_tile_size (); + public unowned string get_uri_format (); + [NoAccessorMethod] + public void* constructor { get; construct; } + public void* data { get; construct; } + public string id { get; construct; } + public string license { get; construct; } + public string license_uri { get; construct; } + public uint max_zoom_level { get; construct; } + public uint min_zoom_level { get; construct; } + public string name { get; construct; } + public uint tile_size { get; construct; } + public string uri_format { get; construct; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class MapSourceFactory : GLib.Object { + public Champlain.MapSourceFactoryPrivate priv; + public Champlain.MapSource create (string id); + public Champlain.MapSource create_cached_source (string id); + public Champlain.MapSource create_error_source (uint tile_size); + public static Champlain.MapSourceFactory dup_default (); + public GLib.SList<weak Champlain.MapSourceDesc> get_registered (); + public bool register (Champlain.MapSourceDesc desc); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Marker : Clutter.Actor, Atk.Implementor, Champlain.Location, Clutter.Animatable, Clutter.Scriptable { + public Champlain.MarkerPrivate priv; + public void animate_in (); + public void animate_in_with_delay (uint delay); + public void animate_out (); + public void animate_out_with_delay (uint delay); + public bool get_draggable (); + public bool get_selectable (); + public bool get_selected (); + public static Clutter.Color get_selection_color (); + public static Clutter.Color get_selection_text_color (); + public void set_draggable (bool value); + public void set_selectable (bool value); + public void set_selected (bool value); + public static void set_selection_color (Clutter.Color color); + public static void set_selection_text_color (Clutter.Color color); + public bool draggable { get; set; } + public bool selectable { get; set; } + public bool selected { get; set; } + public signal void button_press (Clutter.Event since); + public signal void button_release (Clutter.Event since); + public signal void drag_finish (Clutter.Event since); + public signal void drag_motion (double dy, double event, Clutter.Event since); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class MarkerLayer : Champlain.Layer, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable { + public Champlain.MarkerLayerPrivate priv; + [CCode (has_construct_function = false)] + public MarkerLayer (); + public void add_marker (Champlain.Marker marker); + public void animate_in_all_markers (); + public void animate_out_all_markers (); + [CCode (has_construct_function = false)] + public MarkerLayer.full (Champlain.SelectionMode mode); + public GLib.List<weak Champlain.Marker> get_markers (); + public GLib.List<weak Champlain.Marker> get_selected (); + public Champlain.SelectionMode get_selection_mode (); + public void hide_all_markers (); + public void remove_all (); + public void remove_marker (Champlain.Marker marker); + public void select_all_markers (); + public void set_all_markers_draggable (); + public void set_all_markers_undraggable (); + public void set_selection_mode (Champlain.SelectionMode mode); + public void show_all_markers (); + public void unselect_all_markers (); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class MemoryCache : Champlain.TileCache { + public Champlain.MemoryCachePrivate priv; + public void clean (); + [CCode (has_construct_function = false)] + public MemoryCache.full (uint size_limit, Champlain.Renderer renderer); + public uint get_size_limit (); + public void set_size_limit (uint size_limit); + public uint size_limit { get; set construct; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class MemphisRenderer : Champlain.Renderer { + public Champlain.MemphisRendererPrivate priv; + [CCode (has_construct_function = false)] + public MemphisRenderer.full (uint tile_size); + public Clutter.Color get_background_color (); + public Champlain.BoundingBox get_bounding_box (); + public GLib.List<string> get_rule_ids (); + public uint get_tile_size (); + public void load_rules (string rules_path); + public void remove_rule (string id); + public void set_background_color (Clutter.Color color); + public void set_rule (Champlain.MemphisRule rule); + public void set_tile_size (uint size); + public Champlain.BoundingBox bounding_box { get; set; } + public uint tile_size { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class NetworkBboxTileSource : Champlain.TileSource { + public Champlain.NetworkBboxTileSourcePrivate priv; + [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 (); + public void load_map_data (Champlain.BoundingBox bbox); + public void set_api_uri (string api_uri); + public string api_uri { get; set; } + [NoAccessorMethod] + public string proxy_uri { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class NetworkTileSource : Champlain.TileSource { + public Champlain.NetworkTileSourcePrivate priv; + [CCode (has_construct_function = false)] + 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); + public bool get_offline (); + public unowned string get_proxy_uri (); + public unowned string get_uri_format (); + public void set_offline (bool offline); + public void set_proxy_uri (string proxy_uri); + public void set_uri_format (string uri_format); + public bool offline { get; set; } + public string proxy_uri { get; set; } + public string uri_format { get; set construct; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class NullTileSource : Champlain.TileSource { + [CCode (has_construct_function = false)] + public NullTileSource.full (Champlain.Renderer renderer); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class PathLayer : Champlain.Layer, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable { + public Champlain.PathLayerPrivate priv; + [CCode (has_construct_function = false)] + public PathLayer (); + public void add_node (Champlain.Location location); + public bool get_closed (); + public bool get_fill (); + public Clutter.Color get_fill_color (); + public GLib.List<weak Champlain.Location> get_nodes (); + public bool get_stroke (); + public Clutter.Color get_stroke_color (); + public double get_stroke_width (); + public bool get_visible (); + public void insert_node (Champlain.Location location, uint position); + public void remove_all (); + public void remove_node (Champlain.Location location); + public void set_closed (bool value); + public void set_fill (bool value); + public void set_fill_color (Clutter.Color? color); + public void set_stroke (bool value); + public void set_stroke_color (Clutter.Color? color); + public void set_stroke_width (double value); + public void set_visible (bool value); + public bool closed { get; set; } + public bool fill { get; set; } + public Clutter.Color fill_color { get; set; } + public bool stroke { get; set; } + public Clutter.Color stroke_color { get; set; } + public double stroke_width { get; set; } + public bool visible { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Point : Champlain.Marker, Atk.Implementor, Champlain.Location, Clutter.Animatable, Clutter.Scriptable { + public Champlain.PointPrivate priv; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Point (); + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Point.full (double size, Clutter.Color color); + public Clutter.Color get_color (); + public double get_size (); + public void set_color (Clutter.Color? color); + public void set_size (double size); + public Clutter.Color color { get; set; } + public double size { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Renderer : GLib.InitiallyUnowned { + public virtual void render (Champlain.Tile tile); + public virtual void set_data (string data, uint size); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Scale : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable { + public Champlain.ScalePrivate priv; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Scale (); + public void connect_view (Champlain.View view); + public void disconnect_view (); + public uint get_max_width (); + public Champlain.Unit get_unit (); + public void set_max_width (uint value); + public void set_unit (Champlain.Unit unit); + public uint max_width { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Tile : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable { + public Champlain.TilePrivate priv; + [CCode (has_construct_function = false)] + public Tile (); + 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 (); + public bool get_fade_in (); + public GLib.TimeVal get_modified_time (); + public uint get_size (); + public Champlain.State get_state (); + public uint get_x (); + public uint get_y (); + public uint get_zoom_level (); + public void set_content (Clutter.Actor actor); + public void set_etag (string etag); + public void set_fade_in (bool fade_in); + public void set_modified_time (GLib.TimeVal time); + public void set_size (uint size); + public void set_state (Champlain.State state); + public void set_x (uint x); + public void set_y (uint y); + public void set_zoom_level (uint zoom_level); + public Clutter.Actor content { get; set; } + public string etag { get; set; } + public bool fade_in { get; set; } + public uint size { get; set; } + public uint x { get; set; } + public uint y { get; set; } + public uint zoom_level { get; set; } + public signal void render_complete (void* data, uint size, bool error); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class TileCache : Champlain.MapSource { + public Champlain.TileCachePrivate priv; + public virtual void on_tile_filled (Champlain.Tile tile); + public virtual void refresh_tile_time (Champlain.Tile tile); + public virtual void store_tile (Champlain.Tile tile, string contents, size_t size); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class TileSource : Champlain.MapSource { + public Champlain.TileSourcePrivate priv; + public unowned Champlain.TileCache get_cache (); + public void set_cache (Champlain.TileCache cache); + public void set_id (string id); + public void set_license (string license); + 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); + public void set_name (string name); + public void set_projection (Champlain.MapProjection projection); + public void set_tile_size (uint tile_size); + public Champlain.TileCache cache { get; set; } + [NoAccessorMethod] + public string id { get; set construct; } + [NoAccessorMethod] + public string license { get; set construct; } + [NoAccessorMethod] + public string license_uri { get; set construct; } + [NoAccessorMethod] + public uint max_zoom_level { get; set construct; } + [NoAccessorMethod] + public uint min_zoom_level { get; set construct; } + [NoAccessorMethod] + public string name { get; set construct; } + [NoAccessorMethod] + public uint tile_size { get; set construct; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class View : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable { + public Champlain.ViewPrivate priv; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public View (); + public void add_layer (Champlain.Layer layer); + public void bin_layout_add (Clutter.Actor child, Clutter.BinAlignment x_align, Clutter.BinAlignment y_align); + public void center_on (double latitude, double longitude); + public void ensure_layers_visible (bool animate); + public void ensure_visible (Champlain.BoundingBox bbox, bool animate); + public double get_center_latitude (); + public double get_center_longitude (); + public double get_deceleration (); + public bool get_keep_center_on_resize (); + public bool get_kinetic_mode (); + public unowned Champlain.License get_license_actor (); + public unowned Champlain.MapSource get_map_source (); + public uint get_max_zoom_level (); + public uint get_min_zoom_level (); + public Champlain.State get_state (); + public void get_viewport_origin (out int x, out int y); + public uint get_zoom_level (); + public bool get_zoom_on_double_click (); + public void go_to (double latitude, double longitude); + public double latitude_to_y (double latitude); + public double longitude_to_x (double longitude); + public void reload_tiles (); + public void remove_layer (Champlain.Layer layer); + public void set_deceleration (double rate); + public void set_keep_center_on_resize (bool value); + public void set_kinetic_mode (bool kinetic); + public void set_map_source (Champlain.MapSource map_source); + public void set_max_zoom_level (uint zoom_level); + public void set_min_zoom_level (uint zoom_level); + public void set_zoom_level (uint zoom_level); + public void set_zoom_on_double_click (bool value); + public void stop_go_to (); + public double x_to_longitude (double x); + public double y_to_latitude (double y); + public void zoom_in (); + public void zoom_out (); + public double deceleration { get; set; } + public bool keep_center_on_resize { get; set; } + public bool kinetic_mode { get; set; } + [NoAccessorMethod] + public double latitude { get; set; } + [NoAccessorMethod] + public double longitude { get; set; } + public Champlain.MapSource map_source { get; set; } + public uint max_zoom_level { get; set; } + public uint min_zoom_level { get; set; } + public uint zoom_level { get; set; } + public bool zoom_on_double_click { get; set; } + public signal void animation_completed (); + public signal void layer_relocated (); + } + [CCode (cheader_filename = "champlain/champlain.h")] + public class Viewport : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Scriptable { + public Champlain.ViewportPrivate priv; + [CCode (type = "ClutterActor*", has_construct_function = false)] + public Viewport (); + public void get_adjustments (Champlain.Adjustment hadjustment, Champlain.Adjustment vadjustment); + public void get_origin (float x, float y); + public void set_adjustments (Champlain.Adjustment hadjustment, Champlain.Adjustment vadjustment); + public void set_child (Clutter.Actor child); + public void set_origin (float x, float y); + public void stop (); + [NoAccessorMethod] + public Champlain.Adjustment hadjustment { get; set; } + [NoAccessorMethod] + public bool sync_adjustments { get; set; } + [NoAccessorMethod] + public Champlain.Adjustment vadjustment { get; set; } + [NoAccessorMethod] + public int x_origin { get; set; } + [NoAccessorMethod] + public int y_origin { get; set; } + } + [CCode (cheader_filename = "champlain/champlain.h")] + public interface Location : GLib.Object { + public abstract double get_latitude (); + public abstract double get_longitude (); + public abstract void set_location (double latitude, double longitude); + public double latitude { get; set; } + public double longitude { get; set; } + } + [CCode (type_id = "CHAMPLAIN_TYPE_ADJUSTMENT_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct AdjustmentPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_COORDINATE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct CoordinatePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_CUSTOM_MARKER_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct CustomMarkerPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_ERROR_TILE_RENDERER_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct ErrorTileRendererPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_FILE_CACHE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct FileCachePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_FILE_TILE_SOURCE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct FileTileSourcePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_IMAGE_RENDERER_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct ImageRendererPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct KineticScrollViewPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_LABEL_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct LabelPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_LICENSE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct LicensePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MAP_SOURCE_CHAIN_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct MapSourceChainPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MAP_SOURCE_DESC_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct MapSourceDescPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MAP_SOURCE_FACTORY_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct MapSourceFactoryPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MAP_SOURCE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct MapSourcePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MARKER_LAYER_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct MarkerLayerPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MARKER_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct MarkerPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MEMORY_CACHE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct MemoryCachePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MEMPHIS_RENDERER_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct MemphisRendererPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_MEMPHIS_RULE", cheader_filename = "champlain/champlain.h")] + public struct MemphisRule { + public weak string keys; + public weak string values; + public Champlain.MemphisRuleType type; + public Champlain.MemphisRuleAttr polygon; + public Champlain.MemphisRuleAttr line; + public Champlain.MemphisRuleAttr border; + public Champlain.MemphisRuleAttr text; + } + [CCode (type_id = "CHAMPLAIN_TYPE_MEMPHIS_RULE_ATTR", cheader_filename = "champlain/champlain.h")] + public struct MemphisRuleAttr { + public uint8 z_min; + public uint8 z_max; + public uint8 color_red; + public uint8 color_green; + public uint8 color_blue; + public uint8 color_alpha; + public weak string style; + public double size; + } + [CCode (type_id = "CHAMPLAIN_TYPE_NETWORK_BBOX_TILE_SOURCE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct NetworkBboxTileSourcePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct NetworkTileSourcePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_NULL_TILE_SOURCE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct NullTileSourcePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_PATH_LAYER_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct PathLayerPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_POINT_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct PointPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_SCALE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct ScalePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_TILE_CACHE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct TileCachePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_TILE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct TilePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_TILE_SOURCE_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct TileSourcePrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_VIEW_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct ViewPrivate { + } + [CCode (type_id = "CHAMPLAIN_TYPE_VIEWPORT_PRIVATE", cheader_filename = "champlain/champlain.h")] + public struct ViewportPrivate { + } + [CCode (cprefix = "CHAMPLAIN_MAP_PROJECTION_", cheader_filename = "champlain/champlain.h")] + public enum MapProjection { + [CCode (cname = "CHAMPLAIN_MAP_PROJECTION_MERCATOR")] + MAP_PROJECTION_MERCATOR + } + [CCode (cprefix = "CHAMPLAIN_MEMPHIS_RULE_TYPE_", cheader_filename = "champlain/champlain.h")] + public enum MemphisRuleType { + UNKNOWN, + NODE, + WAY, + RELATION + } + [CCode (cprefix = "CHAMPLAIN_SELECTION_", cheader_filename = "champlain/champlain.h")] + public enum SelectionMode { + NONE, + SINGLE, + MULTIPLE + } + [CCode (cprefix = "CHAMPLAIN_STATE_", cheader_filename = "champlain/champlain.h")] + public enum State { + NONE, + LOADING, + LOADED, + DONE + } + [CCode (cprefix = "CHAMPLAIN_UNIT_", cheader_filename = "champlain/champlain.h")] + public enum Unit { + KM, + MILES + } + [CCode (cheader_filename = "champlain/champlain.h")] + public const int MAJOR_VERSION; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_MEMPHIS_LOCAL; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_MEMPHIS_NETWORK; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_MFF_RELIEF; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_OAM; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_OSM_CYCLE_MAP; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_OSM_MAPNIK; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_OSM_MAPQUEST; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_OSM_OSMARENDER; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string MAP_SOURCE_OSM_TRANSPORT_MAP; + [CCode (cheader_filename = "champlain/champlain.h")] + public const double MAX_LATITUDE; + [CCode (cheader_filename = "champlain/champlain.h")] + public const double MAX_LONGITUDE; + [CCode (cheader_filename = "champlain/champlain.h")] + public const int MICRO_VERSION; + [CCode (cheader_filename = "champlain/champlain.h")] + public const int MINOR_VERSION; + [CCode (cheader_filename = "champlain/champlain.h")] + public const double MIN_LATITUDE; + [CCode (cheader_filename = "champlain/champlain.h")] + public const double MIN_LONGITUDE; + [CCode (cheader_filename = "champlain/champlain.h")] + public const double VERSION; + [CCode (cheader_filename = "champlain/champlain.h")] + public const int VERSION_HEX; + [CCode (cheader_filename = "champlain/champlain.h")] + public const string VERSION_S; +} + diff -up gpx-viewer/vapi/champlain-gtk-0.10.vapi.BAD gpx-viewer/vapi/champlain-gtk-0.10.vapi --- gpx-viewer/vapi/champlain-gtk-0.10.vapi.BAD 2011-04-27 16:31:43.229947707 -0400 +++ gpx-viewer/vapi/champlain-gtk-0.10.vapi 2011-04-27 13:21:48.370221375 -0400 @@ -0,0 +1,18 @@ +/* champlain-gtk-0.10.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "GtkChamplain", lower_case_cprefix = "gtk_champlain_", gir_namespace = "GtkChamplain", gir_version = "0.10")] +namespace GtkChamplain { + [CCode (cheader_filename = "champlain-gtk/champlain-gtk.h", type_id="GTK_TYPE_CHAMPLAIN_EMBED")] + public class Embed : Gtk.Alignment, Atk.Implementor, Gtk.Buildable { + public GtkChamplain.EmbedPrivate priv; + [CCode (type = "GtkWidget*", has_construct_function = false)] + public Embed (); + public unowned Champlain.View get_view (); + [NoAccessorMethod] + public Champlain.View champlain_view { get; } + } + [CCode (type_id = "GTK_CHAMPLAIN_TYPE_EMBED_PRIVATE", cheader_filename = "champlain-gtk/champlain-gtk.h")] + public struct EmbedPrivate { + } +} + diff -up gpx-viewer/vapi/unique-3.0.vapi.BAD gpx-viewer/vapi/unique-3.0.vapi --- gpx-viewer/vapi/unique-3.0.vapi.BAD 2011-04-26 23:08:43.139089927 -0400 +++ gpx-viewer/vapi/unique-3.0.vapi 2011-04-26 23:08:34.981210950 -0400 @@ -0,0 +1,93 @@ +/* unique-3.0.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Unique", lower_case_cprefix = "unique_")] +namespace Unique { + [CCode (cheader_filename = "uniqueapp.h")] + public class App : GLib.Object { + [CCode (has_construct_function = false)] + public App (string name, string startup_id); + public void add_command (string command_name, int command_id); + public bool is_running (); + public Unique.Response send_message (int command_id, Unique.MessageData message_data); + public void watch_window (Gtk.Window window); + [CCode (has_construct_function = false)] + public App.with_commands (string name, string startup_id, ...); + [NoAccessorMethod] + public string name { owned get; construct; } + [NoAccessorMethod] + public Gdk.Screen screen { owned get; set construct; } + [NoAccessorMethod] + public string startup_id { owned get; construct; } + public virtual signal Unique.Response message_received (int command, Unique.MessageData message_data, uint time_); + } + [CCode (cheader_filename = "uniquebackend.h")] + public class Backend : GLib.Object { + public weak string name; + public weak Unique.App parent; + public weak Gdk.Screen screen; + public weak string startup_id; + public uint workspace; + [CCode (has_construct_function = false)] + protected Backend (); + public static unowned Unique.Backend create (); + public unowned string get_name (); + public unowned Gdk.Screen get_screen (); + public unowned string get_startup_id (); + public uint get_workspace (); + public virtual bool request_name (); + public virtual Unique.Response send_message (int command_id, Unique.MessageData message_data, uint time_); + public void set_name (string name); + public void set_screen (Gdk.Screen screen); + public void set_startup_id (string startup_id); + } + [Compact] + [CCode (copy_function = "unique_message_data_copy", type_id = "UNIQUE_TYPE_MESSAGE_DATA", cheader_filename = "uniquemessage.h")] + public class MessageData { + [CCode (has_construct_function = false)] + public MessageData (); + public unowned Unique.MessageData copy (); + public unowned uchar[] @get (size_t length); + public unowned string get_filename (); + public unowned Gdk.Screen get_screen (); + public unowned string get_startup_id (); + public unowned string get_text (); + public unowned string get_uris (); + public uint get_workspace (); + public void @set (uchar[] data, ssize_t length); + public void set_filename (string filename); + public bool set_text (string str, ssize_t length); + public bool set_uris (string uris); + } + [CCode (cprefix = "UNIQUE_", cheader_filename = "uniqueenumtypes.h")] + public enum Command { + INVALID, + ACTIVATE, + NEW, + OPEN, + CLOSE + } + [CCode (cprefix = "UNIQUE_RESPONSE_", cheader_filename = "uniqueenumtypes.h")] + public enum Response { + INVALID, + OK, + CANCEL, + FAIL, + PASSTHROUGH + } + [CCode (cheader_filename = "uniqueversion.h")] + public const string API_VERSION_S; + [CCode (cheader_filename = "uniqueversion.h")] + public const string DEFAULT_BACKEND_S; + [CCode (cheader_filename = "uniqueversion.h")] + public const int MAJOR_VERSION; + [CCode (cheader_filename = "uniqueversion.h")] + public const int MICRO_VERSION; + [CCode (cheader_filename = "uniqueversion.h")] + public const int MINOR_VERSION; + [CCode (cheader_filename = "uniqueversion.h")] + public const string PROTOCOL_VERSION_S; + [CCode (cheader_filename = "uniqueversion.h")] + public const int VERSION_HEX; + [CCode (cheader_filename = "uniqueversion.h")] + public const string VERSION_S; +}
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel