Mercurial > projects > dwt-linux
comparison dwt/internal/gtk/OS.d @ 12:0c78fa47d476
helper classes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 06 Jan 2008 19:36:29 +0100 |
parents | 63c023465156 |
children | 0a61cfe9ff23 |
comparison
equal
deleted
inserted
replaced
11:5f725d09c076 | 12:0c78fa47d476 |
---|---|
30 lock.lock(); | 30 lock.lock(); |
31 scope(exit) lock.unlock(); | 31 scope(exit) lock.unlock(); |
32 return cFunc(p); | 32 return cFunc(p); |
33 }"); | 33 }"); |
34 } | 34 } |
35 /+ | |
36 // alternative template implementation, might be more stable | |
37 template ForwardGtkOsCFunc(char[] name) { | |
38 alias typeof(mixin(name)) func; | |
39 alias ParameterTupleOf!(func) Params; | |
40 alias ReturnTypeOf!(func) Ret; | |
41 mixin("public static Ret "~name~"( Params p ) { | |
42 return ."~name~"(p); | |
43 }"); | |
44 } | |
45 +/ | |
35 | 46 |
36 //import dwt.internal.*; | 47 //import dwt.internal.*; |
37 | 48 |
38 // opaque structs used in the parameters | 49 // opaque structs used in the parameters |
39 // they do not have a separated module | 50 // they do not have a separated module |