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 pango.PgMap; 26 27 private import glib.ListSG; 28 private import gobject.ObjectG; 29 private import gtkc.pango; 30 public import gtkc.pangotypes; 31 private import pango.PgEngine; 32 private import pango.PgLanguage; 33 34 35 public class PgMap 36 { 37 /** the main Gtk struct */ 38 protected PangoMap* pangoMap; 39 40 /** Get the main Gtk struct */ 41 public PangoMap* getPgMapStruct() 42 { 43 return pangoMap; 44 } 45 46 /** the main Gtk struct as a void* */ 47 protected void* getStruct() 48 { 49 return cast(void*)pangoMap; 50 } 51 52 /** 53 * Sets our main struct and passes it to the parent class. 54 */ 55 public this (PangoMap* pangoMap) 56 { 57 this.pangoMap = pangoMap; 58 } 59 60 /** 61 */ 62 63 /** 64 * Do not use. Does not do anything. 65 * 66 * Params: 67 * script = a #PangoScript 68 * 69 * Return: %NULL. 70 */ 71 public PgEngine getEngine(PangoScript script) 72 { 73 auto p = pango_map_get_engine(pangoMap, script); 74 75 if(p is null) 76 { 77 return null; 78 } 79 80 return ObjectG.getDObject!(PgEngine)(cast(PangoEngine*) p); 81 } 82 83 /** 84 * Do not use. Does not do anything. 85 * 86 * Params: 87 * script = a #PangoScript 88 * exactEngines = location to store list of engines that exactly 89 * handle this script. 90 * fallbackEngines = location to store list of engines that approximately 91 * handle this script. 92 * 93 * Since: 1.4 94 */ 95 public void getEngines(PangoScript script, out ListSG exactEngines, out ListSG fallbackEngines) 96 { 97 GSList* outexactEngines = null; 98 GSList* outfallbackEngines = null; 99 100 pango_map_get_engines(pangoMap, script, &outexactEngines, &outfallbackEngines); 101 102 exactEngines = new ListSG(outexactEngines); 103 fallbackEngines = new ListSG(outfallbackEngines); 104 } 105 106 /** 107 * Do not use. Does not do anything. 108 * 109 * Params: 110 * language = the language tag for which to find the map 111 * engineTypeId = the engine type for the map to find 112 * renderTypeId = the render type for the map to find 113 * 114 * Return: %NULL. 115 */ 116 public static PgMap findMap(PgLanguage language, uint engineTypeId, uint renderTypeId) 117 { 118 auto p = pango_find_map((language is null) ? null : language.getPgLanguageStruct(), engineTypeId, renderTypeId); 119 120 if(p is null) 121 { 122 return null; 123 } 124 125 return ObjectG.getDObject!(PgMap)(cast(PangoMap*) p); 126 } 127 128 /** 129 * Do not use. Does not do anything. 130 * 131 * Params: 132 * modul = a #PangoIncludedModule 133 */ 134 public static void moduleRegister(PangoIncludedModule* modul) 135 { 136 pango_module_register(modul); 137 } 138 }