diff src/typedefs.h @ 12:147f4c4b9025

##### Note: GQview CVS on sourceforge is not always up to date, please use ##### ##### an offical release when making enhancements and translation updates. ##### Tue Mar 1 11:32:26 2005 John Ellis <johne@verizon.net> * src/Makefile.am: Add pan-view.[ch]: * image.[ch]: Add support for using a grid of tiles as soource image. Added scroll_notify callback for when the viewable regionis scrolled. Added ability to set min and max for the zoom range. Removed unnecessary gtk_widget_size_request from image_size_sync. Added image_scroll_to_point. * layout_util.c: Add menu item and callback for the new 'Pan view'. * pixbuf_util.c (pixbuf_draw_layout): Fix for when offset is non-zero. * typedefs.h: Add source tile stuff for ImageWindow. * ui_tabcomp.c: Fix tab completion pop-up menu placement. * pan-view.[ch]: New files for the pan view - 2.1 is officially started :)
author gqview
date Tue, 01 Mar 2005 17:16:34 +0000
parents d907d608745f
children 25335c62cd9b
line wrap: on
line diff
--- a/src/typedefs.h	Tue Mar 01 14:50:03 2005 +0000
+++ b/src/typedefs.h	Tue Mar 01 17:16:34 2005 +0000
@@ -210,6 +210,11 @@
 	CollectionData *cd;
 };
 
+typedef gint (* ImageTileRequestFunc)(ImageWindow *imd, gint x, gint y,
+				      gint width, gint height, GdkPixbuf *pixbuf, gpointer);
+typedef void (* ImageTileDisposeFunc)(ImageWindow *imd, gint x, gint y,
+				      gint width, gint height, GdkPixbuf *pixbuf, gpointer);
+
 struct _ImageWindow
 {
 	GtkWidget *widget;	/* use this to add it and show it */
@@ -240,6 +245,8 @@
 	gint x_scroll;		/* scroll offset of image (into width, height to start drawing) */
 	gint y_scroll;
 
+	gdouble zoom_min;
+	gdouble zoom_max;
 	gdouble zoom;		/* zoom we want (0 is auto) */
 	gdouble scale;		/* zoom we got (should never be 0) */
 
@@ -251,6 +258,13 @@
 	gint tile_cache_size;	/* allocated size of pixmaps/pixbufs */
 	GList *draw_queue;	/* list of areas to redraw */
 
+	gint source_tiles_enabled;
+	gint source_tiles_cache_size;
+
+	GList *source_tiles;	/* list of active source tiles */
+	gint source_tile_width;
+	gint source_tile_height;
+
 	GList *draw_queue_2pass;/* list when 2 pass is enabled */
 
 	ImageLoader *il;
@@ -277,10 +291,13 @@
 	void (*func_update)(ImageWindow *, gpointer);
 	void (*func_complete)(ImageWindow *, gint preload, gpointer);
 	void (*func_new)(ImageWindow *, gpointer);
+	ImageTileRequestFunc func_tile_request;
+	ImageTileDisposeFunc func_tile_dispose;
 
 	gpointer data_update;
 	gpointer data_complete;
 	gpointer data_new;
+	gpointer data_tile;
 
 	/* button, scroll functions */
 	void (*func_button)(ImageWindow *, gint button,
@@ -291,6 +308,11 @@
 	gpointer data_button;
 	gpointer data_scroll;
 
+	/* scroll notification (for scroll bar implementation) */
+	void (*func_scroll_notify)(ImageWindow *, gint x, gint y, gint width, gint height, gpointer);
+
+	gpointer data_scroll_notify;
+
 	/* collection info */
 	CollectionData *collection;
 	CollectInfo *collection_info;