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