/****************************************/
/*   Purpose: PNGLib reason code values */
/* Copyright: RISCOS Ltd, 2002          */
/*      Note: Autogenerated file        */
/****************************************/

#ifndef PNGLIBOPS_H
#define PNGLIBOPS_H

/* SWI numbers */
#define PNG_Version           (0x53bc0)
#define XPNG_Version          (0x73bc0)
#define PNG_Signature         (0x53bc1)
#define XPNG_Signature        (0x73bc1)
#define PNG_Structure         (0x53bc2)
#define XPNG_Structure        (0x73bc2)
#define PNG_Chunk             (0x53bc3)
#define XPNG_Chunk            (0x73bc3)
#define PNG_Info              (0x53bc4)
#define XPNG_Info             (0x73bc4)
#define PNG_Time              (0x53bc5)
#define XPNG_Time             (0x73bc5)
#define PNG_Set               (0x53bc6)
#define XPNG_Set              (0x73bc6)
#define PNG_Compression       (0x53bc7)
#define XPNG_Compression      (0x73bc7)
#define PNG_GetChunkInfo      (0x53bc8)
#define XPNG_GetChunkInfo     (0x73bc8)
#define PNG_SetChunkInfo      (0x53bc9)
#define XPNG_SetChunkInfo     (0x73bc9)
#define PNG_Functions         (0x53bca)
#define XPNG_Functions        (0x73bca)
#define PNG_Greyscale         (0x53bcb)
#define XPNG_Greyscale        (0x73bcb)
#define PNG_Process           (0x53bcc)
#define XPNG_Process          (0x73bcc)
#define PNG_Memory            (0x53bcd)
#define XPNG_Memory           (0x73bcd)
#define PNG_GetInfo           (0x53bce)
#define XPNG_GetInfo          (0x73bce)

/* Constants used by routines */

/* Library constants */
#define PNG_LIBPNG_VER_STRING "1.0.5"
#define PNG_LIBPNG_VER        10005

/* Colour types */
#define PNG_COLOR_MASK_PALETTE 1
#define PNG_COLOR_MASK_COLOR   2
#define PNG_COLOR_MASK_ALPHA   4
#define PNG_COLOR_TYPE_GRAY    0
#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE)
#define PNG_COLOR_TYPE_RGB     PNG_COLOR_MASK_COLOR
#define PNG_COLOR_TYPE_RGB_ALPHA  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)
#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA)

/* Compression types */
#define PNG_COMPRESSION_TYPE_BASE    0/* Deflate method 8, 32K window */
#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE

/* Filter types - only 1 defined */
#define PNG_FILTER_TYPE_BASE    0
#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE

/* Interlace types */
#define PNG_INTERLACE_NONE      0
#define PNG_INTERLACE_ADAM7     1

/* oFFs chunk values */
#define PNG_OFFSET_PIXEL        0
#define PNG_OFFSET_MICROMETER   1

/* pCAL chunk values */
#define PNG_EQUATION_LINEAR     0
#define PNG_EQUATION_BASE_E     1
#define PNG_EQUATION_ARBIRTARY  2
#define PNG_EQUATION_HYPERBOLIC 3

/* pHYs chunk values */
#define PNG_RESOLUTION_UNKNOWN  0
#define PNG_RESOLUTION_METER    1

/* sRGB chunk values */
#define PNG_sRGB_INTENT_SATURATION 0
#define PNG_sRGB_INTENT_PERCEPTUAL 1
#define PNG_sRGB_INTENT_ABSOLUTE   2
#define PNG_sRGB_INTENT_RELATIVE   3

/* PNG_GetInfo_Get_Valid masks */
#define PNG_INFO_gAMA 0x0001
#define PNG_INFO_sBIT 0x0002
#define PNG_INFO_cHRM 0x0004
#define PNG_INFO_PLTE 0x0008
#define PNG_INFO_tRNS 0x0010
#define PNG_INFO_bKGD 0x0020
#define PNG_INFO_hIST 0x0040
#define PNG_INFO_pHYs 0x0080
#define PNG_INFO_oFFs 0x0100
#define PNG_INFO_tIME 0x0200
#define PNG_INFO_pCAL 0x0400
#define PNG_INFO_sRGB 0x0800

