2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gtkglext-gdkglwindow.html
46 * - GdkGLCondif* -> GLConfig
51 module glgdk
.GLWindow
;
57 import tango
.io
.Stdout
; // use the tango loging?
61 private import gtkglc
.glgdktypes
;
63 private import gtkglc
.glgdk
;
66 private import glgdk
.GLConfig
;
74 private import gdk
.Drawable
;
75 public class GLWindow
: Drawable
78 /** the main Gtk struct */
79 protected GdkGLWindow
* gdkGLWindow
;
82 public GdkGLWindow
* getGLWindowStruct()
88 /** the main Gtk struct as a void* */
89 protected void* getStruct()
91 return cast(void*)gdkGLWindow
;
95 * Sets our main struct and passes it to the parent class
97 public this (GdkGLWindow
* gdkGLWindow
)
101 if ( gdkGLWindow
is null )
106 Stdout("struct gdkGLWindow is null on constructor").newline
;
110 printf("struct gdkGLWindow is null on constructor");
117 assert(gdkGLWindow
!is null, "struct gdkGLWindow is null on constructor");
119 super(cast(GdkDrawable
*)gdkGLWindow
);
120 this.gdkGLWindow
= gdkGLWindow
;
128 * Creates an on-screen rendering area.
129 * attrib_list is currently unused. This must be set to NULL or empty
130 * (first attribute of None). See GLX 1.3 spec.
134 * the GdkWindow to be used as the rendering area.
136 * this must be set to NULL or empty (first attribute of None).
138 * the new GdkGLWindow.
140 public this (GdkGLConfig
* glconfig
, GdkWindow
* window
, int* attribList
)
142 // GdkGLWindow* gdk_gl_window_new (GdkGLConfig *glconfig, GdkWindow *window, const int *attrib_list);
143 this(cast(GdkGLWindow
*)gdk_gl_window_new(glconfig
, window
, attribList
) );
147 * Destroys the OpenGL resources associated with glwindow and
148 * decrements glwindow's reference count.
152 public void destroy()
154 // void gdk_gl_window_destroy (GdkGLWindow *glwindow);
155 gdk_gl_window_destroy(gdkGLWindow
);
159 * Returns the GdkWindow associated with glwindow.
160 * Notice that GdkGLWindow is not GdkWindow, but another
161 * GdkDrawable which have an associated GdkWindow.
165 * the GdkWindow associated with glwindow.
167 public GdkWindow
* getWindow()
169 // GdkWindow* gdk_gl_window_get_window (GdkGLWindow *glwindow);
170 return gdk_gl_window_get_window(gdkGLWindow
);
174 * Set the OpenGL-capability to the window.
175 * This function creates a new GdkGLWindow held by the window.
176 * attrib_list is currently unused. This must be set to NULL or empty
177 * (first attribute of None).
179 * the GdkWindow to be used as the rendering area.
183 * this must be set to NULL or empty (first attribute of None).
185 * the GdkGLWindow used by the window if it is successful,
188 public static GdkGLWindow
* gdkWindowSetGLCapability(GdkWindow
* window
, GdkGLConfig
* glconfig
, int* attribList
)
190 // GdkGLWindow* gdk_window_set_gl_capability (GdkWindow *window, GdkGLConfig *glconfig, const int *attrib_list);
191 return gdk_window_set_gl_capability(window
, glconfig
, attribList
);
195 * Unset the OpenGL-capability of the window.
196 * This function destroys the GdkGLWindow held by the window.
200 public static void gdkWindowUnsetGLCapability(GdkWindow
* window
)
202 // void gdk_window_unset_gl_capability (GdkWindow *window);
203 gdk_window_unset_gl_capability(window
);
207 * Returns whether the window is OpenGL-capable.
211 * TRUE if the window is OpenGL-capable, FALSE otherwise.
213 public static int gdkWindowIsGLCapable(GdkWindow
* window
)
215 // gboolean gdk_window_is_gl_capable (GdkWindow *window);
216 return gdk_window_is_gl_capable(window
);
220 * Returns the GdkGLWindow held by the window.
226 public static GdkGLWindow
* gdkWindowGetGLWindow(GdkWindow
* window
)
228 // GdkGLWindow* gdk_window_get_gl_window (GdkWindow *window);
229 return gdk_window_get_gl_window(window
);