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  = gtk3-Feature-Test-Macros.html
27  * outPack = gtk
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  * 	- gtk_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * structWrap:
48  * module aliases:
49  * local aliases:
50  * overrides:
51  */
52 
53 module gtk.Version;
54 
55 public  import gtkc.gtktypes;
56 
57 private import gtkc.gtk;
58 private import glib.ConstructionException;
59 private import gobject.ObjectG;
60 
61 
62 private import glib.Str;
63 
64 
65 
66 
67 /**
68  * GTK+ provides version information, primarily useful in configure checks
69  * for builds that have a configure script. Applications will not typically
70  * use the features described here.
71  */
72 public class Version
73 {
74 	
75 	/**
76 	 */
77 	
78 	/**
79 	 * Returns the major version number of the GTK+ library.
80 	 * (e.g. in GTK+ version 3.1.5 this is 3.)
81 	 * This function is in the library, so it represents the GTK+ library
82 	 * your code is running against. Contrast with the GTK_MAJOR_VERSION
83 	 * macro, which represents the major version of the GTK+ headers you
84 	 * have included when compiling your code.
85 	 * Returns: the major version number of the GTK+ library Since 3.0
86 	 */
87 	public static uint getMajorVersion()
88 	{
89 		// guint gtk_get_major_version (void);
90 		return gtk_get_major_version();
91 	}
92 	
93 	/**
94 	 * Returns the minor version number of the GTK+ library.
95 	 * (e.g. in GTK+ version 3.1.5 this is 1.)
96 	 * This function is in the library, so it represents the GTK+ library
97 	 * your code is are running against. Contrast with the
98 	 * GTK_MINOR_VERSION macro, which represents the minor version of the
99 	 * GTK+ headers you have included when compiling your code.
100 	 * Returns: the minor version number of the GTK+ library Since 3.0
101 	 */
102 	public static uint getMinorVersion()
103 	{
104 		// guint gtk_get_minor_version (void);
105 		return gtk_get_minor_version();
106 	}
107 	
108 	/**
109 	 * Returns the micro version number of the GTK+ library.
110 	 * (e.g. in GTK+ version 3.1.5 this is 5.)
111 	 * This function is in the library, so it represents the GTK+ library
112 	 * your code is are running against. Contrast with the
113 	 * GTK_MICRO_VERSION macro, which represents the micro version of the
114 	 * GTK+ headers you have included when compiling your code.
115 	 * Returns: the micro version number of the GTK+ library Since 3.0
116 	 */
117 	public static uint getMicroVersion()
118 	{
119 		// guint gtk_get_micro_version (void);
120 		return gtk_get_micro_version();
121 	}
122 	
123 	/**
124 	 * Returns the binary age as passed to libtool
125 	 * when building the GTK+ library the process is running against.
126 	 * If libtool means nothing to you, don't
127 	 * worry about it.
128 	 * Returns: the binary age of the GTK+ library Since 3.0
129 	 */
130 	public static uint getBinaryAge()
131 	{
132 		// guint gtk_get_binary_age (void);
133 		return gtk_get_binary_age();
134 	}
135 	
136 	/**
137 	 * Returns the interface age as passed to libtool
138 	 * when building the GTK+ library the process is running against.
139 	 * If libtool means nothing to you, don't
140 	 * worry about it.
141 	 * Returns: the interface age of the GTK+ library Since 3.0
142 	 */
143 	public static uint getInterfaceAge()
144 	{
145 		// guint gtk_get_interface_age (void);
146 		return gtk_get_interface_age();
147 	}
148 	
149 	/**
150 	 * Checks that the GTK+ library in use is compatible with the
151 	 * given version. Generally you would pass in the constants
152 	 * GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION
153 	 * as the three arguments to this function; that produces
154 	 * a check that the library in use is compatible with
155 	 * the version of GTK+ the application or module was compiled
156 	 * against.
157 	 * Compatibility is defined by two things: first the version
158 	 * of the running library is newer than the version
159 	 * required_major.required_minor.required_micro. Second
160 	 * the running library must be binary compatible with the
161 	 * version required_major.required_minor.required_micro
162 	 * (same major version.)
163 	 * This function is primarily for GTK+ modules; the module
164 	 * can call this function to check that it wasn't loaded
165 	 * into an incompatible version of GTK+. However, such a
166 	 * check isn't completely reliable, since the module may be
167 	 * linked against an old version of GTK+ and calling the
168 	 * old version of gtk_check_version(), but still get loaded
169 	 * into an application using a newer version of GTK+.
170 	 * Params:
171 	 * requiredMajor = the required major version
172 	 * requiredMinor = the required minor version
173 	 * requiredMicro = the required micro version
174 	 * Returns: NULL if the GTK+ library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by GTK+ and should not be modified or freed.
175 	 */
176 	public static string checkVersion(uint requiredMajor, uint requiredMinor, uint requiredMicro)
177 	{
178 		// const gchar * gtk_check_version (guint required_major,  guint required_minor,  guint required_micro);
179 		return Str.toString(gtk_check_version(requiredMajor, requiredMinor, requiredMicro));
180 	}
181 }