/* Filler positions */
#define PNG_FILLER_BEFORE 0
#define PNG_FILLER_AFTER  1

/* Gamma types for background */
#define PNG_BACKGROUND_GAMMA_UNKNOWN 0
#define PNG_BACKGROUND_GAMMA_SCREEN  1
#define PNG_BACKGROUND_GAMMA_FILE    2
#define PNG_BACKGROUND_GAMMA_UNIQUE  3

/* CRC check values - actions when errors in critical/ancillary chunks */
/*      value                       action:critical     action:ancillary */
#define PNG_CRC_DEFAULT       0/* error/quit          warn/discard data */
#define PNG_CRC_ERROR_QUIT    1/* error/quit          error/quit        */
#define PNG_CRC_WARN_DISCARD  2/* (INVALID)           warn/discard data */
#define PNG_CRC_WARN_USE      3/* warn/use data       warn/use data     */
#define PNG_CRC_QUIET_USE     4/* quiet/use data      quiet/use data    */
#define PNG_CRC_NO_CHANGE     5/* use current value   use current value */

/* PNG_Set_Set_Filter flags */
#define PNG_NO_FILTERS     0x00
#define PNG_FILTER_NONE    0x08
#define PNG_FILTER_SUB     0x10
#define PNG_FILTER_UP      0x20
#define PNG_FILTER_AVG     0x40
#define PNG_FILTER_PAETH   0x80
#define PNG_FILTER_ALL     (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | PNG_FILTER_AVG | PNG_FILTER_PAETH)

/* Filter values (NOT flags */
#define PNG_FILTER_VALUE_NONE  0
#define PNG_FILTER_VALUE_SUB   1
#define PNG_FILTER_VALUE_UP    2
#define PNG_FILTER_VALUE_AVG   3
#define PNG_FILTER_VALUE_PAETH 4


/* Heuristic used for row filter selection. */
#define PNG_FILTER_HEURISTIC_DEFAULT    0/* Currently "UNWEIGHTED" */
#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1/* Used by libpng < 0.95 */
#define PNG_FILTER_HEURISTIC_WEIGHTED   2/* Experimental feature */

/* Text chunk types */
#define PNG_TEXT_COMPRESSION_NONE    -1
#define PNG_TEXT_COMPRESSION_zTXt    0


/* ZLib constants - compression levels */
#define Z_NO_COMPRESSION       0
#define Z_BEST_SPEED           1
#define Z_BEST_COMPRESSION     9
#define Z_DEFAULT_COMPRESSION  (-1)

/* ZLib constants - compression strategies */
#define Z_FILTERED           1/* Input is filtered */
#define Z_HUFFMAN_ONLY       2/* Only huffman encoded output */
#define Z_DEFAULT_STRATEGY   0/* Use default strategy */


/* SWI PNG_Signature */
/* Signature things */
#define PNG_Signature_set_sig_bytes (0)
#define PNG_Signature_sig_cmp (1)
#define PNG_Signature_check_sig (2)

/* SWI PNG_Structure */
/* read/write structures */
#define PNG_Structure_create_read_struct (0)
#define PNG_Structure_create_write_struct (1)
#define PNG_Structure_destroy_read_struct (2)
#define PNG_Structure_destroy_write_struct (3)
#define PNG_Structure_destroy_read_struct_noptr (4)
#define PNG_Structure_destroy_write_struct_noptr (5)
#define PNG_Structure_create_read_struct_2 (6)
#define PNG_Structure_create_write_struct_2 (7)

/* SWI PNG_Chunk */
/* Write chunk */
#define PNG_Chunk_write_chunk (0)
#define PNG_Chunk_write_chunk_start (1)
#define PNG_Chunk_write_chunk_data (2)
#define PNG_Chunk_write_chunk_end (3)

