]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - include/igtkgl.h
Merge branch 'q3map2help' into 'master'
[xonotic/netradiant.git] / include / igtkgl.h
index a78a05707b07f53dae3d54224099dd89db4fb21a..b4454564d12e8e1665704a36e45d94c717294943 100644 (file)
 #include <uilib/uilib.h>
 #include "generic/constant.h"
 
-typedef int gint;
-typedef gint gboolean;
-
-struct _QERGtkGLTable
-{
-       INTEGER_CONSTANT( Version, 1 );
-       STRING_CONSTANT( Name, "gtkgl" );
-
-       ui::Widget ( *glwidget_new )(gboolean zbufffer);
-       void ( *glwidget_swap_buffers )( ui::Widget widget );
-       gboolean ( *glwidget_make_current )( ui::Widget widget );
-       void ( *glwidget_destroy_context )( ui::Widget widget );
-       void ( *glwidget_create_context )( ui::Widget widget );
+template<class T>
+using func = T *;
+
+struct _QERGtkGLTable {
+    STRING_CONSTANT(Name, "gtkgl");
+    INTEGER_CONSTANT(Version, 1);
+
+    func<ui::GLArea(bool zbufffer)> glwidget_new;
+    func<void(ui::GLArea self)> glwidget_swap_buffers;
+    func<bool(ui::GLArea self)> glwidget_make_current;
+    func<void(ui::GLArea self)> glwidget_destroy_context;
+    func<void(ui::GLArea self)> glwidget_create_context;
 };
 
 #endif