Interface support.
[girtod.git] / mixin / Gtk2__MODULE.d
blob9ee2703ec4c591e38ab4781c0e428e3cde9637f1
1 void _dumpObj(T)(T o, bool deep=0) {
2 import std.stdio;
3 auto ts = o.tupleof;
4 write(typeid(o), " {");
6 static if (is(typeof(*T)==union)) {
7 write(*o, "}\n");
8 return;
10 else
11 writeln();
13 foreach (i, t; ts) {
14 write(" (", typeid(t), ") ", t);
15 if (deep)
16 static if (is(typeof(*t)))
17 if (ts[i])
18 write(" {", *ts[i], "}");
19 write(i!=ts.length-1 ? "\n" : "\n}\n");
24 // An overload of gtk.init() that works with D strings.
25 // Unlike the original, it does not need to modify the inputs.
26 // Returns a new string array (that can be assigned to the argv
27 // array in the caller).
29 string[] init(string argv[]) {
30 int argc = argv.length;
31 auto c_argv = argvToC(argv);
32 init(&argc, &c_argv);
33 return argvFromC(argc, c_argv);