* should have been gtkglext

This commit is contained in:
marco 2005-03-01 08:30:13 +00:00
parent e567d78a31
commit c47f760d35
22 changed files with 0 additions and 1453 deletions

View File

@ -1,181 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglconfig.h }
{$ifdef read_interface_types}
{ PGdkGLConfig already defined in gdkgltypes.inc }
TGdkGLConfig = record
parent_instance: TGObject;
layer_plane: gint;
n_aux_buffers: gint;
n_sample_buffers: gint;
flag0 : word;
end;
PGdkGLConfigClass = ^TGdkGLConfigClass;
TGdkGLConfigClass = record
parent_class: TGObjectClass;
end;
{$endif read_interface_types}
{$ifdef read_interface_rest}
const
{ Constants for operating on TGdkGLConfig.flag0 }
bm_TGdkGLConfig_is_rgba = 1 shl 0;
bp_TGdkGLConfig_is_rgba = 0;
bm_TGdkGLConfig_is_double_buffered = 1 shl 1;
bp_TGdkGLConfig_is_double_buffered = 1;
bm_TGdkGLConfig_as_single_mode = 1 shl 2;
bp_TGdkGLConfig_as_single_mode = 2;
bm_TGdkGLConfig_is_stereo = 1 shl 3;
bp_TGdkGLConfig_is_stereo = 3;
bm_TGdkGLConfig_has_alpha = 1 shl 4;
bp_TGdkGLConfig_has_alpha = 4;
bm_TGdkGLConfig_has_depth_buffer = 1 shl 5;
bp_TGdkGLConfig_has_depth_buffer = 5;
bm_TGdkGLConfig_has_stencil_buffer = 1 shl 6;
bp_TGdkGLConfig_has_stencil_buffer = 6;
bm_TGdkGLConfig_has_accum_buffer = 1 shl 7;
bp_TGdkGLConfig_has_accum_buffer = 7;
{*
* Display mode bit masks.
*}
const
GDK_GL_MODE_RGB = 0;
GDK_GL_MODE_RGBA = 0; {* same as RGB *}
GDK_GL_MODE_INDEX = 1 shl 0;
GDK_GL_MODE_SINGLE = 0;
GDK_GL_MODE_DOUBLE = 1 shl 1;
GDK_GL_MODE_STEREO = 1 shl 2;
GDK_GL_MODE_ALPHA = 1 shl 3;
GDK_GL_MODE_DEPTH = 1 shl 4;
GDK_GL_MODE_STENCIL = 1 shl 5;
GDK_GL_MODE_ACCUM = 1 shl 6;
GDK_GL_MODE_MULTISAMPLE = 1 shl 7; {* not supported yet *}
type
TGdkGLConfigMode = Longint;
PGdkGLConfigMode = ^TGdkGLConfigMode;
function GDK_TYPE_GL_CONFIG: GType;
function GDK_GL_CONFIG(anObject: Pointer): PGdkGLConfig;
function GDK_GL_CONFIG_CLASS(klass: Pointer): PGdkGLConfigClass;
function GDK_IS_GL_CONFIG(anObject: Pointer): boolean;
function GDK_IS_GL_CONFIG_CLASS(klass: Pointer): boolean;
function GDK_GL_CONFIG_GET_CLASS(obj: Pointer): PGdkGLConfigClass;
function gdk_gl_config_get_type: GType; cdecl; external GdkGLExtLib;
{$ifndef GDK_MULTIHEAD_SAFE}
function gdk_gl_config_new(
attrib_list: PInteger): PGdkGLConfig;
cdecl; external GdkGLExtLib;
{$endif GDK_MULTIHEAD_SAFE}
{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
function gdk_gl_config_new_for_screen(
screen: PGdkScreen;
attrib_list: PInteger): PGdkGLConfig;
cdecl; external GdkGLExtLib;
{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
{$ifndef GDK_MULTIHEAD_SAFE}
function gdk_gl_config_new_by_mode(
mode: TGdkGLConfigMode): PGdkGLConfig;
cdecl; external GdkGLExtLib;
{$endif GDK_MULTIHEAD_SAFE}
{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
function gdk_gl_config_new_by_mode_for_screen(
screen: PGdkScreen;
mode: TGdkGLConfigMode): PGdkGLConfig;
cdecl; external GdkGLExtLib;
{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
function gdk_gl_config_get_screen(glconfig: PGdkGLConfig): PGdkScreen;
cdecl; external GdkGLExtLib;
function gdk_gl_config_get_attrib(glconfig: PGdkGLConfig;
attribute: Integer;
value: PInteger): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_config_get_colormap(glconfig: PGdkGLConfig): PGdkColormap;
cdecl; external GdkGLExtLib;
function gdk_gl_config_get_visual(glconfig: PGdkGLConfig): PGdkVisual;
cdecl; external GdkGLExtLib;
function gdk_gl_config_get_depth (glconfig: PGdkGLConfig): gint;
cdecl; external GdkGLExtLib;
function gdk_gl_config_get_layer_plane (glconfig: PGdkGLConfig): gint;
cdecl; external GdkGLExtLib;
function gdk_gl_config_get_n_aux_buffers (glconfig: PGdkGLConfig): gint;
cdecl; external GdkGLExtLib;
function gdk_gl_config_get_n_sample_buffers (glconfig: PGdkGLConfig): gint;
cdecl; external GdkGLExtLib;
function gdk_gl_config_is_rgba (glconfig: PGdkGLConfig): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_config_is_double_buffered (glconfig: PGdkGLConfig): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_config_is_stereo (glconfig: PGdkGLConfig): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_config_has_alpha (glconfig: PGdkGLConfig): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_config_has_depth_buffer (glconfig: PGdkGLConfig): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_config_has_stencil_buffer (glconfig: PGdkGLConfig): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_config_has_accum_buffer (glconfig: PGdkGLConfig): gboolean;
cdecl; external GdkGLExtLib;
{$endif read_interface_rest}
{$ifdef read_implementation}
function GDK_TYPE_GL_CONFIG: GType;
begin
GDK_TYPE_GL_CONFIG := gdk_gl_config_get_type;
end;
function GDK_GL_CONFIG(anObject: Pointer): PGdkGLConfig;
begin
GDK_GL_CONFIG := PGdkGLConfig(
G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_CONFIG));
end;
function GDK_GL_CONFIG_CLASS(klass: Pointer): PGdkGLConfigClass;
begin
GDK_GL_CONFIG_CLASS := PGdkGLConfigClass(
G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_CONFIG));
end;
function GDK_IS_GL_CONFIG(anObject: Pointer): boolean;
begin
GDK_IS_GL_CONFIG := G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_CONFIG);
end;
function GDK_IS_GL_CONFIG_CLASS(klass: Pointer): boolean;
begin
GDK_IS_GL_CONFIG_CLASS := G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_CONFIG);
end;
function GDK_GL_CONFIG_GET_CLASS(obj: Pointer): PGdkGLConfigClass;
begin
GDK_GL_CONFIG_GET_CLASS := PGdkGLConfigClass(
G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_CONFIG));
end;
{$endif read_implementation}

