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