Mercurial > projects > dwt-win
comparison dwt/dnd/Transfer.d @ 321:a3b84f877e63
Fix compile errors
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 03 Nov 2008 22:14:46 +0100 |
parents | da968414c383 |
children |
comparison
equal
deleted
inserted
replaced
320:da968414c383 | 321:a3b84f877e63 |
---|---|
12 *******************************************************************************/ | 12 *******************************************************************************/ |
13 module dwt.dnd.Transfer; | 13 module dwt.dnd.Transfer; |
14 | 14 |
15 | 15 |
16 import dwt.internal.win32.OS; | 16 import dwt.internal.win32.OS; |
17 import dwt.internal.ole.win32.COM; | |
17 | 18 |
18 import dwt.dnd.TransferData; | 19 import dwt.dnd.TransferData; |
19 import dwt.dwthelper.utils; | 20 import dwt.dwthelper.utils; |
21 import dwt.internal.ole.win32.OBJIDL; | |
22 static import tango.core.Thread; | |
20 | 23 |
21 /** | 24 /** |
22 * <code>Transfer</code> provides a mechanism for converting between a java | 25 * <code>Transfer</code> provides a mechanism for converting between a java |
23 * representation of data and a platform specific representation of data and | 26 * representation of data and a platform specific representation of data and |
24 * vice versa. It is used in data transfer operations such as drag and drop and | 27 * vice versa. It is used in data transfer operations such as drag and drop and |
42 * possible to retrieve data until the other application is | 45 * possible to retrieve data until the other application is |
43 * finished. To allow other applications to get the | 46 * finished. To allow other applications to get the |
44 * data, use PeekMessage() to enable cross thread | 47 * data, use PeekMessage() to enable cross thread |
45 * message sends. | 48 * message sends. |
46 */ | 49 */ |
47 int getData(IDataObject dataObject, FORMATETC pFormatetc, STGMEDIUM pmedium) { | 50 int getData(IDataObject dataObject, FORMATETC* pFormatetc, STGMEDIUM* pmedium) { |
48 if (dataObject.GetData(pFormatetc, pmedium) is COM.S_OK) return COM.S_OK; | 51 if (dataObject.GetData(pFormatetc, pmedium) is COM.S_OK) return COM.S_OK; |
49 try {Thread.sleep(0.050);} catch (Exception t) {} | 52 try {tango.core.Thread.Thread.sleep(0.050);} catch (Exception t) {} |
50 int result = dataObject.GetData(pFormatetc, pmedium); | 53 int result = dataObject.GetData(pFormatetc, pmedium); |
51 int retryCount = 0; | 54 int retryCount = 0; |
52 while (result !is COM.S_OK && retryCount++ < RETRY_LIMIT) { | 55 while (result !is COM.S_OK && retryCount++ < RETRY_LIMIT) { |
53 MSG msg = new MSG(); | 56 MSG msg; |
54 OS.PeekMessage(msg, 0, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD); | 57 OS.PeekMessage(&msg, null, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD); |
55 try {Thread.sleep(0.050);} catch (Exception t) {} | 58 try {tango.core.Thread.Thread.sleep(0.050);} catch (Exception t) {} |
56 result = dataObject.GetData(pFormatetc, pmedium); | 59 result = dataObject.GetData(pFormatetc, pmedium); |
57 } | 60 } |
58 return result; | 61 return result; |
59 } | 62 } |
60 | 63 |