View File

@ -1,100 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglcontext.h }
{$ifdef read_interface_types}
{ PGdkGLContext already defined in gdkgltypes.inc }
TGdkGLContext = record
parent_instance: TGObject;
end;
PGdkGLContextClass = ^TGdkGLContextClass;
TGdkGLContextClass = record
parent_class: TGObjectClass;
end;
{$endif read_interface_types}
{$ifdef read_interface_rest}
function GDK_TYPE_GL_CONTEXT: GType;
function GDK_GL_CONTEXT(anObject: Pointer): PGdkGLContext;
function GDK_GL_CONTEXT_CLASS(klass: Pointer): PGdkGLContextClass;
function GDK_IS_GL_CONTEXT(anObject: Pointer): boolean;
function GDK_IS_GL_CONTEXT_CLASS(klass: Pointer): boolean;
function GDK_GL_CONTEXT_GET_CLASS(obj: Pointer): PGdkGLContextClass;
function gdk_gl_context_get_type: GType; cdecl; external GdkGLExtLib;
function gdk_gl_context_new(
gldrawable: PGdkGLDrawable;
share_list: PGdkGLContext;
direct: gboolean;
render_type: LongInt): PGdkGLContext;
cdecl; external GdkGLExtLib;
procedure gdk_gl_context_destroy(glcontext: PGdkGLContext);
cdecl; external GdkGLExtLib;
function gdk_gl_context_copy(
glcontext: PGdkGLContext;
src: PGdkGLContext;
mask: LongWord): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_context_get_gl_drawable (glcontext: PGdkGLContext): PGdkGLDrawable;
cdecl; external GdkGLExtLib;
function gdk_gl_context_get_gl_config (glcontext: PGdkGLContext): PGdkGLConfig;
cdecl; external GdkGLExtLib;
function gdk_gl_context_get_share_list (glcontext: PGdkGLContext): PGdkGLContext;
cdecl; external GdkGLExtLib;
function gdk_gl_context_is_direct (glcontext: PGdkGLContext): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_context_get_render_type (glcontext: PGdkGLContext): LongInt;
cdecl; external GdkGLExtLib;
function gdk_gl_context_get_current : PGdkGLContext;
cdecl; external GdkGLExtLib;
{$endif read_interface_rest}
{$ifdef read_implementation}
function GDK_TYPE_GL_CONTEXT: GType;
begin
GDK_TYPE_GL_CONTEXT := gdk_gl_context_get_type;
end;
function GDK_GL_CONTEXT(anObject: Pointer): PGdkGLContext;
begin
GDK_GL_CONTEXT := PGdkGLContext(
G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_CONTEXT));
end;
function GDK_GL_CONTEXT_CLASS(klass: Pointer): PGdkGLContextClass;
begin
GDK_GL_CONTEXT_CLASS := PGdkGLContextClass(
G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_CONTEXT));
end;
function GDK_IS_GL_CONTEXT(anObject: Pointer): boolean;
begin
GDK_IS_GL_CONTEXT := G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_CONTEXT);
end;
function GDK_IS_GL_CONTEXT_CLASS(klass: Pointer): boolean;
begin
GDK_IS_GL_CONTEXT_CLASS := G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_CONTEXT);
end;
function GDK_GL_CONTEXT_GET_CLASS(obj: Pointer): PGdkGLContextClass;
begin
GDK_GL_CONTEXT_GET_CLASS := PGdkGLContextClass(
G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_CONTEXT));
end;
{$endif read_implementation}

View File

@ -1,3 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkgldefs.h }
{ No need to translate anything here }

View File

