Attachment 'gtkglext-1.0.vapi'

Download

   1 /* gtkglext-1.0.vapi
   2  *
   3  * Copyright (C) 2008  Matias De la Puente
   4  *
   5  * This library is free software; you can redistribute it and/or
   6  * modify it under the terms of the GNU Lesser General Public
   7  * License as published by the Free Software Foundation; either
   8  * version 2.1 of the License, or (at your option) any later version.
   9 
  10  * This library 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 GNU
  13  * Lesser General Public License for more details.
  14 
  15  * You should have received a copy of the GNU Lesser General Public
  16  * License along with this library; if not, write to the Free Software
  17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
  18  *
  19  * Author:
  20  * 	Matias De la Puente <mfpuente.ar@gmail.com>
  21  * 	Yu Feng <rainwoodman@gmail.com>
  22  */
  23 
  24 [CCode (lower_case_cprefix="gdk_", cprefix="Gdk")]
  25 namespace Gdk {
  26 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
  27 	public enum GLConfigAttrib
  28 	{
  29 		USE_GL,
  30 		BUFFER_SIZE,
  31 		LEVEL,
  32 		RGBA,
  33 		DOUBLEBUFFER,
  34 		STEREO,
  35 		AUX_BUFFERS,
  36 		RED_SIZE,
  37 		GREEN_SIZE,
  38 		BLUE_SIZE,
  39 		ALPHA_SIZE,
  40 		DEPTH_SIZE,
  41 		STENCIL_SIZE,
  42 		ACCUM_RED_SIZE,
  43 		ACCUM_GREEN_SIZE,
  44 		ACCUM_BLUE_SIZE,
  45 		ACCUM_ALPHA_SIZE,
  46 		CONFIG_CAVEAT,
  47 		X_VISUAL_TYPE,
  48 		TRANSPARENT_TYPE,
  49 		TRANSPARENT_INDEX_VALUE,
  50 		TRANSPARENT_RED_VALUE,
  51 		TRANSPARENT_GREEN_VALUE,
  52 		TRANSPARENT_BLUE_VALUE,
  53 		TRANSPARENT_ALPHA_VALUE,
  54 		DRAWABLE_TYPE,
  55 		RENDER_TYPE,
  56 		X_RENDERABLE,
  57 		FBCONFIG_ID,
  58 		MAX_PBUFFER_WIDTH,
  59 		MAX_PBUFFER_HEIGHT,
  60 		MAX_PBUFFER_PIXELS,
  61 		VISUAL_ID,
  62 		SCREEN,
  63 		SAMPLE_BUFFERS,
  64 		SAMPLES
  65 	}
  66 	
  67 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
  68 	public enum GLConfigCaveat
  69 	{
  70 		CONFIG_CAVEAT_DONT_CARE,
  71 		CONFIG_CAVEAT_NONE,
  72 		SLOW_CONFIG,
  73 		NON_CONFORMANT_CONFIG
  74 	}
  75 	
  76 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
  77 	public enum GLVisualType
  78 	{
  79 		VISUAL_TYPE_DONT_CARE,
  80 		TRUE_COLOR,
  81 		DIRECT_COLOR,
  82 		PSEUDO_COLOR,
  83 		STATIC_COLOR,
  84 		GRAY_SCALE,
  85 		STATIC_GRAY
  86 	}
  87 	
  88 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
  89 	public enum GLTransparentType
  90 	{
  91 		TRANSPARENT_NONE,
  92 		TRANSPARENT_RGB,
  93 		TRANSPARENT_INDEX
  94 	}
  95 	
  96 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
  97 	public enum GLDrawableTypeMask
  98 	{
  99 		WINDOW_BIT,
 100 		PIXMAP_BIT,
 101 		PBUFFER_BIT
 102 	}
 103 	
 104 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 105 	public enum GLRenderTypeMask
 106 	{
 107 		RGBA_BIT,
 108 		COLOR_INDEX_BIT
 109 	}
 110 	
 111 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 112 	public enum GLBufferMask
 113 	{
 114 		FRONT_LEFT_BUFFER_BIT,
 115 		FRONT_RIGHT_BUFFER_BIT,
 116 		BACK_LEFT_BUFFER_BIT,
 117 		BACK_RIGHT_BUFFER_BIT,
 118 		AUX_BUFFERS_BIT,
 119 		DEPTH_BUFFER_BIT,
 120 		STENCIL_BUFFER_BIT,
 121 		ACCUM_BUFFER_BIT
 122 	}
 123 	
 124 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 125 	public enum GLConfigError
 126 	{
 127 		BAD_SCREEN,
 128 		BAD_ATTRIBUTE,
 129 		NO_EXTENSION,
 130 		BAD_VISUAL,
 131 		BAD_CONTEXT,
 132 		BAD_VALUE,
 133 		BAD_ENUM
 134 	}
 135 	
 136 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 137 	public enum GLRenderType
 138 	{
 139 		RGBA_TYPE,
 140 		COLOR_INDEX_TYPE
 141 	}
 142 	
 143 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 144 	public enum GLDrawableAttrib
 145 	{
 146 		PRESERVED_CONTENTS,
 147 		LARGEST_PBUFFER,
 148 		WIDTH,
 149 		HEIGHT,
 150 		EVENT_MASK
 151 	}
 152 	
 153 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 154 	public enum GLPbufferAttrib
 155 	{
 156 		PBUFFER_PRESERVED_CONTENTS,
 157 		PBUFFER_LARGEST_PBUFFER,
 158 		PBUFFER_HEIGHT,
 159 		PBUFFER_WIDTH
 160 	}
 161 	
 162 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 163 	public enum GLEventMask
 164 	{
 165 		PBUFFER_CLOBBER_MASK
 166 	}
 167 	
 168 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 169 	public enum GLEventType
 170 	{
 171 		DAMAGED,
 172 		SAVED
 173 	}
 174 	
 175 	[CCode (cprefix="GDK_GL_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 176 	public enum GLDrawableType
 177 	{
 178 		WINDOW,
 179 		PBUFFER
 180 	}
 181 	
 182 	[CCode (cprefix="GDK_GL_MODE_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 183 	public enum GLConfigMode
 184 	{
 185 		RGB,
 186 		RGBA,
 187 		INDEX,
 188 		SINGLE,
 189 		DOUBLE,
 190 		STEREO,
 191 		ALPHA,
 192 		DEPTH,
 193 		STENCIL,
 194 		ACCUM,
 195 		MULTISAMPLE
 196 	}
 197 	
 198 	[CCode (cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 199 	public static const uint GL_SUCCESS;
 200 	[CCode (cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 201 	public static const uint GL_ATTRIB_LIST_NONE;
 202 	[CCode (cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 203 	public static const uint GL_DONT_CARE;
 204 	[CCode (cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 205 	public static const uint GL_NONE;
 206 	
 207 	[CCode (has_target = false)]
 208 	public delegate void GLProc ();
 209 
 210 	[CCode (cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 211 	public static void gl_init ([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
 212 	[CCode (cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 213 	public static bool gl_init_check ([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
 214 	[CCode (cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 215 	public static bool gl_parse_args ([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
 216 	public static bool gl_query_extension ();
 217 	public static bool gl_query_extension_for_display (Gdk.Display display);
 218 	public static bool gl_query_version (out int major, out int minor);
 219 	public static bool gl_query_version_for_display (Gdk.Display display, out int major, out int minor);
 220 	public static bool gl_query_gl_extension (string extension);
 221 	public static GLProc gl_get_proc_address (string proc_name);
 222 	public static unowned Pango.Font gl_font_use_pango_font (Pango.FontDescription font_desc, int first, int count, int list_base);
 223 	public static unowned Pango.Font gl_font_use_pango_font_for_display (Gdk.Display display, Pango.FontDescription font_desc, int first, int count, int list_base);
 224 		
 225 	[CCode (lower_case_cprefix="gdk_gl_draw_")]
 226 	namespace GLDraw
 227 	{
 228 		public static void cube (bool solid, double size);
 229 		public static void sphere (bool solid, double radius, int slices, int stacks);
 230 		public static void cone (bool solid, double @base, double height, int slices, int stacks);
 231 		public static void torus (bool solid, double inner_radius, double outer_radius, int nsides, int rings);
 232 		public static void tetrahedron  (bool solid);
 233 		public static void octahedron (bool solid);
 234 		public static void dodecahedron (bool solid);
 235 		public static void icosahedron (bool solid);
 236 		public static void teapot (bool solid, double scale);
 237 	}
 238 
 239 	public class GLConfig : GLib.Object
 240 	{
 241 		public GLConfig ([CCode (array_length = false)] int[] attrib_list);
 242 		public GLConfig.for_screen (Gdk.Screen screen, [CCode (array_length = false)] int[] attib_list);
 243 		public GLConfig.by_mode (GLConfigMode mode);
 244 		public GLConfig.by_mode_for_screen (Gdk.Screen screen, GLConfigMode mode);
 245 		public unowned Gdk.Screen get_screen ();
 246 		public bool get_attrib (int attribute, out int @value);
 247 		public unowned Gdk.Colormap get_colormap ();
 248 		public unowned Gdk.Visual get_visual ();
 249 		public int get_depth ();
 250 		public int get_layer_plane ();
 251 		public int get_n_aux_buffers ();
 252 		public int get_n_sample_buffers ();
 253 		public bool is_rgba ();
 254 		public bool is_double_buffered ();
 255 		public bool is_stereo ();
 256 		public bool has_alpha ();
 257 		public bool has_depth_buffer ();
 258 		public bool has_stencil_buffer ();
 259 		public bool has_accum_buffer ();
 260 	}
 261 		
 262 	public class GLContext : GLib.Object
 263 	{
 264 		public GLContext (Gdk.GLDrawable gldrawable, Gdk.GLContext share_list, bool direct, int render_type);
 265 		public void destroy ();
 266 		public bool copy (Gdk.GLContext src, ulong mask);
 267 		public unowned Gdk.GLDrawable get_gl_drawable ();
 268 		public unowned Gdk.GLConfig get_gl_config ();
 269 		public unowned Gdk.GLContext get_share_list ();
 270 		public bool is_direct ();
 271 		public int get_render_type ();
 272 		public static unowned Gdk.GLContext get_current ();
 273 	}
 274 		
 275 	public class GLDrawable : GLib.Object
 276 	{
 277 		public bool make_current (Gdk.GLContext  glcontext);
 278 		public bool is_double_buffered ();
 279 		public void swap_buffers ();
 280 		public void wait_gl ();
 281 		public void wait_gdk ();
 282 		public bool gl_begin (Gdk.GLContext glcontext);
 283 		public void gl_end ();
 284 		public unowned Gdk.GLConfig get_gl_config ();
 285 		public void get_size (out int width, out int height);
 286 		public static Gdk.GLDrawable get_current ();
 287 	
 288 		/*public virtual signal Gdk.GLContext create_new_context (Gdk.GLContext share_list, bool direct, int render_type);
 289 		public virtual signal bool make_context_current (Gdk.GLDrawable read, Gdk.GLContext glcontext);
 290 		public virtual signal bool is_double_buffered ();
 291 		public virtual signal void swap_buffers ();
 292 		public virtual signal void wait_gl ();
 293 		public virtual signal void wait_gdk ();
 294 		public virtual signal bool gl_begin (Gdk.GLDrawable read, Gdk.GLContext glcontext);
 295 		public virtual signal void gl_end ();
 296 		public virtual signal Gdk.GLConfig  get_gl_config ();
 297 		public virtual signal void get_size (out int width, out int height);
 298 		*/
 299 	}
 300 	
 301 	public class GLPixmap : Gdk.Drawable
 302 	{
 303 		public GLPixmap (Gdk.GLConfig glconfig, Gdk.Pixmap pixmap, [CCode (array_length = false)] int[] attrib_list);
 304 		public void destroy ();
 305 		public unowned Gdk.Pixmap get_pixmap ();
 306 	}
 307 
 308 	[CCode (cprefix="gdk_pixmap_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 309 	public class PixmapGL {
 310 		public static unowned Gdk.GLPixmap set_gl_capability (Gdk.Pixmap pixmap, Gdk.GLConfig glconfig, [CCode (array_length = false)] int[] attrib_list);
 311 		public static void unset_gl_capability (Gdk.Pixmap pixmap);
 312 		public static bool is_gl_capable (Gdk.Pixmap pixmap);
 313 		public static unowned Gdk.GLPixmap get_gl_pixmap (Gdk.Pixmap pixmap);
 314 		public static unowned Gdk.GLDrawable get_gl_drawable (Gdk.Pixmap pixmap);
 315 	}
 316 	
 317 	public class GLWindow : Gdk.Drawable
 318 	{
 319 		public GLWindow (Gdk.GLConfig glconfig, Gdk.Window window, [CCode (array_length = false)] int[] attrib_list);
 320 		public void destroy ();
 321 		public unowned Gdk.Window get_window ();
 322 	}
 323 
 324 	[CCode (cprefix="gdk_window_", cheader_filename="gtkglext-1.0/gdk/gdkgl.h")]
 325 	public class WindowGL {
 326 		public static unowned Gdk.GLWindow set_gl_capability (Gdk.Window window, Gdk.GLConfig glconfig, [CCode (array_length = false)] int[] attrib_list);
 327 		public static void unset_gl_capability (Gdk.Window window);
 328 		public static bool is_gl_capable (Gdk.Window window);
 329 		public static unowned Gdk.GLWindow get_gl_window (Gdk.Window window);
 330 		public static unowned Gdk.GLDrawable get_gl_drawable (Gdk.Window window);
 331 	}
 332 }
 333 
 334 [CCode (lower_case_cprefix="gtk_", cprefix="Gtk")]
 335 namespace Gtk
 336 {
 337 	[CCode (cheader_filename="gtkglext-1.0/gtk/gtkgl.h")]
 338 	public static void gl_init ([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
 339 	[CCode (cheader_filename="gtkglext-1.0/gtk/gtkgl.h")]
 340 	public static bool gl_init_check ([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
 341 	[CCode (cheader_filename="gtkglext-1.0/gtk/gtkgl.h")]
 342 	public static bool gl_parse_args ([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
 343 	
 344 	[CCode (cprefix="gtk_widget_", cheader_filename="gtkglext-1.0/gtk/gtkgl.h")]
 345 	public class WidgetGL
 346 	{
 347 		public static bool set_gl_capability (Gtk.Widget widget, Gdk.GLConfig glconfig, Gdk.GLContext? share_list, bool direct, int render_type);
 348 		public static bool is_gl_capable (Gtk.Widget widget);
 349 		public static unowned Gdk.GLConfig get_gl_config (Gtk.Widget widget);
 350 		public static unowned Gdk.GLContext create_gl_context (Gtk.Widget widget, Gdk.GLContext share_list, bool direct, int render_type);
 351 		public static unowned Gdk.GLContext get_gl_context (Gtk.Widget widget);
 352 		public static unowned Gdk.GLWindow  get_gl_window (Gtk.Widget widget);
 353 		public static unowned Gdk.GLDrawable get_gl_drawable (Gtk.Widget widget);
 354 		public static bool gl_begin(Gtk.Widget widget) {
 355 			Gdk.GLContext context = get_gl_context(widget);
 356 			Gdk.GLDrawable drawable = get_gl_drawable(widget);
 357 			return drawable.gl_begin(context);
 358 		}
 359 		public static bool gl_swap(Gtk.Widget widget) {
 360 			Gdk.GLDrawable drawable = get_gl_drawable(widget);
 361 			if(drawable.is_double_buffered()) {
 362 				drawable.swap_buffers();
 363 				return true;
 364 			}
 365 			return false;
 366 		}
 367 		public static void gl_end(Gtk.Widget widget) {
 368 			Gdk.GLDrawable drawable = get_gl_drawable(widget);
 369 			drawable.gl_end();
 370 		}
 371 	}
 372 }

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2021-02-25 10:01:18, 85.4 KB) [[attachment:gladeui-2.0.vapi]]
  • [get | view] (2021-02-25 10:01:18, 14.1 KB) [[attachment:glu.vapi]]
  • [get | view] (2021-02-25 10:01:18, 23.6 KB) [[attachment:glut.vapi]]
  • [get | view] (2021-02-25 10:01:18, 8.1 KB) [[attachment:glx.vapi]]
  • [get | view] (2021-02-25 10:01:18, 12.0 KB) [[attachment:gtkglext-1.0.vapi]]
  • [get | view] (2021-02-25 10:01:18, 6.4 KB) [[attachment:libglfw.vapi]]
  • [get | view] (2021-02-25 10:01:18, 18.7 KB) [[attachment:libvlc.vapi]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.