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 module glib.Version; 26 27 private import glib.Str; 28 private import gtkc.glib; 29 public import gtkc.glibtypes; 30 31 32 /** */ 33 public struct Version 34 { 35 36 /** 37 * Checks that the GLib library in use is compatible with the 38 * given version. Generally you would pass in the constants 39 * #GLIB_MAJOR_VERSION, #GLIB_MINOR_VERSION, #GLIB_MICRO_VERSION 40 * as the three arguments to this function; that produces 41 * a check that the library in use is compatible with 42 * the version of GLib the application or module was compiled 43 * against. 44 * 45 * Compatibility is defined by two things: first the version 46 * of the running library is newer than the version 47 * @required_major.required_minor.@required_micro. Second 48 * the running library must be binary compatible with the 49 * version @required_major.required_minor.@required_micro 50 * (same major version.) 51 * 52 * Params: 53 * requiredMajor = the required major version 54 * requiredMinor = the required minor version 55 * requiredMicro = the required micro version 56 * 57 * Return: %NULL if the GLib library is compatible with the 58 * given version, or a string describing the version mismatch. 59 * The returned string is owned by GLib and must not be modified 60 * or freed. 61 * 62 * Since: 2.6 63 */ 64 public static string checkVersion(uint requiredMajor, uint requiredMinor, uint requiredMicro) 65 { 66 return Str.toString(glib_check_version(requiredMajor, requiredMinor, requiredMicro)); 67 } 68 }