1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = cairo-Version-Information.html
27  * outPack = cairo
28  * outFile = Version
29  * strct   = 
30  * realStrct=
31  * ctorStrct=
32  * clss    = Version
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * omit structs:
41  * omit prefixes:
42  * omit code:
43  * omit signals:
44  * imports:
45  * 	- glib.Str
46  * structWrap:
47  * module aliases:
48  * local aliases:
49  * overrides:
50  */
51 
52 module cairo.Version;
53 
54 public  import cairo.c.types;
55 
56 private import cairo.c.functions;
57 private import glib.ConstructionException;
58 
59 private import glib.Str;
60 
61 
62 
63 /**
64  * Cairo has a three-part version number scheme. In this scheme, we use
65  * even vs. odd numbers to distinguish fixed points in the software
66  * vs. in-progress development, (such as from git instead of a tar file,
67  * or as a "snapshot" tar file as opposed to a "release" tar file).
68  *
69  * $(DDOC_COMMENT example)
70  *
71  * Here are a few examples of versions that one might see.
72  *
73  * $(DDOC_COMMENT example)
74  *
75  * Compatibility
76  *
77  * The API/ABI compatibility guarantees for various versions are as
78  * follows. First, let's assume some cairo-using application code that is
79  * successfully using the API/ABI "from" one version of cairo. Then let's
80  * ask the question whether this same code can be moved "to" the API/ABI
81  * of another version of cairo.
82  *
83  * Moving from a release to any later version (release, snapshot,
84  * development) is always guaranteed to provide compatibility.
85  *
86  * Moving from a snapshot to any later version is not guaranteed to
87  * provide compatibility, since snapshots may introduce new API that ends
88  * up being removed before the next release.
89  *
90  * Moving from an in-development version (odd micro component) to any
91  * later version is not guaranteed to provide compatibility. In fact,
92  * there's not even a guarantee that the code will even continue to work
93  * with the same in-development version number. This is because these
94  * numbers don't correspond to any fixed state of the software, but
95  * rather the many states between snapshots and releases.
96  *
97  * <hr>
98  *
99  * Examining the version
100  *
101  * Cairo provides the ability to examine the version at either
102  * compile-time or run-time and in both a human-readable form as well as
103  * an encoded form suitable for direct comparison. Cairo also provides the
104  * macro CAIRO_VERSION_ENCODE() to perform the encoding.
105  *
106  * $(DDOC_COMMENT example)
107  *
108  * For example, checking that the cairo version is greater than or equal
109  * to 1.0.0 could be achieved at compile-time or run-time as follows:
110  *
111  * $(DDOC_COMMENT example)
112  */
113 public class Version
114 {
115 	
116 	/**
117 	 */
118 	
119 	/**
120 	 * Returns the version of the cairo library encoded in a single
121 	 * integer as per CAIRO_VERSION_ENCODE. The encoding ensures that
122 	 * later versions compare greater than earlier versions.
123 	 * A run-time comparison to check that cairo's version is greater than
124 	 * Returns: the encoded version.
125 	 */
126 	public static int cairoVersion()
127 	{
128 		// int cairo_version (void);
129 		return cairo_version();
130 	}
131 	
132 	/**
133 	 * Returns the version of the cairo library as a human-readable string
134 	 * of the form "X.Y.Z".
135 	 * See also cairo_version() as well as the compile-time equivalents
136 	 * CAIRO_VERSION_STRING and CAIRO_VERSION.
137 	 * Returns: a string containing the version.
138 	 */
139 	public static string cairoVersionString()
140 	{
141 		// const char * cairo_version_string (void);
142 		return Str.toString(cairo_version_string());
143 	}
144 }