/* SWI PNG_Info */
/* Information structures */
#define PNG_Info_create_info_struct (0)
#define PNG_Info_destroy_info_struct (1)
#define PNG_Info_destroy_info_struct_noptr (2)
#define PNG_Info_write_info (3)
#define PNG_Info_read_info (4)

/* SWI PNG_Time */
/* Time functions */
#define PNG_Time_convert_to_rfc1123 (0)
#define PNG_Time_convert_from_struct_tm (1)
#define PNG_Time_convert_from_time_t (2)

/* SWI PNG_Set */
/* Variables for input/output changing */
#define PNG_Set_set_expand (0)
#define PNG_Set_set_gray_1_2_4_to_8 (1)
#define PNG_Set_set_palette_to_rgb (2)
#define PNG_Set_set_tRNS_to_alpha (3)
#define PNG_Set_set_bgr (4)
#define PNG_Set_set_gray_to_rgb (5)
#define PNG_Set_set_rgb_to_gray (6)
#define PNG_Set_set_strip_alpha (7)
#define PNG_Set_set_swap_alpha (8)
#define PNG_Set_set_invert_alpha (9)
#define PNG_Set_set_filler (10)
#define PNG_Set_set_swap (11)
#define PNG_Set_set_packing (12)
#define PNG_Set_set_packswap (13)
#define PNG_Set_set_shift (14)
#define PNG_Set_set_interlace_handling (15)
#define PNG_Set_set_invert_mono (16)
#define PNG_Set_set_background (17)
#define PNG_Set_set_strip_16 (18)
#define PNG_Set_set_dither (19)
#define PNG_Set_set_gamma (20)
#define PNG_Set_set_flush (21)

/* SWI PNG_Compression */
/* Set for compression, etc */
#define PNG_Compression_set_crc_action (0)
#define PNG_Compression_set_filter (1)
#define PNG_Compression_set_filter_heuristics_int (2)
#define PNG_Compression_set_filter_heuristics (3)
#define PNG_Compression_set_compression_level (4)
#define PNG_Compression_set_compression_mem_level (5)
#define PNG_Compression_set_compression_strategy (6)
#define PNG_Compression_set_compression_window_bits (7)
#define PNG_Compression_set_compression_method (8)

/* SWI PNG_GetChunkInfo */
/* Reading chunk information */
#define PNG_GetChunkInfo_get_bKGD (0)
#define PNG_GetChunkInfo_get_cHRM (1)
#define PNG_GetChunkInfo_get_gAMA (2)
#define PNG_GetChunkInfo_get_hIST (3)
#define PNG_GetChunkInfo_get_IHDR (4)
#define PNG_GetChunkInfo_get_oFFs (5)
#define PNG_GetChunkInfo_get_pCAL (6)
#define PNG_GetChunkInfo_get_pHYs (7)
#define PNG_GetChunkInfo_get_PLTE (8)
#define PNG_GetChunkInfo_get_sBIT (9)
#define PNG_GetChunkInfo_get_sRGB (10)
#define PNG_GetChunkInfo_get_text (11)
#define PNG_GetChunkInfo_get_tIME (12)
#define PNG_GetChunkInfo_get_tRNS (13)

/* SWI PNG_SetChunkInfo */
/* Setting chunk information */
#define PNG_SetChunkInfo_set_bKGD (0)
#define PNG_SetChunkInfo_set_cHRM (1)
#define PNG_SetChunkInfo_set_gAMA (2)
#define PNG_SetChunkInfo_set_hIST (3)
#define PNG_SetChunkInfo_set_IHDR (4)
#define PNG_SetChunkInfo_set_oFFs (5)
#define PNG_SetChunkInfo_set_pCAL (6)
#define PNG_SetChunkInfo_set_pHYs (7)
#define PNG_SetChunkInfo_set_PLTE (8)
#define PNG_SetChunkInfo_set_sBIT (9)
#define PNG_SetChunkInfo_set_sRGB (10)
#define PNG_SetChunkInfo_set_sRGB_gAMA_and_cHRM (11)
#define PNG_SetChunkInfo_set_text (12)
#define PNG_SetChunkInfo_set_tIME (13)
#define PNG_SetChunkInfo_set_tRNS (14)
#define PNG_SetChunkInfo_set_text_one (15)

