Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/dnd/Clipboard.d @ 43:b98647bc0aef
swt win compiles for d2+phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 25 Mar 2009 17:08:05 +0100 |
parents | 52184e4b815c |
children | 9f4c18c268b2 |
comparison
equal
deleted
inserted
replaced
42:63aa48e5430f | 43:b98647bc0aef |
---|---|
76 } | 76 } |
77 if (display.getThread() !is Thread.currentThread()) { | 77 if (display.getThread() !is Thread.currentThread()) { |
78 DND.error(SWT.ERROR_THREAD_INVALID_ACCESS); | 78 DND.error(SWT.ERROR_THREAD_INVALID_ACCESS); |
79 } | 79 } |
80 this.display = display; | 80 this.display = display; |
81 TCHAR* chFormatName = StrToTCHARz(0, "Preferred DropEffect"); //$NON-NLS-1$ | 81 LPCTSTR chFormatName = StrToTCHARz(0, "Preferred DropEffect"); //$NON-NLS-1$ |
82 CFSTR_PREFERREDDROPEFFECT = OS.RegisterClipboardFormat(chFormatName); | 82 CFSTR_PREFERREDDROPEFFECT = OS.RegisterClipboardFormat(chFormatName); |
83 createCOMInterfaces(); | 83 createCOMInterfaces(); |
84 this.AddRef(); | 84 this.AddRef(); |
85 } | 85 } |
86 | 86 |
632 } | 632 } |
633 /* QueryInterface([in] iid, [out] ppvObject) | 633 /* QueryInterface([in] iid, [out] ppvObject) |
634 * Ownership of ppvObject transfers from callee to caller so reference count on ppvObject | 634 * Ownership of ppvObject transfers from callee to caller so reference count on ppvObject |
635 * must be incremented before returning. Caller is responsible for releasing ppvObject. | 635 * must be incremented before returning. Caller is responsible for releasing ppvObject. |
636 */ | 636 */ |
637 HRESULT QueryInterface(GUID* riid, void ** ppvObject) { | 637 HRESULT QueryInterface(REFCIID riid, void ** ppvObject) { |
638 if (riid is null || ppvObject is null) return COM.E_INVALIDARG; | 638 if (riid is null || ppvObject is null) return COM.E_INVALIDARG; |
639 if (COM.IsEqualGUID(riid, &COM.IIDIUnknown) || COM.IsEqualGUID(riid, &COM.IIDIDataObject) ) { | 639 if (COM.IsEqualGUID(riid, &COM.IIDIUnknown) || COM.IsEqualGUID(riid, &COM.IIDIDataObject) ) { |
640 *ppvObject = cast(void*)cast(IUnknown)iDataObject; | 640 *ppvObject = cast(void*)cast(IUnknown)iDataObject; |
641 AddRef(); | 641 AddRef(); |
642 return COM.S_OK; | 642 return COM.S_OK; |
799 | 799 |
800 Clipboard parent; | 800 Clipboard parent; |
801 this(Clipboard p) { parent = p; } | 801 this(Clipboard p) { parent = p; } |
802 extern (Windows): | 802 extern (Windows): |
803 // interface of IUnknown | 803 // interface of IUnknown |
804 HRESULT QueryInterface(GUID* riid, void ** ppvObject) { return parent.QueryInterface(riid, ppvObject); } | 804 HRESULT QueryInterface(REFCIID riid, void ** ppvObject) { return parent.QueryInterface(riid, ppvObject); } |
805 ULONG AddRef() { return parent.AddRef(); } | 805 ULONG AddRef() { return parent.AddRef(); } |
806 ULONG Release() { return parent.Release(); } | 806 ULONG Release() { return parent.Release(); } |
807 | 807 |
808 // interface IDataObject | 808 // interface IDataObject |
809 LRESULT GetData( FORMATETC *pFormatetc, STGMEDIUM *pmedium) { return parent.GetData(pFormatetc, pmedium); } | 809 LRESULT GetData( FORMATETC *pFormatetc, STGMEDIUM *pmedium) { return parent.GetData(pFormatetc, pmedium); } |