Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CTabFolder2Listener.d @ 22:4642ab680468
some work on dwt-win for tango/phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 20 Mar 2009 12:52:28 +0100 |
parents | 6dd524f61e62 |
children |
comparison
equal
deleted
inserted
replaced
21:9b96950f2c3c | 22:4642ab680468 |
---|---|
13 module org.eclipse.swt.custom.CTabFolder2Listener; | 13 module org.eclipse.swt.custom.CTabFolder2Listener; |
14 | 14 |
15 import org.eclipse.swt.internal.SWTEventListener; | 15 import org.eclipse.swt.internal.SWTEventListener; |
16 import org.eclipse.swt.custom.CTabFolderEvent; | 16 import org.eclipse.swt.custom.CTabFolderEvent; |
17 | 17 |
18 import tango.core.Traits; | 18 version(Tango){ |
19 import tango.core.Tuple; | 19 import tango.core.Traits; |
20 import tango.core.Tuple; | |
21 } else { // Phobos | |
22 import std.traits; | |
23 import std.typetuple; | |
24 } | |
20 | 25 |
21 /** | 26 /** |
22 * Classes which implement this interface provide methods | 27 * Classes which implement this interface provide methods |
23 * that deal with the events that are generated by the CTabFolder | 28 * that deal with the events that are generated by the CTabFolder |
24 * control. | 29 * control. |
127 | 132 |
128 | 133 |
129 /// Helper class for the dgListener template function | 134 /// Helper class for the dgListener template function |
130 private class _DgCTabFolder2ListenerT(Dg,T...) : CTabFolder2Listener { | 135 private class _DgCTabFolder2ListenerT(Dg,T...) : CTabFolder2Listener { |
131 | 136 |
132 alias ParameterTupleOf!(Dg) DgArgs; | 137 version(Tango){ |
133 static assert( is(DgArgs == Tuple!(CTabFolderEvent,T)), | 138 alias ParameterTupleOf!(Dg) DgArgs; |
139 static assert( is(DgArgs == Tuple!(CTabFolderEvent,T)), | |
134 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" ); | 140 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" ); |
141 } else { // Phobos | |
142 alias ParameterTypeTuple!(Dg) DgArgs; | |
143 static assert( is(DgArgs == TypeTuple!(CTabFolderEvent,T)), | |
144 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" ); | |
145 } | |
135 | 146 |
136 Dg dg; | 147 Dg dg; |
137 T t; | 148 T t; |
138 int type; | 149 int type; |
139 | 150 |