@ -1,154 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkgldrawable.h
Michalis comments: note that GdkGLDrawable is an interface,
not a class, so
- it's GDK_GL_DRAWABLE_GET_CLASS is implemented using
GDK_GL_DRAWABLE_GET_INTERFACE instead of GDK_GL_DRAWABLE_GET_CLASS
- 1st field of class record is
base_iface: TGTypeInterface;
instead of
parent_class: TGObjectClass;
- Also (this is of course minor thing that does not affect
code using this unit, but still it is preserved in this translation
of C headers to Pascal) names of params of macros are vtable and inst.
}
{$ifdef read_interface_types}
{ PGdkGLDrawable already defined in gdkgltypes.inc }
TGdkGLDrawable = record
parent_instance: TGObject;
end;
PGdkGLDrawableClass = ^TGdkGLDrawableClass;
TGdkGLDrawableClass = record
base_iface: TGTypeInterface;
create_new_context: function(
gldrawable: PGdkGLDrawable;
share_list: PGdkGLContext;
direct: gboolean;
render_type: LongInt): PGdkGLContext; cdecl;
make_context_current: function(
draw: PGdkGLDrawable;
a_read: PGdkGLDrawable;
glcontext: PGdkGLContext): gboolean; cdecl;
is_double_buffered: function(gldrawable: PGdkGLDrawable): gboolean; cdecl;
swap_buffers: procedure(gldrawable: PGdkGLDrawable); cdecl;
wait_gl: procedure(gldrawable: PGdkGLDrawable); cdecl;
wait_gdk: procedure(gldrawable: PGdkGLDrawable); cdecl;
gl_begin: function(
draw: PGdkGLDrawable;
a_read: PGdkGLDrawable;
glcontext: PGdkGLContext): gboolean; cdecl;
gl_end: procedure(gldrawable: PGdkGLDrawable); cdecl;
get_gl_config: function(gldrawable: PGdkGLDrawable): PGdkGLConfig; cdecl;
get_size: procedure(
gldrawable: PGdkGLDrawable;
width, height: PGInt); cdecl;
end;
{$endif read_interface_types}
{$ifdef read_interface_rest}
function GDK_TYPE_GL_DRAWABLE: GType;
function GDK_GL_DRAWABLE(inst: Pointer): PGdkGLDrawable;
function GDK_GL_DRAWABLE_CLASS(vtable: Pointer): PGdkGLDrawableClass;
function GDK_IS_GL_DRAWABLE(inst: Pointer): boolean;
function GDK_IS_GL_DRAWABLE_CLASS(vtable: Pointer): boolean;
function GDK_GL_DRAWABLE_GET_CLASS(inst: Pointer): PGdkGLDrawableClass;
function gdk_gl_drawable_get_type: GType;
cdecl; external GdkGLExtLib;
function gdk_gl_drawable_make_current(
gldrawable: PGdkGLDrawable;
glcontext: PGdkGLContext)
: gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_drawable_is_double_buffered(
gldrawable: PGdkGLDrawable)
: gboolean;
cdecl; external GdkGLExtLib;
procedure gdk_gl_drawable_swap_buffers(
gldrawable: PGdkGLDrawable);
cdecl; external GdkGLExtLib;
procedure gdk_gl_drawable_wait_gl(
gldrawable: PGdkGLDrawable);
cdecl; external GdkGLExtLib;
procedure gdk_gl_drawable_wait_gdk(
gldrawable: PGdkGLDrawable);
cdecl; external GdkGLExtLib;
function gdk_gl_drawable_gl_begin(
gldrawable: PGdkGLDrawable;
glcontext: PGdkGLContext)
: gboolean;
cdecl; external GdkGLExtLib;
procedure gdk_gl_drawable_gl_end(
gldrawable: PGdkGLDrawable);
cdecl; external GdkGLExtLib;
function gdk_gl_drawable_get_gl_config(
gldrawable: PGdkGLDrawable)
: PGdkGLConfig;
cdecl; external GdkGLExtLib;
procedure gdk_gl_drawable_get_size(
gldrawable: PGdkGLDrawable;
width, height: PGInt);
cdecl; external GdkGLExtLib;
function gdk_gl_drawable_get_current
: PGdkGLDrawable;
cdecl; external GdkGLExtLib;
{$endif read_interface_rest}
{$ifdef read_implementation}
function GDK_TYPE_GL_DRAWABLE: GType;
begin
GDK_TYPE_GL_DRAWABLE := gdk_gl_drawable_get_type;
end;
function GDK_GL_DRAWABLE(inst: Pointer): PGdkGLDrawable;
begin
GDK_GL_DRAWABLE := PGdkGLDrawable(
G_TYPE_CHECK_INSTANCE_CAST(inst, GDK_TYPE_GL_DRAWABLE));
end;
function GDK_GL_DRAWABLE_CLASS(vtable: Pointer): PGdkGLDrawableClass;
begin
GDK_GL_DRAWABLE_CLASS := PGdkGLDrawableClass(
G_TYPE_CHECK_CLASS_CAST(vtable, GDK_TYPE_GL_DRAWABLE));
end;
function GDK_IS_GL_DRAWABLE(inst: Pointer): boolean;
begin
GDK_IS_GL_DRAWABLE := G_TYPE_CHECK_INSTANCE_TYPE(inst, GDK_TYPE_GL_DRAWABLE);
end;
function GDK_IS_GL_DRAWABLE_CLASS(vtable: Pointer): boolean;
begin
GDK_IS_GL_DRAWABLE_CLASS := G_TYPE_CHECK_CLASS_TYPE(vtable, GDK_TYPE_GL_DRAWABLE);
end;
function GDK_GL_DRAWABLE_GET_CLASS(inst: Pointer): PGdkGLDrawableClass;
begin
GDK_GL_DRAWABLE_GET_CLASS := PGdkGLDrawableClass(
G_TYPE_INSTANCE_GET_INTERFACE(inst, GDK_TYPE_GL_DRAWABLE));
end;
{$endif read_implementation}

View File

@ -1,85 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglenumtypes.h }
{ Translation to Pascal:
used regexps
GType \(.*\) (void);
to
function \1: GType; cdecl; external GdkGLExtLib;
#define \(.*\) (\(.*\)())
to
function \1: GType;
cdecl; external GdkGLExtLib name '\2';
}
{$ifdef read_interface_rest}
{* enumerations from "gdkgltokens.h" *}
function gdk_gl_config_attrib_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_CONFIG_ATTRIB: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_config_attrib_get_type';
function gdk_gl_config_caveat_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_CONFIG_CAVEAT: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_config_caveat_get_type';
function gdk_gl_visual_type_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_VISUAL_TYPE: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_visual_type_get_type';
function gdk_gl_transparent_type_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_TRANSPARENT_TYPE: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_transparent_type_get_type';
function gdk_gl_drawable_type_mask_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_DRAWABLE_TYPE_MASK: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_drawable_type_mask_get_type';
function gdk_gl_render_type_mask_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_RENDER_TYPE_MASK: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_render_type_mask_get_type';
function gdk_gl_buffer_mask_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_BUFFER_MASK: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_buffer_mask_get_type';
function gdk_gl_config_error_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_CONFIG_ERROR: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_config_error_get_type';
function gdk_gl_render_type_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_RENDER_TYPE: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_render_type_get_type';
function gdk_gl_drawable_attrib_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_DRAWABLE_ATTRIB: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_drawable_attrib_get_type';
function gdk_gl_pbuffer_attrib_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_PBUFFER_ATTRIB: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_pbuffer_attrib_get_type';
function gdk_gl_event_mask_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_EVENT_MASK: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_event_mask_get_type';
function gdk_gl_event_type_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_EVENT_TYPE: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_event_type_get_type';
function gdk_gl_drawable_type_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_DRAWABLE_TYPE: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_drawable_type_get_type';
{* enumerations from "gdkglconfig.h" *}
function gdk_gl_config_mode_get_type: GType; cdecl; external GdkGLExtLib;
function GDK_TYPE_GL_CONFIG_MODE: GType;
cdecl; external GdkGLExtLib name 'gdk_gl_config_mode_get_type';
{$endif read_interface_rest}
{$ifdef read_implementation}
{$endif read_implementation}

View File

