* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <cairo.h>
+#include <goocanvas.h>
#include <ogr_api.h>
#include <ogr_core.h>
typedef struct _GtkGisPrivate GtkGisPrivate;
struct _GtkGisPrivate
{
+ GtkWidget *canvas;
+ GooCanvasItem *canvas_root;
+
+ GList *layers;
};
GType
return gtk_gis;
}
+/**
+ * gtk_gis_new_from_file:
+ * @filename:
+ *
+ * Returns: the newly created #GtkGis object.
+ */
+GtkGis
+*gtk_gis_new_from_file (gchar *filename)
+{
+}
+
+/**
+ * gtk_gis_save_to_file:
+ * @gtkgis:
+ * @filename:
+ */
+void
+*gtk_gis_save_to_file (GtkGis *gtkgis, gchar *filename)
+{
+}
+
+/**
+ * gtk_gis_add_layer:
+ * @gtkgis:
+ * @layer:
+ */
+void
+gtk_gis_add_layer (GtkGis *gtkgis, GtkGisLayer *layer)
+{
+ GtkGisPrivate *priv = GTK_GIS_GET_PRIVATE (gtkgis);
+
+ priv->layers = g_list_append (priv->layers, layer);
+}
+
+/**
+ * gtk_gis_remove_layer:
+ * @gtkgis:
+ * @layer:
+ */
+void
+gtk_gis_remove_layer (GtkGis *gtkgis, GtkGisLayer *layer)
+{
+ GtkGisPrivate *priv = GTK_GIS_GET_PRIVATE (gtkgis);
+
+ priv->layers = g_list_remove (priv->layers, layer);
+}
+
static void
gtk_gis_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
- GtkGis *gtk_gis = GTK_GIS (object);
+ GtkGis *gtkgis = GTK_GIS (object);
- GtkGisPrivate *priv = GTK_GIS_GET_PRIVATE (gtk_gis);
+ GtkGisPrivate *priv = GTK_GIS_GET_PRIVATE (gtkgis);
switch (property_id)
{
static void
gtk_gis_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- GtkGis *gtk_gis = GTK_GIS (object);
+ GtkGis *gtkgis = GTK_GIS (object);
- GtkGisPrivate *priv = GTK_GIS_GET_PRIVATE (gtk_gis);
+ GtkGisPrivate *priv = GTK_GIS_GET_PRIVATE (gtkgis);
switch (property_id)
{
#ifndef __GTK_GIS_H__
#define __GTK_GIS_H__
-#include <glib.h>
-#include <glib-object.h>
+#include <gtk/gtkwidget.h>
+
+#include "layer.h"
G_BEGIN_DECLS
struct _GtkGis
{
- GObject parent;
+ GtkWidget parent;
};
struct _GtkGisClass
{
- GObjectClass parent_class;
+ GtkWidgetClass parent_class;
};
GType gtk_gis_get_type (void) G_GNUC_CONST;
GtkGis *gtk_gis_new (void);
+GtkGis *gtk_gis_new_from_file (gchar *filename);
+
+void *gtk_gis_save_to_file (GtkGis *gtkgis, gchar *filename);
+
+void gtk_gis_add_layer (GtkGis *gtkgis, GtkGisLayer *layer);
+void gtk_gis_remove_layer (GtkGis *gtkgis, GtkGisLayer *layer);
+
+void gtk_gis_set_legend_visible (GtkGis *gtkgis, gboolean visible);
+
+GtkWidget *gtk_gis_get_legend (GtkGis *gtkgis);
+
G_END_DECLS