1 module libpng.pngconf; 2 /* pngconf.h - machine configurable file for libpng 3 * 4 * libpng version 1.6.17, March 26, 2015 5 * 6 * Copyright (c) 1998-2015 Glenn Randers-Pehrson 7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 8 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) 9 * 10 * This code is released under the libpng license. 11 * For conditions of distribution and use, see the disclaimer 12 * and license in png.h 13 * 14 * Any machine specific code is near the front of this file, so if you 15 * are configuring libpng for a machine, you may want to read the section 16 * starting here down to where it starts to typedef png_color, png_text, 17 * and png_info. 18 */ 19 20 public: 21 22 /* For png_FILE_p - this provides the standard definition of a 23 * FILE 24 */ 25 import core.stdc.stdio : FILE; 26 27 /* Some typedefs to get us started. These should be safe on most of the common 28 * platforms. 29 * 30 * png_uint_32 and png_int_32 may, currently, be larger than required to hold a 31 * 32-bit value however this is not normally advisable. 32 * 33 * png_uint_16 and png_int_16 should always be two bytes in size - this is 34 * verified at library build time. 35 * 36 * png_byte must always be one byte in size. 37 * 38 * The checks below use constants from limits.h, as defined by the ISOC90 39 * standard. 40 */ 41 42 alias png_uint_32 = uint; 43 alias png_int_32 = int; 44 alias png_uint_16 = ushort; 45 alias png_int_16 = short; 46 alias png_byte = ubyte; 47 48 alias png_size_t = size_t; 49 alias png_ptrdiff_t = ptrdiff_t; 50 //#define png_sizeof(x) (sizeof (x)) 51 52 53 /* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no 54 * smaller than png_uint_32. Casts from png_size_t or png_uint_32 to 55 * png_alloc_size_t are not necessary; in fact, it is recommended not to use 56 * them at all so that the compiler can complain when something turns out to be 57 * problematic. 58 * 59 * Casts in the other direction (from png_alloc_size_t to png_size_t or 60 * png_uint_32) should be explicitly applied; however, we do not expect to 61 * encounter practical situations that require such conversions. 62 * 63 * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than 64 * 4294967295 - i.e. less than the maximum value of png_uint_32. 65 */ 66 alias png_alloc_size_t = png_size_t; 67 68 69 /* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler 70 * implementations of Intel CPU specific support of user-mode segmented address 71 * spaces, where 16-bit pointers address more than 65536 bytes of memory using 72 * separate 'segment' registers. The implementation requires two different 73 * types of pointer (only one of which includes the segment value.) 74 * 75 * If required this support is available in version 1.2 of libpng and may be 76 * available in versions through 1.5, although the correctness of the code has 77 * not been verified recently. 78 */ 79 80 81 /* Typedef for floating-point numbers that are converted 82 * to fixed-point with a multiple of 100,000, e.g., gamma 83 */ 84 alias png_fixed_point = png_int_32; 85 86 /* Add typedefs for pointers */ 87 alias png_voidp = void *; 88 alias png_const_voidp = const(void) *; 89 alias png_bytep = png_byte *; 90 alias png_const_bytep = const(png_byte) *; 91 alias png_uint_32p = png_uint_32 *; 92 alias png_const_uint_32p = const(png_uint_32) *; 93 alias png_int_32p = png_int_32 *; 94 alias png_const_int_32p = const(png_int_32) *; 95 alias png_uint_16p = png_uint_16 *; 96 alias png_const_uint_16p = const(png_uint_16) *; 97 alias png_int_16p = png_int_16 *; 98 alias png_const_int_16p = const(png_int_16) *; 99 alias png_charp = char *; 100 alias png_const_charp = const(char) *; 101 alias png_fixed_point_p = png_fixed_point *; 102 alias png_const_fixed_point_p = const(png_fixed_point) *; 103 alias png_size_tp = png_size_t *; 104 alias png_const_size_tp = const(png_size_t) *; 105 106 107 108 alias png_FILE_p = FILE *; 109 110 alias png_doublep = double *; 111 alias png_const_doublep = const(double) *; 112 113 /* Pointers to pointers; i.e. arrays */ 114 alias png_bytepp = png_byte * *; 115 alias png_uint_32pp = png_uint_32 * *; 116 alias png_int_32pp = png_int_32 * *; 117 alias png_uint_16pp = png_uint_16 * *; 118 alias png_int_16pp = png_int_16 * *; 119 alias png_const_charpp = const(char) * *; 120 alias png_charpp = char * *; 121 alias png_fixed_point_pp = png_fixed_point * *; 122 alias png_doublepp = double * *; 123 124 /* Pointers to pointers to pointers; i.e., pointer to array */ 125 alias png_charppp = char * * *; 126