@ -1,52 +0,0 @@
{ GdkGLExt - OpenGL Extension to GDK
Copyright (C) 2002-2004 Naofumi Yasufuku
These Pascal bindings copyright 2005 Michalis Kamburelis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
}
{ Translated from C header /usr/include/gtkglext-1.0/gdk/gdkgl.h
(this is probably standardized system-wide location
of this header). }
{$mode objfpc}
unit gdkglext;
interface
uses Glib2, Gdk2;
const
GdkGLExtLib =
{$ifdef WIN32} 'libgdkglext-win32-1.0-0.dll'
{$else} 'libgdkglext-x11-1.0.so'
{$endif};
type
{$define read_interface_types}
{$I gdkglext_includes.inc}
{$undef read_interface_types}
{$define read_interface_rest}
{$I gdkglext_includes.inc}
{$undef read_interface_rest}
implementation
{$define read_implementation}
{$I gdkglext_includes.inc}
end.

View File

@ -1,14 +0,0 @@
{$I gdkgldefs.inc}
{$I gdkglversion.inc}
{$I gdkgltokens.inc}
{$I gdkgltypes.inc}
{$I gdkglenumtypes.inc}
{$I gdkglinit.inc}
{$I gdkglquery.inc}
{$I gdkglconfig.inc}
{$I gdkglcontext.inc}
{$I gdkgldrawable.inc}
{$I gdkglpixmap.inc}
{$I gdkglwindow.inc}
{$I gdkglfont.inc}
{$I gdkglshapes.inc}

View File

@ -1,22 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglfont.h }
{$ifdef read_interface_rest}
{$ifndef GDK_MULTIHEAD_SAFE}
{TODO
PangoFont *gdk_gl_font_use_pango_font (const PangoFontDescription *font_desc,
int first,
int count,
int list_base);}
{$endif GDK_MULTIHEAD_SAFE}
{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
{TODO
PangoFont *gdk_gl_font_use_pango_font_for_display (GdkDisplay *display,
const PangoFontDescription *font_desc,
int first,
int count,
int list_base);}
{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
{$endif read_interface_rest}

View File

@ -1,16 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglinit.h }
{$ifdef read_interface_rest}
{*
* Initialization routines.
*}
function gdk_gl_parse_args(argc: Plongint; argv: PPPChar): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_init_check(argc: Plongint; argv: PPPChar): gboolean;
cdecl; external GdkGLExtLib;
procedure gdk_gl_init(argc: Plongint; argv: PPPChar);
cdecl; external GdkGLExtLib;
{$endif read_interface_rest}

View File

@ -1,110 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglpixmap.h }
{$ifdef read_interface_types}
{ PGdkGLPixmap already defined in gdkgltypes.inc }
TGdkGLPixmap = record
parent_instance: TGObject;
drawable: PGdkDrawable; {* Associated GdkPixmap *}
end;
PGdkGLPixmapClass = ^TGdkGLPixmapClass;
TGdkGLPixmapClass = record
parent_class: TGObjectClass;
end;
{$endif read_interface_types}
{$ifdef read_interface_rest}
function GDK_TYPE_GL_PIXMAP: GType;
function GDK_GL_PIXMAP(anObject: Pointer): PGdkGLPixmap;
function GDK_GL_PIXMAP_CLASS(klass: Pointer): PGdkGLPixmapClass;
function GDK_IS_GL_PIXMAP(anObject: Pointer): boolean;
function GDK_IS_GL_PIXMAP_CLASS(klass: Pointer): boolean;
function GDK_GL_PIXMAP_GET_CLASS(obj: Pointer): PGdkGLPixmapClass;
function gdk_gl_pixmap_get_type: GType; cdecl; external GdkGLExtLib;
{*
* attrib_list is currently unused. This must be set to NULL or empty
* (first attribute of None). See GLX 1.3 spec.
*}
function gdk_gl_pixmap_new(
glconfig: PGdkGLConfig;
pixmap: PGdkPixmap;
attrib_list: PLongInt): PGdkGLPixmap;
cdecl; external GdkGLExtLib;
procedure gdk_gl_pixmap_destroy(glpixmap: PGdkGLPixmap);
cdecl; external GdkGLExtLib;
function gdk_gl_pixmap_get_pixmap(glpixmap: PGdkGLPixmap): PGdkPixmap;
cdecl; external GdkGLExtLib;
{*
* OpenGL extension to GdkPixmap
*}
function gdk_pixmap_set_gl_capability(
pixmap: PGdkPixmap;
glconfig: PGdkGLConfig;
attrib_list: PLongInt): PGdkGLPixmap;
cdecl; external GdkGLExtLib;
procedure gdk_pixmap_unset_gl_capability(pixmap: PGdkPixmap);
cdecl; external GdkGLExtLib;
function gdk_pixmap_is_gl_capable(pixmap: PGdkPixmap): gboolean;
cdecl; external GdkGLExtLib;
function gdk_pixmap_get_gl_pixmap(pixmap: PGdkPixmap): PGdkGLPixmap;
cdecl; external GdkGLExtLib;
function gdk_pixmap_get_gl_drawable(pixmap: PGdkPixmap): PGdkGLDrawable;
{$endif read_interface_rest}
{$ifdef read_implementation}
function GDK_TYPE_GL_PIXMAP: GType;
begin
GDK_TYPE_GL_PIXMAP := gdk_gl_pixmap_get_type;
end;
function GDK_GL_PIXMAP(anObject: Pointer): PGdkGLPixmap;
begin
GDK_GL_PIXMAP := PGdkGLPixmap(
G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_PIXMAP));
end;
function GDK_GL_PIXMAP_CLASS(klass: Pointer): PGdkGLPixmapClass;
begin
GDK_GL_PIXMAP_CLASS := PGdkGLPixmapClass(
G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_PIXMAP));
end;
function GDK_IS_GL_PIXMAP(anObject: Pointer): boolean;
begin
GDK_IS_GL_PIXMAP := G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_PIXMAP);
end;
function GDK_IS_GL_PIXMAP_CLASS(klass: Pointer): boolean;
begin
GDK_IS_GL_PIXMAP_CLASS := G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_PIXMAP);
end;
function GDK_GL_PIXMAP_GET_CLASS(obj: Pointer): PGdkGLPixmapClass;
begin
GDK_GL_PIXMAP_GET_CLASS := PGdkGLPixmapClass(
G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_PIXMAP));
end;
function gdk_pixmap_get_gl_drawable(pixmap: PGdkPixmap): PGdkGLDrawable;
begin
gdk_pixmap_get_gl_drawable :=
GDK_GL_DRAWABLE (gdk_pixmap_get_gl_pixmap (pixmap));
end;
{$endif read_implementation}

View File

