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  = pango-Version-Checking.html
27  * outPack = pango
28  * outFile = PgVersion
29  * strct   = 
30  * realStrct=
31  * ctorStrct=
32  * clss    = PgVersion
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- pango_version_
41  * 	- pango_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * 	- pango_version_string
46  * omit signals:
47  * imports:
48  * 	- glib.Str
49  * 	- pango.PgMatrix
50  * structWrap:
51  * 	- PangoMatrix* -> PgMatrix
52  * module aliases:
53  * local aliases:
54  * overrides:
55  */
56 
57 module pango.PgVersion;
58 
59 public  import gtkc.pangotypes;
60 
61 private import gtkc.pango;
62 private import glib.ConstructionException;
63 private import gobject.ObjectG;
64 
65 
66 private import glib.Str;
67 private import pango.PgMatrix;
68 
69 
70 
71 
72 /**
73  * The capital-letter macros defined here can be used to check the version of
74  * Pango at compile-time, and to encode Pango versions into
75  * integers.
76  * The functions can be used to check the version of the linked Pango library
77  * at run-time.
78  */
79 public class PgVersion
80 {
81 	
82 	/**
83 	 * This is similar to the macro PANGO_VERSION_STRING except that
84 	 * it returns the version of Pango available at run-time, as opposed to
85 	 * the version available at compile-time.
86 	 * Since 1.16
87 	 * Returns: A string containing the version of Pango library available at run time. The returned string is owned by Pango and should not be modified or freed.
88 	 */
89 	public static string strin()
90 	{
91 		// const char* pango_version_string (void);
92 		return Str.toString(pango_version_string());
93 	}
94 	
95 	/**
96 	 */
97 	
98 	/**
99 	 * This is similar to the macro PANGO_VERSION except that
100 	 * it returns the encoded version of Pango available at run-time,
101 	 * as opposed to the version available at compile-time.
102 	 * A version number can be encoded into an integer using
103 	 * PANGO_VERSION_ENCODE().
104 	 * Since 1.16
105 	 * Returns: The encoded version of Pango library available at run time.
106 	 */
107 	public static int versio()
108 	{
109 		// int pango_version (void);
110 		return pango_version();
111 	}
112 	
113 	/**
114 	 * Checks that the Pango library in use is compatible with the
115 	 * given version. Generally you would pass in the constants
116 	 * PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR, PANGO_VERSION_MICRO
117 	 * as the three arguments to this function; that produces
118 	 * a check that the library in use at run-time is compatible with
119 	 * the version of Pango the application or module was compiled against.
120 	 * Compatibility is defined by two things: first the version
121 	 * of the running library is newer than the version
122 	 * required_major.required_minor.required_micro. Second
123 	 * the running library must be binary compatible with the
124 	 * version required_major.required_minor.required_micro
125 	 * (same major version.)
126 	 * For compile-time version checking use PANGO_VERSION_CHECK().
127 	 * Since 1.16
128 	 * Params:
129 	 * requiredMajor = the required major version.
130 	 * requiredMinor = the required minor version.
131 	 * requiredMicro = the required major version.
132 	 * Returns: NULL if the Pango library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by Pango and should not be modified or freed.
133 	 */
134 	public static string check(int requiredMajor, int requiredMinor, int requiredMicro)
135 	{
136 		// const char * pango_version_check (int required_major,  int required_minor,  int required_micro);
137 		return Str.toString(pango_version_check(requiredMajor, requiredMinor, requiredMicro));
138 	}
139 }