src/lib/pngtile.h
changeset 0 cff7fac35cc2
child 5 4b440fa03183
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lib/pngtile.h	Sun Dec 27 22:01:17 2009 +0200
@@ -0,0 +1,40 @@
+#ifndef PNGTILE_H
+#define PNGTILE_H
+
+/**
+ * @file
+ *
+ * Tile-based access to large PNG images.
+ */
+
+/**
+ * "Global" context shared between images
+ */
+struct pt_ctx;
+
+/**
+ * Per-image state
+ */
+struct pt_image;
+
+enum pt_image_mode {
+    PT_IMG_READ     = 0x01,
+    PT_IMG_WRITE    = 0x02,
+};
+
+
+int pt_ctx_new (struct pt_ctx **ctx_ptr);
+
+/**
+ * Open a new pt_image for use.
+ *
+ * @param img_ptr returned pt_image handle
+ * @param ctx global state to use
+ * @param path filesystem path to .png file
+ * @param mode combination of PT_IMG_* flags
+ */
+int pt_image_open (struct pt_image **img_ptr, struct pt_ctx *ctx, const char *png_path, int cache_mode);
+
+
+
+#endif