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 private import glib.Str;
66 private import pango.PgMatrix;
67 
68 
69 
70 /**
71  * The capital-letter macros defined here can be used to check the version of
72  * Pango at compile-time, and to encode Pango versions into
73  * integers.
74  * The functions can be used to check the version of the linked Pango library
75  * at run-time.
76  */
77 public class PgVersion
78 {
79 	
80 	/**
81 	 * This is similar to the macro PANGO_VERSION_STRING except that
82 	 * it returns the version of Pango available at run-time, as opposed to
83 	 * the version available at compile-time.
84 	 * Since 1.16
85 	 * 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.
86 	 */
87 	public static string strin()
88 	{
89 		// const char* pango_version_string (void);
90 		return Str.toString(pango_version_string());
91 	}
92 	
93 	/**
94 	 */
95 	
96 	/**
97 	 * This is similar to the macro PANGO_VERSION except that
98 	 * it returns the encoded version of Pango available at run-time,
99 	 * as opposed to the version available at compile-time.
100 	 * A version number can be encoded into an integer using
101 	 * PANGO_VERSION_ENCODE().
102 	 * Since 1.16
103 	 * Returns: The encoded version of Pango library available at run time.
104 	 */
105 	public static int versio()
106 	{
107 		// int pango_version (void);
108 		return pango_version();
109 	}
110 	
111 	/**
112 	 * Checks that the Pango library in use is compatible with the
113 	 * given version. Generally you would pass in the constants
114 	 * PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR, PANGO_VERSION_MICRO
115 	 * as the three arguments to this function; that produces
116 	 * a check that the library in use at run-time is compatible with
117 	 * the version of Pango the application or module was compiled against.
118 	 * Compatibility is defined by two things: first the version
119 	 * of the running library is newer than the version
120 	 * required_major.required_minor.required_micro. Second
121 	 * the running library must be binary compatible with the
122 	 * version required_major.required_minor.required_micro
123 	 * (same major version.)
124 	 * For compile-time version checking use PANGO_VERSION_CHECK().
125 	 * Since 1.16
126 	 * Params:
127 	 * requiredMajor = the required major version.
128 	 * requiredMinor = the required minor version.
129 	 * requiredMicro = the required major version.
130 	 * 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.
131 	 */
132 	public static string check(int requiredMajor, int requiredMinor, int requiredMicro)
133 	{
134 		// const char * pango_version_check (int required_major,  int required_minor,  int required_micro);
135 		return Str.toString(pango_version_check(requiredMajor, requiredMinor, requiredMicro));
136 	}
137 }