* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifdef WITH_GL
+#include <GL/gl.h>
+#include <gtk/gtkgl.h>
+#endif
+
#include <glib/gstdio.h>
#include <glib-object.h>
+#include "image-cache.h"
#include "gtkmap.h"
+#define MAP_THUMB_MARGIN_X (100)
+#define MAP_THUMB_MARGIN_Y (75)
+
+/* Initial size */
+#define BUF_WIDTH_TILES (4)
+#define BUF_HEIGHT_TILES (3)
+#define BUF_WIDTH_PIXELS (1024)
+#define BUF_HEIGHT_PIXELS (768)
+
+#define MAP_CACHE_DEFAULT (64)
+/* Tile cache, this might need some adjustment */
+
G_DEFINE_TYPE(GtkMap, gtk_map, GTK_TYPE_WIDGET);
- typedef struct _GtkMapPriv GtkMapPriv;
- struct _GtkMapPriv {
+ typedef struct _GtkMapPriv GtkMapPriv;
+ struct _GtkMapPriv
+ {
+gint mark_x1;
+gint mark_x2;
+gint mark_y1;
+gint mark_y2;
+gint mark_minx;
+gint mark_miny;
+gint mark_width;
+gint mark_height;
+
+guint buf_width_tiles;
+guint buf_height_tiles;
+guint buf_width_pixels;
+guint buf_height_pixels;
+
+GTimer *timer;
+
+GtkMapCenterMode center_mode;
+
+GdkPixmap *buffer;
+ImageCache *icache;
+
+#ifdef WITH_GL
+GdkGLConfig* gl_config;
+#endif
+gboolean gl;
+
PangoContext *context;
PangoLayout *layout;
PangoFontDescription *fontdesc;