/* SWI PNG_Functions */
/* User function pointers */
#define PNG_Functions_set_error_fn (0)
#define PNG_Functions_get_error_ptr (1)
#define PNG_Functions_set_write_fn (2)
#define PNG_Functions_set_read_fn (3)
#define PNG_Functions_get_io_ptr (4)
#define PNG_Functions_set_read_status_fn (5)
#define PNG_Functions_set_write_status_fn (6)
#define PNG_Functions_set_read_user_transform_fn (7)
#define PNG_Functions_set_write_user_transform_fn (8)
#define PNG_Functions_set_user_transform_info (9)
#define PNG_Functions_get_user_transform_ptr (10)
#define PNG_Functions_set_progressive_read_fn (11)
#define PNG_Functions_get_progressive_ptr (12)
#define PNG_Functions_init_io (13)
#define PNG_Functions_set_memory_fn (14)
#define PNG_Functions_get_warning (15)
#define PNG_Functions_set_mem_fn (16)
#define PNG_Functions_get_mem_ptr (17)

/* SWI PNG_Greyscale */
/* Greyscale */
#define PNG_Greyscale_get_rgb_to_gray_status (0)
#define PNG_Greyscale_build_grayscale_palette (1)

/* SWI PNG_Process */
/* Processing the data */
#define PNG_Process_permit_empty_plte (0)
#define PNG_Process_write_flush (1)
#define PNG_Process_start_read_image (2)
#define PNG_Process_read_update_info (3)
#define PNG_Process_read_rows (4)
#define PNG_Process_read_row (5)
#define PNG_Process_read_image (6)
#define PNG_Process_write_row (7)
#define PNG_Process_write_rows (8)
#define PNG_Process_write_image (9)
#define PNG_Process_write_end (10)
#define PNG_Process_read_end (11)
#define PNG_Process_process_data (12)
#define PNG_Process_progressive_combine_row (13)

/* SWI PNG_Memory */
/* Memory handling */
#define PNG_Memory_malloc (0)
#define PNG_Memory_free (1)
#define PNG_Memory_memcpy_check (2)
#define PNG_Memory_memset_check (3)

/* SWI PNG_GetInfo */
/* Read informationals */
#define PNG_GetInfo_get_valid (0)
#define PNG_GetInfo_get_rowbytes (1)
#define PNG_GetInfo_get_channels (2)
#define PNG_GetInfo_get_image_width (3)
#define PNG_GetInfo_get_image_height (4)
#define PNG_GetInfo_get_bit_depth (5)
#define PNG_GetInfo_get_color_type (6)
#define PNG_GetInfo_get_filter_type (7)
#define PNG_GetInfo_get_interlace_type (8)
#define PNG_GetInfo_get_compression_type (9)
#define PNG_GetInfo_get_pixels_per_meter (10)
#define PNG_GetInfo_get_x_pixels_per_meter (11)
#define PNG_GetInfo_get_y_pixels_per_meter (12)
#define PNG_GetInfo_get_pixel_aspect_ratio (13)
#define PNG_GetInfo_get_x_offset_pixels (14)
#define PNG_GetInfo_get_y_offset_pixels (15)
#define PNG_GetInfo_get_x_offset_microns (16)
#define PNG_GetInfo_get_y_offset_microns (17)
#define PNG_GetInfo_get_signature (18)
#define PNG_GetInfo_get_copyright (19)
#define PNG_GetInfo_get_header_version (20)

/* Constants used by routines */

extern char png_libpng_ver[];/* Note that I'm omitting 12 character padding */

extern int png_pass_start[];
extern int png_pass_inc[];
extern int png_pass_ystart[];
extern int png_pass_yinc[];
extern int png_pass_mask[];
extern int png_pass_dsp_mask[];



#endif
