diff org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/events/SelectionListener.d @ 38:2e09b0e6857a

work on phobosfication
author Frank Benoit <benoit@tionex.de>
date Wed, 25 Mar 2009 11:18:25 +0100
parents 6dd524f61e62
children 059e3b45add7
line wrap: on
line diff
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/events/SelectionListener.d	Wed Mar 25 08:46:48 2009 +0100
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/events/SelectionListener.d	Wed Mar 25 11:18:25 2009 +0100
@@ -16,8 +16,13 @@
 public import org.eclipse.swt.internal.SWTEventListener;
 public import org.eclipse.swt.events.SelectionEvent;
 
-import tango.core.Traits;
-import tango.core.Tuple;
+version(Tango){
+    import tango.core.Traits;
+    import tango.core.Tuple;
+} else { // Phobos
+    import std.traits;
+    import std.typetuple;
+}
 
 /**
  * Classes which implement this interface provide methods
@@ -75,9 +80,15 @@
 /// SWT extension
 private class _DgSelectionListenerT(Dg,T...) : SelectionListener {
 
-    alias ParameterTupleOf!(Dg) DgArgs;
-    static assert( is(DgArgs == Tuple!(SelectionEvent,T)),
+    version(Tango){
+        alias ParameterTupleOf!(Dg) DgArgs;
+        static assert( is(DgArgs == Tuple!(CTabFolderEvent,T)),
                 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" );
+    } else { // Phobos
+        alias ParameterTypeTuple!(Dg) DgArgs;
+        static assert( is(DgArgs == TypeTuple!(CTabFolderEvent,T)),
+                "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" );
+    }
 
     Dg dg;
     T  t;