2 * This file is part of duit.
4 * duit 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 * duit 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 duit; 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 = /usr/share/doc/libgtkglext1-doc/html/gtkglext/gtkglext-gdkglwindow.html
46 * - GdkGLCondif* -> GLConfig
50 module glgdk
.GLWindow
;
52 private import glgdk
.glgdktypes
;
54 private import lib
.glgdk
;
56 private import glgdk
.GLConfig
;
61 private import gdk
.Drawable
;
62 public class GLWindow
: Drawable
65 /** the main Gtk struct */
66 protected GdkGLWindow
* gdkGLWindow
;
69 public GdkGLWindow
* getGLWindowStruct()
75 /** the main Gtk struct as a void* */
76 protected void* getStruct()
78 return cast(void*)gdkGLWindow
;
82 * Sets our main struct and passes it to the parent class
84 public this (GdkGLWindow
* gdkGLWindow
)
86 super(cast(GdkDrawable
*)gdkGLWindow
);
87 this.gdkGLWindow
= gdkGLWindow
;
95 * Creates an on-screen rendering area.
96 * attrib_list is currently unused. This must be set to NULL or empty
97 * (first attribute of None). See GLX 1.3 spec.
98 * glconfig : a GdkGLConfig.
99 * window : the GdkWindow to be used as the rendering area.
100 * attrib_list : this must be set to NULL or empty (first attribute of None).
101 * Returns : the new GdkGLWindow.
103 public this (GdkGLConfig
* glconfig
, GdkWindow
* window
, int* attribList
)
105 // GdkGLWindow* gdk_gl_window_new (GdkGLConfig *glconfig, GdkWindow *window, const int *attrib_list);
106 this(cast(GdkGLWindow
*)gdk_gl_window_new(glconfig
, window
, attribList
) );
110 * Destroys the OpenGL resources associated with glwindow and
111 * decrements glwindow's reference count.
112 * glwindow : a GdkGLWindow.
114 public void destroy()
116 // void gdk_gl_window_destroy (GdkGLWindow *glwindow);
117 gdk_gl_window_destroy(gdkGLWindow
);
121 * Returns the GdkWindow associated with glwindow.
122 * Notice that GdkGLWindow is not GdkWindow, but another
123 * GdkDrawable which have an associated GdkWindow.
124 * glwindow : a GdkGLWindow.
125 * Returns : the GdkWindow associated with glwindow.
127 public GdkWindow
* getWindow()
129 // GdkWindow* gdk_gl_window_get_window (GdkGLWindow *glwindow);
130 return gdk_gl_window_get_window(gdkGLWindow
);
134 * Set the OpenGL-capability to the window.
135 * This function creates a new GdkGLWindow held by the window.
136 * attrib_list is currently unused. This must be set to NULL or empty
137 * (first attribute of None).
138 * window : the GdkWindow to be used as the rendering area.
139 * glconfig : a GdkGLConfig.
140 * attrib_list : this must be set to NULL or empty (first attribute of None).
141 * Returns : the GdkGLWindow used by the window if it is successful,
144 public static GdkGLWindow
* gdkWindowSetGLCapability(GdkWindow
* window
, GdkGLConfig
* glconfig
, int* attribList
)
146 // GdkGLWindow* gdk_window_set_gl_capability (GdkWindow *window, GdkGLConfig *glconfig, const int *attrib_list);
147 return gdk_window_set_gl_capability(window
, glconfig
, attribList
);
151 * Unset the OpenGL-capability of the window.
152 * This function destroys the GdkGLWindow held by the window.
153 * window : a GdkWindow.
155 public static void gdkWindowUnsetGLCapability(GdkWindow
* window
)
157 // void gdk_window_unset_gl_capability (GdkWindow *window);
158 gdk_window_unset_gl_capability(window
);
162 * Returns whether the window is OpenGL-capable.
163 * window : a GdkWindow.
164 * Returns : TRUE if the window is OpenGL-capable, FALSE otherwise.
166 public static int gdkWindowIsGLCapable(GdkWindow
* window
)
168 // gboolean gdk_window_is_gl_capable (GdkWindow *window);
169 return gdk_window_is_gl_capable(window
);
173 * Returns the GdkGLWindow held by the window.
174 * window : a GdkWindow.
175 * Returns : the GdkGLWindow.
177 public static GdkGLWindow
* gdkWindowGetGLWindow(GdkWindow
* window
)
179 // GdkGLWindow* gdk_window_get_gl_window (GdkWindow *window);
180 return gdk_window_get_gl_window(window
);