@ -1,34 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglquery.h }
{$ifdef read_interface_rest}
{$ifndef GDK_MULTIHEAD_SAFE}
function gdk_gl_query_extension: gboolean;
cdecl; external GdkGLExtLib;
{$endif GDK_MULTIHEAD_SAFE}
{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
function gdk_gl_query_extension_for_display(display: PGdkDisplay): gboolean;
cdecl; external GdkGLExtLib;
{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
{$ifndef GDK_MULTIHEAD_SAFE}
function gdk_gl_query_version(
var major, minor: LongInt): gboolean;
cdecl; external GdkGLExtLib;
{$endif GDK_MULTIHEAD_SAFE}
{$ifdef GDKGLEXT_MULTIHEAD_SUPPORT}
function gdk_gl_query_version_for_display(
display: PGdkDisplay;
var major, minor: LongInt): gboolean;
cdecl; external GdkGLExtLib;
{$endif GDKGLEXT_MULTIHEAD_SUPPORT}
function gdk_gl_query_gl_extension(extension: PChar): gboolean;
cdecl; external GdkGLExtLib;
function gdk_gl_get_proc_address(proc_name: PChar): TGdkGLProc;
cdecl; external GdkGLExtLib;
{$endif read_interface_rest}

View File

@ -1,50 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglshapes.h }
{$ifdef read_interface_rest}
procedure gdk_gl_draw_cube(
solid: gboolean;
size: Double);
cdecl; external GdkGLExtLib;
procedure gdk_gl_draw_sphere(
solid: gboolean;
radius: Double;
slices: LongInt;
stacks: LongInt);
cdecl; external GdkGLExtLib;
procedure gdk_gl_draw_cone(
solid: gboolean;
base: Double;
height: Double;
slices: LongInt;
stacks: LongInt);
cdecl; external GdkGLExtLib;
procedure gdk_gl_draw_torus(
solid: gboolean;
inner_radius: Double;
outer_radius: Double;
nsides: LongInt;
rings: LongInt);
cdecl; external GdkGLExtLib;
procedure gdk_gl_draw_tetrahedron (solid: gboolean);
cdecl; external GdkGLExtLib;
procedure gdk_gl_draw_octahedron (solid: gboolean);
cdecl; external GdkGLExtLib;
procedure gdk_gl_draw_dodecahedron (solid: gboolean);
cdecl; external GdkGLExtLib;
procedure gdk_gl_draw_icosahedron (solid: gboolean);
cdecl; external GdkGLExtLib;
procedure gdk_gl_draw_teapot(
solid: gboolean;
scale: Double);
cdecl; external GdkGLExtLib;
{$endif read_interface_rest}

View File

@ -1,270 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkgltokens.h }
{$ifdef read_interface_types}
TGdkGLConfigAttrib = LongInt;
TGdkGLConfigCaveat = LongInt;
TGdkGLVisualType = LongInt;
TGdkGLTransparentType = LongInt;
TGdkGLDrawableTypeMask = LongInt;
TGdkGLRenderTypeMask = LongInt;
TGdkGLBufferMask = LongInt;
TGdkGLConfigError = LongInt;
TGdkGLRenderType = LongInt;
TGdkGLDrawableAttrib = LongInt;
TGdkGLPbufferAttrib = LongInt;
TGdkGLEventMask = LongInt;
TGdkGLEventType = LongInt;
TGdkGLDrawableType = LongInt;
{$endif read_interface_types}
{$ifdef read_interface_rest}
{*
* Success return value
*}
const
GDK_GL_SUCCESS = 0; {* same as 'Success' of X11 *}
{*
* Attribute list terminator
*}
GDK_GL_ATTRIB_LIST_NONE = 0; {* same as 'None' of X11 *}
{*
* This source is based on the OpenGL(R) Sample Implementation by SGI.
*}
{*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
*}
{*
* Visual Config Attributes.
*}
GDK_GL_USE_GL = 1; {* support GLX rendering *}
GDK_GL_BUFFER_SIZE = 2; {* depth of the color buffer *}
GDK_GL_LEVEL = 3; {* level in plane stacking *}
GDK_GL_RGBA = 4; {* true if RGBA mode *}
GDK_GL_DOUBLEBUFFER = 5; {* double buffering supported *}
GDK_GL_STEREO = 6; {* stereo buffering supported *}
GDK_GL_AUX_BUFFERS = 7; {* number of aux buffers *}
GDK_GL_RED_SIZE = 8; {* number of red component bits *}
GDK_GL_GREEN_SIZE = 9; {* number of green component bits *}
GDK_GL_BLUE_SIZE = 10; {* number of blue component bits *}
GDK_GL_ALPHA_SIZE = 11; {* number of alpha component bits *}
GDK_GL_DEPTH_SIZE = 12; {* number of depth bits *}
GDK_GL_STENCIL_SIZE = 13; {* number of stencil bits *}
GDK_GL_ACCUM_RED_SIZE = 14; {* number of red accum bits *}
GDK_GL_ACCUM_GREEN_SIZE = 15; {* number of green accum bits *}
GDK_GL_ACCUM_BLUE_SIZE = 16; {* number of blue accum bits *}
GDK_GL_ACCUM_ALPHA_SIZE = 17; {* number of alpha accum bits *}
{*
* FBConfig-specific attributes.
* [ GLX 1.3 and later ]
*}
GDK_GL_CONFIG_CAVEAT = $20;
GDK_GL_X_VISUAL_TYPE = $22;
GDK_GL_TRANSPARENT_TYPE = $23;
GDK_GL_TRANSPARENT_INDEX_VALUE = $24;
GDK_GL_TRANSPARENT_RED_VALUE = $25;
GDK_GL_TRANSPARENT_GREEN_VALUE = $26;
GDK_GL_TRANSPARENT_BLUE_VALUE = $27;
GDK_GL_TRANSPARENT_ALPHA_VALUE = $28;
GDK_GL_DRAWABLE_TYPE = $8010;
GDK_GL_RENDER_TYPE = $8011;
GDK_GL_X_RENDERABLE = $8012;
GDK_GL_FBCONFIG_ID = $8013;
GDK_GL_MAX_PBUFFER_WIDTH = $8016;
GDK_GL_MAX_PBUFFER_HEIGHT = $8017;
GDK_GL_MAX_PBUFFER_PIXELS = $8018;
GDK_GL_VISUAL_ID = $800B;
GDK_GL_SCREEN = $800C;
{*
* Multisampling configuration attributes.
* [ GLX 1.4 and later ]
*}
GDK_GL_SAMPLE_BUFFERS = 100000;
GDK_GL_SAMPLES = 100001;
{ Those were values for TGdkGLConfigAttrib }
{*
* Generic "don't care" value.
* [ GLX 1.3 and later ]
*}
GDK_GL_DONT_CARE = $FFFFFFFF;
{*
* "none" value.
* [ GLX 1.3 and later ]
*}
GDK_GL_NONE = $8000;
{*
* GLX_CONFIG_CAVEAT attribute values.
* [ GLX 1.3 and later ]
*}
GDK_GL_CONFIG_CAVEAT_DONT_CARE = $FFFFFFFF; {* GDK_GL_DONT_CARE *}
GDK_GL_CONFIG_CAVEAT_NONE = $8000; {* GDK_GL_NONE *}
GDK_GL_SLOW_CONFIG = $8001;
GDK_GL_NON_CONFORMANT_CONFIG = $800D;
{ Those were values for TGdkGLConfigCaveat }
{*
* GLX_X_VISUAL_TYPE attribute values.
* [ GLX 1.3 and later ]
*}
GDK_GL_VISUAL_TYPE_DONT_CARE = $FFFFFFFF; {* GDK_GL_DONT_CARE *}
GDK_GL_TRUE_COLOR = $8002;
GDK_GL_DIRECT_COLOR = $8003;
GDK_GL_PSEUDO_COLOR = $8004;
GDK_GL_STATIC_COLOR = $8005;
GDK_GL_GRAY_SCALE = $8006;
GDK_GL_STATIC_GRAY = $8007;
{ Those were values for TGdkGLVisualType }
{*
* GLX_TRANSPARENT_TYPE attribute values.
* [ GLX 1.3 and later ]
*}
GDK_GL_TRANSPARENT_NONE = $8000; {* GDK_GL_NONE *}
GDK_GL_TRANSPARENT_RGB = $8008;
GDK_GL_TRANSPARENT_INDEX = $8009;
{ Those were values for TGdkGLTransparentType }
{*
* GLX_DRAWABLE_TYPE bits.
* [ GLX 1.3 and later ]
*}
GDK_GL_WINDOW_BIT = 1 shl 0; {* $00000001 *}
GDK_GL_PIXMAP_BIT = 1 shl 1; {* $00000002 *}
GDK_GL_PBUFFER_BIT = 1 shl 2; {* $00000004 *}
{ Those were values for TGdkGLDrawableTypeMask }
{*
* GLX_RENDER_TYPE bits.
* [ GLX 1.3 and later ]
*}
GDK_GL_RGBA_BIT = 1 shl 0; {* $00000001 *}
GDK_GL_COLOR_INDEX_BIT = 1 shl 1; {* $00000002 *}
{ Those were values for TGdkGLRenderTypeMask }
{*
* Buffer mask bits.
* [ GLX 1.3 and later ]
*}
GDK_GL_FRONT_LEFT_BUFFER_BIT = 1 shl 0; {* $00000001 *}
GDK_GL_FRONT_RIGHT_BUFFER_BIT = 1 shl 1; {* $00000002 *}
GDK_GL_BACK_LEFT_BUFFER_BIT = 1 shl 2; {* $00000004 *}
GDK_GL_BACK_RIGHT_BUFFER_BIT = 1 shl 3; {* $00000008 *}
GDK_GL_AUX_BUFFERS_BIT = 1 shl 4; {* $00000010 *}
GDK_GL_DEPTH_BUFFER_BIT = 1 shl 5; {* $00000020 *}
GDK_GL_STENCIL_BUFFER_BIT = 1 shl 6; {* $00000040 *}
GDK_GL_ACCUM_BUFFER_BIT = 1 shl 7; {* $00000080 *}
{ Those were values for TGdkGLBufferMask }
{*
* Error return values from glXGetConfig. Success is indicated by
* a value of 0.
*}
GDK_GL_BAD_SCREEN = 1; {* screen # is bad *}
GDK_GL_BAD_ATTRIBUTE = 2; {* attribute to get is bad *}
GDK_GL_NO_EXTENSION = 3; {* no glx extension on server *}
GDK_GL_BAD_VISUAL = 4; {* visual # not known by GLX *}
GDK_GL_BAD_CONTEXT = 5; {* returned only by import_context EXT? *}
GDK_GL_BAD_VALUE = 6; {* returned only by glXSwapIntervalSGI? *}
GDK_GL_BAD_ENUM = 7; {* unused? *}
{ Those were values for TGdkGLConfigError }
{*
* glXCreateNewContext render_type attribute values.
* [ GLX 1.3 and later ]
*}
GDK_GL_RGBA_TYPE = $8014;
GDK_GL_COLOR_INDEX_TYPE = $8015;
{ Those were values for TGdkGLRenderType }
{*
* glXQueryDrawable attributes.
* [ GLX 1.3 and later ]
*}
GDK_GL_PRESERVED_CONTENTS = $801B;
GDK_GL_LARGEST_PBUFFER = $801C;
GDK_GL_WIDTH = $801D;
GDK_GL_HEIGHT = $801E;
GDK_GL_EVENT_MASK = $801F;
{ Those were values for TGdkGLDrawableAttrib }
{*
* glXCreatePbuffer attributes.
* [ GLX 1.3 and later ]
*}
GDK_GL_PBUFFER_PRESERVED_CONTENTS = $801B; {* GDK_GL_PRESERVED_CONTENTS *}
GDK_GL_PBUFFER_LARGEST_PBUFFER = $801C; {* GDK_GL_LARGEST_PBUFFER *}
GDK_GL_PBUFFER_HEIGHT = $8040;
GDK_GL_PBUFFER_WIDTH = $8041;
{ Those were values for TGdkGLPbufferAttrib }
{*
* glXSelectEvent event mask bits.
* [ GLX 1.3 and later ]
*}
GDK_GL_PBUFFER_CLOBBER_MASK = 1 shl 27; {* $08000000 *}
{ Those were values for TGdkGLEventMask }
{*
* GLXPbufferClobberEvent event_type values.
* [ GLX 1.3 and later ]
*}
GDK_GL_DAMAGED = $8020;
GDK_GL_SAVED = $8021;
{ Those were values for TGdkGLEventType }
{*
* GLXPbufferClobberEvent draw_type values.
* [ GLX 1.3 and later ]
*}
{ Pascal translation comments:
Name GDK_GL_WINDOW conflicts (even in case-sensitve C,
but there macros conflicts are not errors)
with function GDK_GL_WINDOW in gdkglwindow.inc.
Renamed to GDK_GL_WINDOW_VALUE. }
GDK_GL_WINDOW_VALUE = $8022;
GDK_GL_PBUFFER = $8023;
{ Those were values for TGdkGLDrawableType }
{$endif read_interface_rest}

View File

@ -1,31 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkgltypes.h }
{$ifdef read_interface_types}
{*
* Forward declarations of commonly used types
*}
{ Comments for Pascal translation: TGdkGLProc is a procedure address
returned by gdk_gl_get_proc_address.
Actually one cannot say is it procedure or a function,
what parameters it takes and even it's calling convention
(e.g. under Win32 procedures from OpenGL32.dll
use stdcall calling convention, not cdecl).
That's why I didn't translate it as "procedure; cdecl;"
(this would be a strict translation of what is expressed in C header)
but I translated it as a generic Pointer. }
TGdkGLProc = Pointer;
PGdkGLConfig = ^TGdkGLConfig;
PGdkGLContext = ^TGdkGLContext;
PGdkGLDrawable = ^TGdkGLDrawable;
PGdkGLPixmap = ^TGdkGLPixmap;
PGdkGLWindow = ^TGdkGLWindow;
{$endif read_interface_types}
{$ifdef read_implementation}
{$endif read_implementation}

View File

@ -1,50 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglversion.h }
{ Comments for Pascal translation of gdkglext:
I prefixed constants (describing header version) and
macro (checking versus header version) with "HEADER_",
since Pascal is not case sensitive.
}
{$ifdef read_interface_rest}
{*
* Compile time version.
*}
const
HEADER_GDKGLEXT_MAJOR_VERSION = 1;
HEADER_GDKGLEXT_MINOR_VERSION = 0;
HEADER_GDKGLEXT_MICRO_VERSION = 6;
HEADER_GDKGLEXT_INTERFACE_AGE = 4;
HEADER_GDKGLEXT_BINARY_AGE = 6;
{*
* Check whether a GdkGLExt version equal to or greater than
* major.minor.micro is present.
*}
function HEADER_GDKGLEXT_CHECK_VERSION(major, minor, micro: guint): boolean;
{*
* Library version.
*}
var
gdkglext_major_version: guint; cvar; external;
gdkglext_minor_version: guint; cvar; external;
gdkglext_micro_version: guint; cvar; external;
gdkglext_interface_age: guint; cvar; external;
gdkglext_binary_age : guint; cvar; external;
{$endif read_interface_rest}
{$ifdef read_implementation}
function HEADER_GDKGLEXT_CHECK_VERSION(major, minor, micro: guint): boolean;
begin
HEADER_GDKGLEXT_CHECK_VERSION :=
(HEADER_GDKGLEXT_MAJOR_VERSION > major) or
( (HEADER_GDKGLEXT_MAJOR_VERSION = major) and (HEADER_GDKGLEXT_MINOR_VERSION > minor) ) or
( (HEADER_GDKGLEXT_MAJOR_VERSION = major) and (HEADER_GDKGLEXT_MINOR_VERSION = minor) and
(HEADER_GDKGLEXT_MICRO_VERSION >= micro) );
end;
{$endif read_implementation}

