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 gtkc.cairotypes;
55 
56 private import gtkc.cairo;
57 private import glib.ConstructionException;
58 
59 
60 private import glib.Str;
61 
62 
63 
64 
65 /**
66  * Cairo has a three-part version number scheme. In this scheme, we use
67  * even vs. odd numbers to distinguish fixed points in the software
68  * vs. in-progress development, (such as from git instead of a tar file,
69  * or as a "snapshot" tar file as opposed to a "release" tar file).
70  *
71  * $(DDOC_COMMENT example)
72  *
73  * Here are a few examples of versions that one might see.
74  *
75  * $(DDOC_COMMENT example)
76  *
77  * Compatibility
78  *
79  * The API/ABI compatibility guarantees for various versions are as
80  * follows. First, let's assume some cairo-using application code that is
81  * successfully using the API/ABI "from" one version of cairo. Then let's
82  * ask the question whether this same code can be moved "to" the API/ABI
83  * of another version of cairo.
84  *
85  * Moving from a release to any later version (release, snapshot,
86  * development) is always guaranteed to provide compatibility.
87  *
88  * Moving from a snapshot to any later version is not guaranteed to
89  * provide compatibility, since snapshots may introduce new API that ends
90  * up being removed before the next release.
91  *
92  * Moving from an in-development version (odd micro component) to any
93  * later version is not guaranteed to provide compatibility. In fact,
94  * there's not even a guarantee that the code will even continue to work
95  * with the same in-development version number. This is because these
96  * numbers don't correspond to any fixed state of the software, but
97  * rather the many states between snapshots and releases.
98  *
99  * <hr>
100  *
101  * Examining the version
102  *
103  * Cairo provides the ability to examine the version at either
104  * compile-time or run-time and in both a human-readable form as well as
105  * an encoded form suitable for direct comparison. Cairo also provides the
106  * macro CAIRO_VERSION_ENCODE() to perform the encoding.
107  *
108  * $(DDOC_COMMENT example)
109  *
110  * For example, checking that the cairo version is greater than or equal
111  * to 1.0.0 could be achieved at compile-time or run-time as follows:
112  *
113  * $(DDOC_COMMENT example)
114  */
115 public class Version
116 {
117 	
118 	/**
119 	 */
120 	
121 	/**
122 	 * Returns the version of the cairo library encoded in a single
123 	 * integer as per CAIRO_VERSION_ENCODE. The encoding ensures that
124 	 * later versions compare greater than earlier versions.
125 	 * A run-time comparison to check that cairo's version is greater than
126 	 * Returns: the encoded version.
127 	 */
128 	public static int cairoVersion()
129 	{
130 		// int cairo_version (void);
131 		return cairo_version();
132 	}
133 	
134 	/**
135 	 * Returns the version of the cairo library as a human-readable string
136 	 * of the form "X.Y.Z".
137 	 * See also cairo_version() as well as the compile-time equivalents
138 	 * CAIRO_VERSION_STRING and CAIRO_VERSION.
139 	 * Returns: a string containing the version.
140 	 */
141 	public static string cairoVersionString()
142 	{
143 		// const char * cairo_version_string (void);
144 		return Str.toString(cairo_version_string());
145 	}
146 }