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  = gtkglext-gdkglfont.html
27  * outPack = glgdk
28  * outFile = GLFont
29  * strct   = 
30  * realStrct=
31  * ctorStrct=
32  * clss    = GLFont
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gdk_gl_font_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- gdk.Display
47  * 	- pango.PgFont
48  * 	- pango.PgFontDescription
49  * structWrap:
50  * 	- GdkDisplay* -> Display
51  * 	- PangoFont* -> PgFont
52  * 	- PangoFontDescription* -> PgFontDescription
53  * module aliases:
54  * local aliases:
55  * overrides:
56  */
57 
58 module glgdk.GLFont;
59 
60 public  import gtkglc.glgdktypes;
61 
62 private import gtkglc.glgdk;
63 private import glib.ConstructionException;
64 private import gobject.ObjectG;
65 
66 
67 private import gdk.Display;
68 private import pango.PgFont;
69 private import pango.PgFontDescription;
70 
71 
72 
73 
74 /**
75  * Description
76  */
77 public class GLFont
78 {
79 	
80 	/**
81 	 */
82 	
83 	/**
84 	 * Creates bitmap display lists from a PangoFont.
85 	 * Params:
86 	 * fontDesc = a PangoFontDescription describing the font to use.
87 	 * first = the index of the first glyph to be taken.
88 	 * count = the number of glyphs to be taken.
89 	 * listBase = the index of the first display list to be generated.
90 	 * Returns: the PangoFont used, or NULL if no font matched.
91 	 */
92 	public static PgFont usePangoFont(PgFontDescription fontDesc, int first, int count, int listBase)
93 	{
94 		// PangoFont* gdk_gl_font_use_pango_font (const PangoFontDescription *font_desc,  int first,  int count,  int list_base);
95 		auto p = gdk_gl_font_use_pango_font((fontDesc is null) ? null : fontDesc.getPgFontDescriptionStruct(), first, count, listBase);
96 		
97 		if(p is null)
98 		{
99 			return null;
100 		}
101 		
102 		return ObjectG.getDObject!(PgFont)(cast(PangoFont*) p);
103 	}
104 	
105 	/**
106 	 * Creates bitmap display lists from a PangoFont.
107 	 * Params:
108 	 * display = a GdkDisplay.
109 	 * fontDesc = a PangoFontDescription describing the font to use.
110 	 * first = the index of the first glyph to be taken.
111 	 * count = the number of glyphs to be taken.
112 	 * listBase = the index of the first display list to be generated.
113 	 * Returns: the PangoFont used, or NULL if no font matched. <<OpenGL Window Geometric Object Rendering>>
114 	 */
115 	public static PgFont usePangoFontForDisplay(Display display, PgFontDescription fontDesc, int first, int count, int listBase)
116 	{
117 		// PangoFont* gdk_gl_font_use_pango_font_for_display  (GdkDisplay *display,  const PangoFontDescription *font_desc,  int first,  int count,  int list_base);
118 		auto p = gdk_gl_font_use_pango_font_for_display((display is null) ? null : display.getDisplayStruct(), (fontDesc is null) ? null : fontDesc.getPgFontDescriptionStruct(), first, count, listBase);
119 		
120 		if(p is null)
121 		{
122 			return null;
123 		}
124 		
125 		return ObjectG.getDObject!(PgFont)(cast(PangoFont*) p);
126 	}
127 }