1 #define typeof(X_) __typeof_ ## X_ 2 3 #ifdef _WIN64 4 #define __typeof_uintptr unsigned long long 5 #define __typeof_intptr long long 6 #define __typeof_longptr long long 7 #else 8 #define __typeof_uintptr unsigned int 9 #define __typeof_intptr int 10 #define __typeof_longptr long 11 #endif 12 13 #ifdef __cplusplus 14 #define __typeof_size size_t 15 #define __typeof_wchar wchar_t 16 #else 17 #define __typeof_size __typeof_intptr 18 #define __typeof_wchar unsigned short 19 #endif 20 21 struct jpeg_decompress_struct; 22 struct jpeg_compress_struct; 23 struct png_struct_def; 24 struct png_color_struct; 25 struct png_color_16_struct; 26 27 typedef struct jpeg_error_mgr * (__cdecl typeof(jpeg_std_error))(struct jpeg_error_mgr *); 28 typedef void (__cdecl typeof(jpeg_CreateDecompress))(struct jpeg_decompress_struct *, int, __typeof_size); 29 typedef int (__cdecl typeof(jpeg_read_header))(struct jpeg_decompress_struct *, unsigned char); 30 typedef unsigned char (__cdecl typeof(jpeg_start_decompress))(struct jpeg_decompress_struct *); 31 typedef unsigned int (__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *, unsigned char **, unsigned int); 32 typedef unsigned char (__cdecl typeof(jpeg_finish_decompress))(struct jpeg_decompress_struct *); 33 typedef void (__cdecl typeof(jpeg_destroy_decompress))(struct jpeg_decompress_struct *); 34 typedef unsigned char (__cdecl typeof(jpeg_resync_to_restart))(struct jpeg_decompress_struct *, int); 35 typedef void (__cdecl typeof(jpeg_CreateCompress))(struct jpeg_compress_struct *, int, __typeof_size); 36 typedef void (__cdecl typeof(jpeg_start_compress))(struct jpeg_compress_struct *, unsigned char); 37 typedef void (__cdecl typeof(jpeg_destroy_compress))(struct jpeg_compress_struct *); 38 typedef void (__cdecl typeof(jpeg_finish_compress))(struct jpeg_compress_struct *); 39 typedef void (__cdecl typeof(jpeg_set_defaults))(struct jpeg_compress_struct *); 40 typedef unsigned int (__cdecl typeof(jpeg_write_scanlines))(struct jpeg_compress_struct *, char **, unsigned int); 41 42 typedef void (*png_error_ptr_1)(struct png_struct_def *, const char *); 43 typedef void (*png_rw_ptr_1)(struct png_struct_def *, unsigned char *, __typeof_uintptr); 44 typedef void (*png_flush_ptr_1)(struct png_struct_def *); 45 typedef struct png_info_def* (__cdecl typeof(png_create_info_struct))(struct png_struct_def *); 46 typedef struct png_struct_def * (__cdecl typeof(png_create_read_struct))(const char *, void *, png_error_ptr_1, png_error_ptr_1); 47 typedef struct png_struct_def *(__cdecl typeof(png_create_write_struct))(const char *, void *, png_error_ptr_1, png_error_ptr_1); 48 typedef void (__cdecl typeof(png_destroy_info_struct))(struct png_struct_def *, struct png_info_def **); 49 typedef void (__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **, struct png_info_def **, struct png_info_def **); 50 typedef void (__cdecl typeof(png_destroy_write_struct))(struct png_struct_def **, struct png_info_def **); 51 typedef void (__cdecl typeof(png_error))(struct png_struct_def *, const char *); 52 typedef unsigned char (__cdecl typeof(png_get_bit_depth))(const struct png_struct_def *, const struct png_info_def *); 53 typedef unsigned char (__cdecl typeof(png_get_color_type))(const struct png_struct_def *, const struct png_info_def *); 54 typedef void *(__cdecl typeof(png_get_error_ptr))(const struct png_struct_def *); 55 typedef unsigned int (__cdecl typeof(png_get_image_height))(const struct png_struct_def *, const struct png_info_def *); 56 typedef unsigned int (__cdecl typeof(png_get_image_width))(const struct png_struct_def *, const struct png_info_def *); 57 typedef void *(__cdecl typeof(png_get_io_ptr))(struct png_struct_def *); 58 typedef unsigned int (__cdecl typeof(png_get_pHYs))(const struct png_struct_def *, const struct png_info_def *, unsigned int *, unsigned int *, int *); 59 typedef unsigned int (__cdecl typeof(png_get_PLTE))(const struct png_struct_def *, const struct png_info_def *, struct png_color_struct **, int *); 60 typedef unsigned int (__cdecl typeof(png_get_tRNS))(const struct png_struct_def *, struct png_info_def *, unsigned char **, int *, struct png_color_16_struct **); 61 typedef void (__cdecl typeof(png_set_bgr))(struct png_struct_def *); 62 typedef void (__cdecl typeof(png_set_error_fn))(struct png_struct_def *, void *, png_error_ptr_1, png_error_ptr_1); 63 typedef void (__cdecl typeof(png_set_expand_gray_1_2_4_to_8))(struct png_struct_def *); 64 typedef void (__cdecl typeof(png_set_filler))(struct png_struct_def *, unsigned int, int); 65 typedef int (__cdecl typeof(png_set_interlace_handling))(struct png_struct_def *); 66 typedef void (__cdecl typeof(png_set_gray_to_rgb))(struct png_struct_def *); 67 typedef void (__cdecl typeof(png_set_IHDR))(struct png_struct_def *, struct png_info_def *, unsigned int, unsigned int, int, int, int, int, int); 68 typedef void (__cdecl typeof(png_set_pHYs))(struct png_struct_def *, struct png_info_def *, unsigned int, unsigned int, int); 69 typedef void (__cdecl typeof(png_set_read_fn))(struct png_struct_def *, void *, png_rw_ptr_1); 70 typedef void (__cdecl typeof(png_set_strip_16))(struct png_struct_def *); 71 typedef void (__cdecl typeof(png_set_tRNS_to_alpha))(struct png_struct_def *); 72 typedef void (__cdecl typeof(png_set_write_fn))(struct png_struct_def *, void *, png_rw_ptr_1, png_flush_ptr_1); 73 typedef void (__cdecl typeof(png_read_end))(struct png_struct_def *, struct png_info_def *); 74 typedef void (__cdecl typeof(png_read_image))(struct png_struct_def *, unsigned char **); 75 typedef void (__cdecl typeof(png_read_info))(struct png_struct_def *, struct png_info_def *); 76 typedef void (__cdecl typeof(png_write_end))(struct png_struct_def *, struct png_info_def *); 77 typedef void (__cdecl typeof(png_write_info))(struct png_struct_def *, struct png_info_def *); 78 typedef void (__cdecl typeof(png_write_rows))(struct png_struct_def *, unsigned char **row, unsigned int); 79 typedef unsigned int (__cdecl typeof(png_get_iCCP))(struct png_struct_def *, struct png_info_def *, char **, int *, char **, unsigned int *); 80 typedef void (__cdecl typeof(png_set_crc_action))(struct png_struct_def *, int, int); 81 typedef void (__cdecl typeof(png_set_PLTE))(struct png_struct_def *, struct png_info_def *, const struct png_color_struct *, int); 82 typedef void (__cdecl typeof(png_set_tRNS))(struct png_struct_def *, struct png_info_def *, const unsigned char *, int, const struct png_color_16_struct *); 83 typedef void (__cdecl typeof(png_set_filter))(struct png_struct_def *, int, int); 84 typedef void (__cdecl typeof(png_set_swap))(struct png_struct_def *); 85 typedef void *thandle_t_1; 86 typedef __typeof_intptr (*TIFFReadWriteProc_1)(thandle_t_1, void *, __typeof_intptr); 87 typedef unsigned int (*TIFFSeekProc_1)(void *, unsigned int, int); 88 typedef int (*TIFFCloseProc_1)(thandle_t_1); 89 typedef unsigned int (*TIFFSizeProc_1)(thandle_t_1); 90 typedef int (*TIFFMapFileProc_1)(thandle_t_1, void **, unsigned int *); 91 typedef void (*TIFFUnmapFileProc_1)(thandle_t_1, void *, unsigned int); 92 typedef struct tiff *(__cdecl typeof(TIFFClientOpen))(const char *, const char *, thandle_t_1, TIFFReadWriteProc_1, TIFFReadWriteProc_1, TIFFSeekProc_1, TIFFCloseProc_1, TIFFSizeProc_1, TIFFMapFileProc_1, TIFFUnmapFileProc_1); 93 typedef void (__cdecl typeof(TIFFClose))(struct tiff *); 94 typedef unsigned short (__cdecl typeof(TIFFCurrentDirectory))(struct tiff *); 95 typedef int (__cdecl typeof(TIFFGetField))(struct tiff *, unsigned int, ...); 96 typedef int (__cdecl typeof(TIFFReadDirectory))(struct tiff *); 97 typedef int (__cdecl typeof(TIFFReadEncodedStrip))(struct tiff *, unsigned int, void *, int); 98 typedef int (__cdecl typeof(TIFFSetDirectory))(struct tiff *, unsigned short); 99 typedef unsigned int (__cdecl typeof(TIFFCurrentDirOffset))(struct tiff *); 100 typedef int (__cdecl typeof(TIFFIsByteSwapped))(struct tiff *); 101 typedef unsigned short (__cdecl typeof(TIFFNumberOfDirectories))(struct tiff *); 102 typedef long (__cdecl typeof(TIFFReadEncodedTile))(struct tiff *, unsigned long, void *, long); 103 typedef int (__cdecl typeof(TIFFSetField))(struct tiff *, unsigned long, ...); 104 typedef int (__cdecl typeof(TIFFWriteDirectory))(struct tiff *); 105 typedef int (__cdecl typeof(TIFFWriteScanline))(struct tiff *, void *, unsigned long, unsigned short); 106 107 #undef __typeof_intptr 108 #undef __typeof_longptr 109 #undef __typeof_wchar 110 #undef __typeof_size 111 112 /* EOF */ 113 114