View File

@ -1,110 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gdk/gdkglwindow.h }
{$ifdef read_interface_types}
{ PGdkGLWindow already defined in gdkgltypes.inc }
TGdkGLWindow = record
parent_instance: TGObject;
drawable: PGdkDrawable; {* Associated GdkWindow *}
end;
PGdkGLWindowClass = ^TGdkGLWindowClass;
TGdkGLWindowClass = record
parent_class: TGObjectClass;
end;
{$endif read_interface_types}
{$ifdef read_interface_rest}
function GDK_TYPE_GL_WINDOW: GType;
function GDK_GL_WINDOW(anObject: Pointer): PGdkGLWindow;
function GDK_GL_WINDOW_CLASS(klass: Pointer): PGdkGLWindowClass;
function GDK_IS_GL_WINDOW(anObject: Pointer): boolean;
function GDK_IS_GL_WINDOW_CLASS(klass: Pointer): boolean;
function GDK_GL_WINDOW_GET_CLASS(obj: Pointer): PGdkGLWindowClass;
function gdk_gl_window_get_type: GType; cdecl; external GdkGLExtLib;
{*
* attrib_list is currently unused. This must be set to NULL or empty
* (first attribute of None). See GLX 1.3 spec.
*}
function gdk_gl_window_new(
glconfig: PGdkGLConfig;
window: PGdkWindow;
attrib_list: PLongInt): PGdkGLWindow;
cdecl; external GdkGLExtLib;
procedure gdk_gl_window_destroy(glwindow: PGdkGLWindow);
cdecl; external GdkGLExtLib;
function gdk_gl_window_get_window(glwindow: PGdkGLWindow): PGdkWindow;
cdecl; external GdkGLExtLib;
{*
* OpenGL extension to GdkWindow
*}
function gdk_window_set_gl_capability(
window: PGdkWindow;
glconfig: PGdkGLConfig;
attrib_list: PLongInt): PGdkGLWindow;
cdecl; external GdkGLExtLib;
procedure gdk_window_unset_gl_capability(window: PGdkWindow);
cdecl; external GdkGLExtLib;
function gdk_window_is_gl_capable(window: PGdkWindow): gboolean;
cdecl; external GdkGLExtLib;
function gdk_window_get_gl_window(window: PGdkWindow): PGdkGLWindow;
cdecl; external GdkGLExtLib;
function gdk_window_get_gl_drawable(window: PGdkWindow): PGdkGLDrawable;
{$endif read_interface_rest}
{$ifdef read_implementation}
function GDK_TYPE_GL_WINDOW: GType;
begin
GDK_TYPE_GL_WINDOW := gdk_gl_window_get_type;
end;
function GDK_GL_WINDOW(anObject: Pointer): PGdkGLWindow;
begin
GDK_GL_WINDOW := PGdkGLWindow(
G_TYPE_CHECK_INSTANCE_CAST(anObject, GDK_TYPE_GL_WINDOW));
end;
function GDK_GL_WINDOW_CLASS(klass: Pointer): PGdkGLWindowClass;
begin
GDK_GL_WINDOW_CLASS := PGdkGLWindowClass(
G_TYPE_CHECK_CLASS_CAST(klass, GDK_TYPE_GL_WINDOW));
end;
function GDK_IS_GL_WINDOW(anObject: Pointer): boolean;
begin
GDK_IS_GL_WINDOW := G_TYPE_CHECK_INSTANCE_TYPE(anObject, GDK_TYPE_GL_WINDOW);
end;
function GDK_IS_GL_WINDOW_CLASS(klass: Pointer): boolean;
begin
GDK_IS_GL_WINDOW_CLASS := G_TYPE_CHECK_CLASS_TYPE(klass, GDK_TYPE_GL_WINDOW);
end;
function GDK_GL_WINDOW_GET_CLASS(obj: Pointer): PGdkGLWindowClass;
begin
GDK_GL_WINDOW_GET_CLASS := PGdkGLWindowClass(
G_TYPE_INSTANCE_GET_CLASS(obj, GDK_TYPE_GL_WINDOW));
end;
function gdk_window_get_gl_drawable(window: PGdkWindow): PGdkGLDrawable;
begin
gdk_window_get_gl_drawable :=
GDK_GL_DRAWABLE (gdk_window_get_gl_window (window));
end;
{$endif read_implementation}

