source: appstream-generator/build/girepo/glib/Version.d @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 2.2 KB
Line 
1/*
2 * Licensed under the GNU Lesser General Public License Version 3
3 *
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the license, or
7 * (at your option) any later version.
8 *
9 * This software is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18// generated automatically - do not change
19
20
21module glib.Version;
22
23private import gi.glib;
24public  import gi.glibtypes;
25private import glib.Str;
26
27
28/** */
29public struct Version
30{
31
32        /**
33         * Checks that the GLib library in use is compatible with the
34         * given version. Generally you would pass in the constants
35         * #GLIB_MAJOR_VERSION, #GLIB_MINOR_VERSION, #GLIB_MICRO_VERSION
36         * as the three arguments to this function; that produces
37         * a check that the library in use is compatible with
38         * the version of GLib the application or module was compiled
39         * against.
40         *
41         * Compatibility is defined by two things: first the version
42         * of the running library is newer than the version
43         * @required_major.required_minor.@required_micro. Second
44         * the running library must be binary compatible with the
45         * version @required_major.required_minor.@required_micro
46         * (same major version.)
47         *
48         * Params:
49         *     requiredMajor = the required major version
50         *     requiredMinor = the required minor version
51         *     requiredMicro = the required micro version
52         *
53         * Returns: %NULL if the GLib library is compatible with the
54         *     given version, or a string describing the version mismatch.
55         *     The returned string is owned by GLib and must not be modified
56         *     or freed.
57         *
58         * Since: 2.6
59         */
60        public static string checkVersion(uint requiredMajor, uint requiredMinor, uint requiredMicro)
61        {
62                return Str.toString(glib_check_version(requiredMajor, requiredMinor, requiredMicro));
63        }
64}
Note: See TracBrowser for help on using the repository browser.