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