1 module libpng.pngconf;
2 /* pngconf.h - machine configurable file for libpng
3  *
4  * libpng version 1.5.14 - January 24, 2013
5  *
6  * Copyright (c) 1998-2013 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
31  * common platforms.  The typedefs should be at least as large as the
32  * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
33  * don't have to be exactly that size.  Some compilers dislike passing
34  * unsigned shorts as function parameters, so you may be better off using
35  * unsigned int for png_uint_16.
36  */
37 
38 alias uint png_uint_32;
39 alias int png_int_32;
40 alias ushort png_uint_16;
41 alias short png_int_16;
42 alias ubyte png_byte;
43 
44 alias size_t png_size_t;
45 //#define png_sizeof(x) (sizeof (x))
46 
47 /* Typedef for floating-point numbers that are converted
48  * to fixed-point with a multiple of 100,000, e.g., gamma
49  */
50 alias png_int_32 png_fixed_point;
51 
52 /* Add typedefs for pointers */
53 alias void                      * png_voidp;
54 alias const(void)               * png_const_voidp;
55 alias png_byte                  * png_bytep;
56 alias const(png_byte)           * png_const_bytep;
57 alias png_uint_32               * png_uint_32p;
58 alias const(png_uint_32)        * png_const_uint_32p;
59 alias png_int_32                * png_int_32p;
60 alias const(png_int_32)         * png_const_int_32p;
61 alias png_uint_16               * png_uint_16p;
62 alias const(png_uint_16)        * png_const_uint_16p;
63 alias png_int_16                * png_int_16p;
64 alias const(png_int_16)         * png_const_int_16p;
65 alias char                      * png_charp;
66 alias const(char)               * png_const_charp;
67 alias png_fixed_point           * png_fixed_point_p;
68 alias const(png_fixed_point)    * png_const_fixed_point_p;
69 alias png_size_t                * png_size_tp;
70 alias const(png_size_t)      * png_const_size_tp;
71 
72 alias FILE            * png_FILE_p;
73 
74 alias double           * png_doublep;
75 alias const(double)    * png_const_doublep;
76 
77 /* Pointers to pointers; i.e. arrays */
78 alias png_byte        * * png_bytepp;
79 alias png_uint_32     * * png_uint_32pp;
80 alias png_int_32      * * png_int_32pp;
81 alias png_uint_16     * * png_uint_16pp;
82 alias png_int_16      * * png_int_16pp;
83 alias const(char)     * * png_const_charpp;
84 alias char            * * png_charpp;
85 alias png_fixed_point * * png_fixed_point_pp;
86 alias double          * * png_doublepp;
87 
88 /* Pointers to pointers to pointers; i.e., pointer to array */
89 alias char            * * * png_charppp;
90 
91 /* png_alloc_size_t is guaranteed to be no smaller than png_size_t,
92  * and no smaller than png_uint_32.  Casts from png_size_t or png_uint_32
93  * to png_alloc_size_t are not necessary; in fact, it is recommended
94  * not to use them at all so that the compiler can complain when something
95  * turns out to be problematic.
96  * Casts in the other direction (from png_alloc_size_t to png_size_t or
97  * png_uint_32) should be explicitly applied; however, we do not expect
98  * to encounter practical situations that require such conversions.
99  */
100 alias png_size_t    png_alloc_size_t;