Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/dnd/DND.d @ 9:950d84783eac
Removing direct tango deps.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 09 Mar 2009 14:26:40 +0100 |
parents | 6dd524f61e62 |
children | d46287db17ed |
comparison
equal
deleted
inserted
replaced
8:2847134a5fc0 | 9:950d84783eac |
---|---|
15 | 15 |
16 import org.eclipse.swt.SWT; | 16 import org.eclipse.swt.SWT; |
17 import org.eclipse.swt.SWTError; | 17 import org.eclipse.swt.SWTError; |
18 import org.eclipse.swt.SWTException; | 18 import org.eclipse.swt.SWTException; |
19 | 19 |
20 import tango.util.Convert; | |
21 import java.lang.all; | 20 import java.lang.all; |
22 | 21 |
23 /** | 22 /** |
24 * | 23 * |
25 * Class DND contains all the constants used in defining a | 24 * Class DND contains all the constants used in defining a |
263 public static void error (int code, int hresult) { | 262 public static void error (int code, int hresult) { |
264 switch (code) { | 263 switch (code) { |
265 /* OS Failure/Limit (fatal, may occur only on some platforms) */ | 264 /* OS Failure/Limit (fatal, may occur only on some platforms) */ |
266 case DND.ERROR_CANNOT_INIT_DRAG:{ | 265 case DND.ERROR_CANNOT_INIT_DRAG:{ |
267 String msg = DND.INIT_DRAG_MESSAGE; | 266 String msg = DND.INIT_DRAG_MESSAGE; |
268 if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ | 267 if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ |
269 throw new SWTError (code, msg); | 268 throw new SWTError (code, msg); |
270 } | 269 } |
271 case DND.ERROR_CANNOT_INIT_DROP:{ | 270 case DND.ERROR_CANNOT_INIT_DROP:{ |
272 String msg = DND.INIT_DROP_MESSAGE; | 271 String msg = DND.INIT_DROP_MESSAGE; |
273 if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ | 272 if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ |
274 throw new SWTError (code, msg); | 273 throw new SWTError (code, msg); |
275 } | 274 } |
276 case DND.ERROR_CANNOT_SET_CLIPBOARD:{ | 275 case DND.ERROR_CANNOT_SET_CLIPBOARD:{ |
277 String msg = DND.CANNOT_SET_CLIPBOARD_MESSAGE; | 276 String msg = DND.CANNOT_SET_CLIPBOARD_MESSAGE; |
278 if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ | 277 if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ |
279 throw new SWTError (code, msg); | 278 throw new SWTError (code, msg); |
280 } | 279 } |
281 case DND.ERROR_INVALID_DATA:{ | 280 case DND.ERROR_INVALID_DATA:{ |
282 String msg = DND.INVALID_DATA_MESSAGE; | 281 String msg = DND.INVALID_DATA_MESSAGE; |
283 if (hresult !is 0) msg ~= " result = "~to!(String)(hresult); //$NON-NLS-1$ | 282 if (hresult !is 0) msg ~= " result = "~String_valueOf(hresult); //$NON-NLS-1$ |
284 throw new SWTException (code, msg); | 283 throw new SWTException (code, msg); |
285 } | 284 } |
286 default: | 285 default: |
287 } | 286 } |
288 | 287 |