comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/events/SelectionListener.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
17 17
18 public import org.eclipse.swt.internal.SWTEventListener; 18 public import org.eclipse.swt.internal.SWTEventListener;
19 public import org.eclipse.swt.events.SelectionEvent; 19 public import org.eclipse.swt.events.SelectionEvent;
20 20
21 version(Tango){ 21 version(Tango){
22 import tango.core.Traits; 22 import tango.core.Traits;
23 import tango.core.Tuple; 23 import tango.core.Tuple;
24 } else { // Phobos 24 } else { // Phobos
25 import std.traits;
26 import std.typetuple;
25 } 27 }
26 28
27 /** 29 /**
28 * Classes which implement this interface provide methods 30 * Classes which implement this interface provide methods
29 * that deal with the events that are generated when selection 31 * that deal with the events that are generated when selection
78 80
79 81
80 /// SWT extension 82 /// SWT extension
81 private class _DgSelectionListenerT(Dg,T...) : SelectionListener { 83 private class _DgSelectionListenerT(Dg,T...) : SelectionListener {
82 84
83 alias ParameterTupleOf!(Dg) DgArgs; 85 version(Tango){
84 static assert( is(DgArgs == Tuple!(SelectionEvent,T)), 86 alias ParameterTupleOf!(Dg) DgArgs;
85 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" ); 87 static assert( is(DgArgs == Tuple!(SelectionEvent,T)),
88 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" );
89 } else { // Phobos
90 alias ParameterTypeTuple!(Dg) DgArgs;
91 static assert( is(DgArgs == TypeTuple!(SelectionEvent,T)),
92 "Delegate args not correct: "~DgArgs.stringof~" vs. (Event,"~T.stringof~")" );
93 }
86 94
87 Dg dg; 95 Dg dg;
88 T t; 96 T t;
89 int type; 97 int type;
90 98