]> err.no Git - mapper/commitdiff
Add map widget test application
authorKaj-Michael Lang <milang@tal.org>
Mon, 5 May 2008 06:07:54 +0000 (09:07 +0300)
committerKaj-Michael Lang <milang@tal.org>
Mon, 5 May 2008 06:07:54 +0000 (09:07 +0300)
src/Makefile.am
src/map-widget-test.c [new file with mode: 0644]

index 28c5c06ddbe997dedde7a841a27a8790a2792aed..9ddad6af5080e9a1d201d4df527ca5a653e62497 100644 (file)
@@ -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 (file)
index 0000000..c119230
--- /dev/null
@@ -0,0 +1,26 @@
+#include <glib.h>
+#include <gtk/gtk.h>
+#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;
+}
+
+