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