View File

@ -1,3 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gtk/gtkgldefs.h }
{ No need to translate anything here }

View File

@ -1,54 +0,0 @@
{ GtkGLExt - OpenGL Extension to GTK+
Copyright (C) 2002-2004 Naofumi Yasufuku
These Pascal bindings copyright 2005 Michalis Kamburelis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
}
{ Translated from C header /usr/include/gtkglext-1.0/gtk/gtkgl.h
(this is probably standardized system-wide location
of this header). }
{$mode objfpc}
unit gtkglext;
interface
uses Glib2, Gdk2, Gtk2, GdkGLExt;
const
GtkGLExtLib =
{$ifdef WIN32} 'libgtkglext-win32-1.0-0.dll'
{$else} 'libgtkglext-x11-1.0.so'
{$endif};
{ gtkglext does not (for now) define any objects ("objects" in the glib sense),
so "read_interface_types" section is not really used now. }
{type}
{$define read_interface_types}
{$I gtkglext_includes.inc}
{$undef read_interface_types}
{$define read_interface_rest}
{$I gtkglext_includes.inc}
{$undef read_interface_rest}
implementation
{$define read_implementation}
{$I gtkglext_includes.inc}
end.

View File

@ -1,4 +0,0 @@
{$I gtkgldefs.inc}
{$I gtkglversion.inc}
{$I gtkglinit.inc}
{$I gtkglwidget.inc}

