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-gdkgldrawable.html 27 * outPack = glgdk 28 * outFile = GLDrawableT 29 * strct = GdkGLDrawable 30 * realStrct= 31 * ctorStrct= 32 * clss = GLDrawableT 33 * interf = GLDrawableIF 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * - TStruct 38 * extend = 39 * implements: 40 * prefixes: 41 * - gdk_gl_drawable_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - glgdk.GLConfig 48 * structWrap: 49 * - GdkGLConfig* -> GLConfig 50 * module aliases: 51 * local aliases: 52 * overrides: 53 */ 54 55 module glgdk.GLDrawableT; 56 57 public import gtkglc.glgdktypes; 58 59 public import gtkglc.glgdk; 60 public import glib.ConstructionException; 61 public import gobject.ObjectG; 62 63 public import glgdk.GLConfig; 64 65 66 67 /** 68 */ 69 public template GLDrawableT(TStruct) 70 { 71 72 /** the main Gtk struct */ 73 protected GdkGLDrawable* gdkGLDrawable; 74 75 76 /** Get the main Gtk struct */ 77 public GdkGLDrawable* getGLDrawableTStruct() 78 { 79 return cast(GdkGLDrawable*)getStruct(); 80 } 81 82 83 /** 84 */ 85 86 /** 87 * Returns whether the gldrawable supports the double-buffered visual. 88 * Returns: TRUE if the double-buffered visual is supported, FALSE otherwise. 89 */ 90 public int isDoubleBuffered() 91 { 92 // gboolean gdk_gl_drawable_is_double_buffered (GdkGLDrawable *gldrawable); 93 return gdk_gl_drawable_is_double_buffered(getGLDrawableTStruct()); 94 } 95 96 /** 97 * Exchange front and back buffers. 98 */ 99 public void swapBuffers() 100 { 101 // void gdk_gl_drawable_swap_buffers (GdkGLDrawable *gldrawable); 102 gdk_gl_drawable_swap_buffers(getGLDrawableTStruct()); 103 } 104 105 /** 106 * Complete OpenGL execution prior to subsequent GDK drawing calls. 107 */ 108 public void waitGl() 109 { 110 // void gdk_gl_drawable_wait_gl (GdkGLDrawable *gldrawable); 111 gdk_gl_drawable_wait_gl(getGLDrawableTStruct()); 112 } 113 114 /** 115 * Complete GDK drawing execution prior to subsequent OpenGL calls. 116 */ 117 public void waitGdk() 118 { 119 // void gdk_gl_drawable_wait_gdk (GdkGLDrawable *gldrawable); 120 gdk_gl_drawable_wait_gdk(getGLDrawableTStruct()); 121 } 122 123 /** 124 * Gets GdkGLConfig with which the gldrawable is configured. 125 * Returns: the GdkGLConfig. 126 */ 127 public GLConfig getGLConfig() 128 { 129 // GdkGLConfig * gdk_gl_drawable_get_gl_config (GdkGLDrawable *gldrawable); 130 auto p = gdk_gl_drawable_get_gl_config(getGLDrawableTStruct()); 131 132 if(p is null) 133 { 134 return null; 135 } 136 137 return ObjectG.getDObject!(GLConfig)(cast(GdkGLConfig*) p); 138 } 139 }