comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/CTabFolder2Listener.d @ 49:7a2dd761a8b2

more work until dmd 2.026 linux segfaults.
author Frank Benoit <benoit@tionex.de>
date Fri, 27 Mar 2009 12:59:54 +0100
parents ddbfe84d86df
children 536e43f63c81
comparison
equal deleted inserted replaced
48:ddbfe84d86df 49:7a2dd761a8b2
16 16
17 import org.eclipse.swt.internal.SWTEventListener; 17 import org.eclipse.swt.internal.SWTEventListener;
18 import org.eclipse.swt.custom.CTabFolderEvent; 18 import org.eclipse.swt.custom.CTabFolderEvent;
19 19
20 version(Tango){ 20 version(Tango){
21 import tango.core.Traits; 21 import tango.core.Traits;
22 import tango.core.Tuple; 22 import tango.core.Tuple;
23 } else { // Phobos 23 } else { // Phobos
24 import std.traits;
25 import std.typetuple;
24 } 26 }
25 27
26 /** 28 /**
27 * Classes which implement this interface provide methods 29 * Classes which implement this interface provide methods
28 * that deal with the events that are generated by the CTabFolder 30 * that deal with the events that are generated by the CTabFolder
132 134
133 135
134 /// Helper class for the dgListener template function 136 /// Helper class for the dgListener template function
135 private class _DgCTabFolder2ListenerT(Dg,T...) : CTabFolder2Listener { 137 private class _DgCTabFolder2ListenerT(Dg,T...) : CTabFolder2Listener {
136 138
137 alias ParameterTupleOf!(Dg) DgArgs; 139 version(Tango){
138 static assert( is(DgArgs == Tuple!(CTabFolderEvent,T)), 140 alias ParameterTupleOf!(Dg) DgArgs;
139 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" ); 141 static assert( is(DgArgs == Tuple!(CTabFolderEvent,T)),
142 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" );
143 } else { // Phobos
144 alias ParameterTypeTuple!(Dg) DgArgs;
145 static assert( is(DgArgs == TypeTuple!(CTabFolderEvent,T)),
146 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" );
147 }
140 148
141 Dg dg; 149 Dg dg;
142 T t; 150 T t;
143 int type; 151 int type;
144 152