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