I tested gtkD with DSSS, GDC 0.24 and tango 0.99.4 today. gtkD compiles. Cairo demo works. demos/gtk/ all work. /demos/gtkD/ fails compiling with the errors:
../gtkD/TestDrawingArea.d:173: Error: cannot implicitly convert expression (fromString("Courier 48")) of type PangoFontDescription * to pango.PgFontDescription.PgFontDescription
That should be easy to fix. (I don't have time... :( sorry.)
gtkDgl needed some changes. I made them, and committed them to subversion. And unfortunately those are hand made changes, so they should also be made on the APIlookups or the wrapper. But, I committed this to make the svn version working. I don't really have time these days to look at the APIlookups or the wrapper. Sorry again.
The changes are basicly to remove all imports of std.stdio or similar. Remove all printfs. (They should be replaced by the same method used in gtkD to have both tango and phobos supported. Whatever that is.) Add some version(Tango) stuff for the std.gc.disable and added it's tango version tango.core.Memory.GC.disable().
Here's a diff of some sort. (Not including the changes to /demos/gl/ShapesGL.d as those changes are ofcourse OK.) Yes. This is propably the worst bug report I've ever written... Sorry. :)
Index: srcgl/gtkglc/glgtk.d
===================================================================
--- srcgl/gtkglc/glgtk.d (revision 409)
+++ srcgl/gtkglc/glgtk.d (working copy)
@@ -25,8 +25,8 @@
module gtkglc.glgtk;
-version(Tango) private import tango.stdc.stdio;
-else private import std.stdio;
+//version(Tango) private import tango.stdc.stdio;
+//else private import std.stdio;
private import gtkglc.glgtktypes;
private import gtkc.Loader;
private import gtkc.paths;
Index: srcgl/glgdk/GLConfig.d
===================================================================
--- srcgl/glgdk/GLConfig.d (revision 409)
+++ srcgl/glgdk/GLConfig.d (working copy)
@@ -113,14 +113,14 @@
gdkGLConfig = cast(GdkGLConfig*)gdk_gl_config_new_by_mode(mode);
if ( gdkGLConfig is null )
{
- printf ("*** Cannot find the double-buffered visual.\n");
- printf ("*** Trying single-buffered visual.\n");
+ //printf ("*** Cannot find the double-buffered visual.\n");
+ //printf ("*** Trying single-buffered visual.\n");
gdkGLConfig = cast(GdkGLConfig*)gdk_gl_config_new_by_mode(fallback);
}
if ( gdkGLConfig is null )
{
- printf ("*** No appropriate OpenGL-capable visual found.\n");
- throw new Error("GL configure failed");
+ //printf ("*** No appropriate OpenGL-capable visual found.\n");
+ throw new Exception("GL configure failed");
}
this(gdkGLConfig);
}
Index: srcgl/glgtk/GLCapability.d
===================================================================
--- srcgl/glgtk/GLCapability.d (revision 409)
+++ srcgl/glgtk/GLCapability.d (working copy)
@@ -51,11 +51,17 @@
private import gtkglc.glgtk;
+version(Tango)
+{
+ import tango.core.Memory;
+}
+else
+{
+ private import std.gc;
+}
-
-
// SNEAKY MIXIN PROBLEM:
//
// These need to be public imports
@@ -65,7 +71,7 @@
// May as well be explicit about it:
-public import std.stdio;
+//public import std.stdio;
public import glgtk.GLWidget;
private import glgdk.GLDrawable;
public import gdk.Event;
@@ -238,8 +244,8 @@
return consumeEvent;
}
- private import std.gc;
+
int configureFrame(GdkEventConfigure?* event, Widget widget)
{
if ( event != null )
@@ -247,7 +253,16 @@
width = event.width;
height = event.height;
}
- std.gc.disable();
+
+ version(Tango)
+ {
+ tango.core.Memory.GC.disable();
+ }
+ else
+ {
+ std.gc.disable();
+ }
+
//writefln("configureFrame 1");
//printf("GLCapabilityT.configureFrame \n" );
GLContext context = GLWidget.getGLContext(widget);
@@ -284,7 +299,15 @@
//writefln("configureFrame 9");
/*** OpenGL END ***/
- std.gc.enable();
+ version(Tango)
+ {
+ tango.core.Memory.GC.enable();
+ }
+ else
+ {
+ std.gc.enable();
+ }
+
return consumeEvent;
}