View File

@ -1,16 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gtk/gtkglinit.h }
{$ifdef read_interface_rest}
{*
* Initialization routines.
*}
function gtk_gl_parse_args(argc: Plongint; argv: PPPChar): gboolean;
cdecl; external GtkGLExtLib;
function gtk_gl_init_check(argc: Plongint; argv: PPPChar): gboolean;
cdecl; external GtkGLExtLib;
procedure gtk_gl_init(argc: Plongint; argv: PPPChar);
cdecl; external GtkGLExtLib;
{$endif read_interface_rest}

View File

@ -1,50 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gtk/gtkglversion.h }
{ Comments for Pascal translation of gtkglext:
I prefixed constants (describing header version) and
macro (checking versus header version) with "HEADER_",
since Pascal is not case sensitive.
}
{$ifdef read_interface_rest}
{*
* Compile time version.
*}
const
HEADER_GTKGLEXT_MAJOR_VERSION = 1;
HEADER_GTKGLEXT_MINOR_VERSION = 0;
HEADER_GTKGLEXT_MICRO_VERSION = 6;
HEADER_GTKGLEXT_INTERFACE_AGE = 4;
HEADER_GTKGLEXT_BINARY_AGE = 6;
{*
* Check whether a GtkGLExt version equal to or greater than
* major.minor.micro is present.
*}
function HEADER_GTKGLEXT_CHECK_VERSION(major, minor, micro: guint): boolean;
{*
* Library version.
*}
var
gtkglext_major_version: guint; cvar; external;
gtkglext_minor_version: guint; cvar; external;
gtkglext_micro_version: guint; cvar; external;
gtkglext_interface_age: guint; cvar; external;
gtkglext_binary_age : guint; cvar; external;
{$endif read_interface_rest}
{$ifdef read_implementation}
function HEADER_GTKGLEXT_CHECK_VERSION(major, minor, micro: guint): boolean;
begin
HEADER_GTKGLEXT_CHECK_VERSION :=
(HEADER_GTKGLEXT_MAJOR_VERSION > major) or
( (HEADER_GTKGLEXT_MAJOR_VERSION = major) and (HEADER_GTKGLEXT_MINOR_VERSION > minor) ) or
( (HEADER_GTKGLEXT_MAJOR_VERSION = major) and (HEADER_GTKGLEXT_MINOR_VERSION = minor) and
(HEADER_GTKGLEXT_MICRO_VERSION >= micro) );
end;
{$endif read_implementation}

View File

@ -1,44 +0,0 @@
{ Original file is /usr/include/gtkglext-1.0/gtk/gtkglwidget.h }
{$ifdef read_interface_rest}
function gtk_widget_set_gl_capability(
widget: PGtkWidget;
glconfig: PGdkGLConfig;
share_list: PGdkGLContext;
direct: gboolean;
render_type: Integer): gboolean;
cdecl; external GtkGLExtLib;
function gtk_widget_is_gl_capable(widget: PGtkWidget): gboolean;
cdecl; external GtkGLExtLib;
function gtk_widget_get_gl_config(widget: PGtkWidget): PGdkGLConfig;
cdecl; external GtkGLExtLib;
function gtk_widget_create_gl_context(
widget: PGtkWidget;
share_list: PGdkGLContext;
direct: gboolean;
render_type: Integer): PGdkGLContext;
cdecl; external GtkGLExtLib;
function gtk_widget_get_gl_context(widget: PGtkWidget): PGdkGLContext;
cdecl; external GtkGLExtLib;
function gtk_widget_get_gl_window(widget: PGtkWidget): PGdkGLWindow;
cdecl; external GtkGLExtLib;
function gtk_widget_get_gl_drawable(widget: PGtkWidget): PGdkGLDrawable;
{$endif read_interface_rest}
{$ifdef read_implementation}
function gtk_widget_get_gl_drawable(widget: PGtkWidget): PGdkGLDrawable;
begin
gtk_widget_get_gl_drawable :=
GDK_GL_DRAWABLE (gtk_widget_get_gl_window (widget));
end;
{$endif read_implementation}