Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/dnd/Transfer.d @ 22:4642ab680468
some work on dwt-win for tango/phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 20 Mar 2009 12:52:28 +0100 |
parents | 52184e4b815c |
children | d46287db17ed |
comparison
equal
deleted
inserted
replaced
21:9b96950f2c3c | 22:4642ab680468 |
---|---|
46 * data, use PeekMessage() to enable cross thread | 46 * data, use PeekMessage() to enable cross thread |
47 * message sends. | 47 * message sends. |
48 */ | 48 */ |
49 int getData(IDataObject dataObject, FORMATETC* pFormatetc, STGMEDIUM* pmedium) { | 49 int getData(IDataObject dataObject, FORMATETC* pFormatetc, STGMEDIUM* pmedium) { |
50 if (dataObject.GetData(pFormatetc, pmedium) is COM.S_OK) return COM.S_OK; | 50 if (dataObject.GetData(pFormatetc, pmedium) is COM.S_OK) return COM.S_OK; |
51 try {tango.core.Thread.Thread.sleep(50);} catch (Exception t) {} | 51 try {Thread.sleep(50);} catch (Exception t) {} |
52 int result = dataObject.GetData(pFormatetc, pmedium); | 52 int result = dataObject.GetData(pFormatetc, pmedium); |
53 int retryCount = 0; | 53 int retryCount = 0; |
54 while (result !is COM.S_OK && retryCount++ < RETRY_LIMIT) { | 54 while (result !is COM.S_OK && retryCount++ < RETRY_LIMIT) { |
55 MSG msg; | 55 MSG msg; |
56 OS.PeekMessage(&msg, null, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD); | 56 OS.PeekMessage(&msg, null, 0, 0, OS.PM_NOREMOVE | OS.PM_NOYIELD); |
57 try {tango.core.Thread.Thread.sleep(50);} catch (Exception t) {} | 57 try {Thread.sleep(50);} catch (Exception t) {} |
58 result = dataObject.GetData(pFormatetc, pmedium); | 58 result = dataObject.GetData(pFormatetc, pmedium); |
59 } | 59 } |
60 return result; | 60 return result; |
61 } | 61 } |
62 | 62 |