From 62e4ba9a053d6724e26bfeefbed09ee093d95e2d Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Mon, 5 May 2008 09:07:54 +0300 Subject: [PATCH] Add map widget test application --- src/Makefile.am | 6 +++++- src/map-widget-test.c | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/map-widget-test.c diff --git a/src/Makefile.am b/src/Makefile.am index 28c5c06..9ddad6a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,7 +21,7 @@ INCLUDES = -DDATADIR=\""$(datadir)"\" -DDBUS_API_SUBJECT_TO_CHANGE -bin_PROGRAMS = mapper osm2db +bin_PROGRAMS = mapper osm2db map_widget_test mapper_CFLAGS = $(GLIBGTK_CFLAGS) $(GTKHTML_CFLAGS) $(CAIRO_CFLAGS) $(GTKGLEXT_CFLAGS) \ $(OSSO_CFLAGS) $(CONIC_CFLAGS) \ @@ -147,6 +147,10 @@ libgtkmap_la_CFLAGS = $(GLIBGTK_CFLAGS) $(defines) libgtkmap_la_LIBADD = $(GLIBGTK_LIBS) libgtkmap_la_LDFLAGS = -lm -no-undefined +map_widget_test_SOURCES = map-widget-test.c latlon.c image-cache.c +map_widget_test_LDADD = $(GLIBGTK_LIBS) $(GTKHTML_LIBS) $(CAIRO_LIBS) $(GTKGLEXT_LIBS) -lm libgtkgps.la libgtkmap.la +map_widget_test_CFLAGS = $(GLIBGTK_CFLAGS) $(GTKHTML_CFLAGS) $(CAIRO_CFLAGS) $(GTKGLEXT_CFLAGS) + libgtkgps_la_SOURCES = gtkgps.c gtkcompass.c \ gtkgps.h gtkcompass.h gpsdata.h libgtkgps_la_CFLAGS = $(GLIBGTK_CFLAGS) $(defines) diff --git a/src/map-widget-test.c b/src/map-widget-test.c new file mode 100644 index 0000000..c119230 --- /dev/null +++ b/src/map-widget-test.c @@ -0,0 +1,26 @@ +#include +#include +#include "gtkmap.h" + +int +main (int argc, char **args) +{ +GtkDialog *dialog; +GtkWidget *map; + +gtk_init (&argc, &args); + +dialog=GTK_DIALOG(gtk_dialog_new ()); +gtk_window_set_title(GTK_WINDOW(dialog), "Map test"); +gtk_dialog_add_button (dialog, "Close", GTK_RESPONSE_CLOSE); + +map=gtk_map_new(); +gtk_box_pack_start(GTK_BOX (dialog->vbox), map, FALSE, FALSE, 0); + +gtk_widget_show_all(GTK_WIDGET (dialog)); +gtk_dialog_run (dialog); + +return 0; +} + + -- 2.39.5