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-gdkglquery.html
27  * outPack = glgdk
28  * outFile = GLQuery
29  * strct   = 
30  * realStrct=
31  * ctorStrct=
32  * clss    = GLQuery
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gdk_gl_query_
41  * 	- gdk_gl_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- gdk.Display
49  * structWrap:
50  * 	- GdkDisplay* -> Display
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module glgdk.GLQuery;
57 
58 public  import gtkglc.glgdktypes;
59 
60 private import gtkglc.glgdk;
61 private import glib.ConstructionException;
62 private import gobject.ObjectG;
63 
64 
65 private import glib.Str;
66 private import gdk.Display;
67 
68 
69 
70 
71 /**
72  * Description
73  */
74 public class GLQuery
75 {
76 	
77 	/**
78 	 */
79 	
80 	/**
81 	 * Indicates whether the window system supports the OpenGL extension
82 	 * (GLX, WGL, etc.).
83 	 * Returns: TRUE if OpenGL is supported, FALSE otherwise.
84 	 */
85 	public static int extension()
86 	{
87 		// gboolean gdk_gl_query_extension (void);
88 		return gdk_gl_query_extension();
89 	}
90 	
91 	/**
92 	 * Indicates whether the window system supports the OpenGL extension
93 	 * (GLX, WGL, etc.).
94 	 * Params:
95 	 * display = the GdkDisplay where the query is sent to.
96 	 * Returns: TRUE if OpenGL is supported, FALSE otherwise.
97 	 */
98 	public static int extensionForDisplay(Display display)
99 	{
100 		// gboolean gdk_gl_query_extension_for_display  (GdkDisplay *display);
101 		return gdk_gl_query_extension_for_display((display is null) ? null : display.getDisplayStruct());
102 	}
103 	
104 	/**
105 	 * Returns the version numbers of the OpenGL extension to the window system.
106 	 * In the X Window System, it returns the GLX version.
107 	 * In the Microsoft Windows, it returns the Windows version.
108 	 * Params:
109 	 * major = returns the major version number of the OpenGL extension.
110 	 * minor = returns the minor version number of the OpenGL extension.
111 	 * Returns: FALSE if it fails, TRUE otherwise.
112 	 */
113 	public static int versio(out int major, out int minor)
114 	{
115 		// gboolean gdk_gl_query_version (int *major,  int *minor);
116 		return gdk_gl_query_version(&major, &minor);
117 	}
118 	
119 	/**
120 	 * Returns the version numbers of the OpenGL extension to the window system.
121 	 * In the X Window System, it returns the GLX version.
122 	 * In the Microsoft Windows, it returns the Windows version.
123 	 * Params:
124 	 * display = the GdkDisplay where the query is sent to.
125 	 * major = returns the major version number of the OpenGL extension.
126 	 * minor = returns the minor version number of the OpenGL extension.
127 	 * Returns: FALSE if it fails, TRUE otherwise.
128 	 */
129 	public static int versionForDisplay(Display display, out int major, out int minor)
130 	{
131 		// gboolean gdk_gl_query_version_for_display  (GdkDisplay *display,  int *major,  int *minor);
132 		return gdk_gl_query_version_for_display((display is null) ? null : display.getDisplayStruct(), &major, &minor);
133 	}
134 	
135 	/**
136 	 * Determines whether a given OpenGL extension is supported.
137 	 * There must be a valid current rendering context to call
138 	 * gdk_gl_query_gl_extension().
139 	 * gdk_gl_query_gl_extension() returns information about OpenGL extensions
140 	 * only. This means that window system dependent extensions (for example,
141 	 * GLX extensions) are not reported by gdk_gl_query_gl_extension().
142 	 * Params:
143 	 * extension = name of OpenGL extension.
144 	 * Returns: TRUE if the OpenGL extension is supported, FALSE if not supported.
145 	 */
146 	public static int glExtension(string extension)
147 	{
148 		// gboolean gdk_gl_query_gl_extension (const char *extension);
149 		return gdk_gl_query_gl_extension(Str.toStringz(extension));
150 	}
151 	
152 	/**
153 	 * Returns the address of the OpenGL, GLU, or GLX function.
154 	 * Params:
155 	 * procName = function name.
156 	 * Returns: the address of the function named by proc_name. <<Initialization Frame Buffer Configuration>>
157 	 */
158 	public static GdkGLProc getProcAddress(string procName)
159 	{
160 		// GdkGLProc gdk_gl_get_proc_address (const char *proc_name);
161 		return gdk_gl_get_proc_address(Str.toStringz(procName));
162 	}
163 }