| 1 |
/* |
| 2 |
* Copyright (C) 2024 Zhiyi Zhang for CodeWeavers |
| 3 |
* |
| 4 |
* This library is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU Lesser General Public |
| 6 |
* License as published by the Free Software Foundation; either |
| 7 |
* version 2.1 of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This library is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
* Lesser General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU Lesser General Public |
| 15 |
* License along with this library; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifdef __WIDL__ |
| 20 |
#pragma winrt ns_prefix |
| 21 |
#endif |
| 22 |
|
| 23 |
import "inspectable.idl"; |
| 24 |
import "asyncinfo.idl"; |
| 25 |
import "eventtoken.idl"; |
| 26 |
import "windowscontracts.idl"; |
| 27 |
import "windows.foundation.idl"; |
| 28 |
import "windows.applicationmodel.datatransfer.idl"; |
| 29 |
import "windows.applicationmodel.datatransfer.dragdrop.idl"; |
| 30 |
import "windows.graphics.imaging.idl"; |
| 31 |
|
| 32 |
namespace Windows.ApplicationModel.DataTransfer.DragDrop.Core { |
| 33 |
interface ICoreDragDropManager; |
| 34 |
interface ICoreDragDropManagerStatics; |
| 35 |
interface ICoreDragInfo; |
| 36 |
interface ICoreDragInfo2; |
| 37 |
interface ICoreDropOperationTarget; |
| 38 |
interface ICoreDropOperationTargetRequestedEventArgs; |
| 39 |
interface ICoreDragUIOverride; |
| 40 |
|
| 41 |
runtimeclass CoreDragDropManager; |
| 42 |
runtimeclass CoreDragInfo; |
| 43 |
runtimeclass CoreDropOperationTargetRequestedEventArgs; |
| 44 |
runtimeclass CoreDragUIOverride; |
| 45 |
|
| 46 |
declare { |
| 47 |
interface Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager *, Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDropOperationTargetRequestedEventArgs *>; |
| 48 |
} |
| 49 |
|
| 50 |
[ |
| 51 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 52 |
exclusiveto(Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager), |
| 53 |
uuid(7d56d344-8464-4faf-aa49-37ea6e2d7bd1) |
| 54 |
] |
| 55 |
interface ICoreDragDropManager : IInspectable |
| 56 |
{ |
| 57 |
[eventadd] HRESULT TargetRequested([in] Windows.Foundation.TypedEventHandler<Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager *, Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDropOperationTargetRequestedEventArgs *> *value, [out, retval] EventRegistrationToken *return_value); |
| 58 |
[eventremove] HRESULT TargetRequested([in] EventRegistrationToken value); |
| 59 |
[propget] HRESULT AreConcurrentOperationsEnabled([out, retval] boolean *value); |
| 60 |
[propput] HRESULT AreConcurrentOperationsEnabled([in] boolean value); |
| 61 |
} |
| 62 |
|
| 63 |
[ |
| 64 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 65 |
exclusiveto(Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager), |
| 66 |
uuid(9542fdca-da12-4c1c-8d06-041db29733c3) |
| 67 |
] |
| 68 |
interface ICoreDragDropManagerStatics : IInspectable |
| 69 |
{ |
| 70 |
HRESULT GetForCurrentView([out, retval] Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragDropManager **value); |
| 71 |
} |
| 72 |
|
| 73 |
[ |
| 74 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 75 |
exclusiveto(Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo), |
| 76 |
uuid(48353a8b-cb50-464e-9575-cd4e3a7ab028) |
| 77 |
] |
| 78 |
interface ICoreDragInfo : IInspectable |
| 79 |
{ |
| 80 |
[propget] HRESULT Data([out, retval] Windows.ApplicationModel.DataTransfer.DataPackageView **value); |
| 81 |
[propget] HRESULT Modifiers([out, retval] Windows.ApplicationModel.DataTransfer.DragDrop.DragDropModifiers *value); |
| 82 |
[propget] HRESULT Position([out, retval] Windows.Foundation.Point *value); |
| 83 |
} |
| 84 |
|
| 85 |
[ |
| 86 |
contract(Windows.Foundation.UniversalApiContract, 2.0), |
| 87 |
exclusiveto(Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo), |
| 88 |
uuid(c54691e5-e6fb-4d74-b4b1-8a3c17f25e9e) |
| 89 |
] |
| 90 |
interface ICoreDragInfo2 : IInspectable |
| 91 |
requires Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDragInfo |
| 92 |
{ |
| 93 |
[propget] HRESULT AllowedOperations([out, retval] Windows.ApplicationModel.DataTransfer.DataPackageOperation *value); |
| 94 |
} |
| 95 |
|
| 96 |
[ |
| 97 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 98 |
uuid(d9126196-4c5b-417d-bb37-76381def8db4) |
| 99 |
] |
| 100 |
interface ICoreDropOperationTarget : IInspectable |
| 101 |
{ |
| 102 |
HRESULT EnterAsync([in] Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo *info, [in] Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride *override, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.DataTransfer.DataPackageOperation> **return_value); |
| 103 |
HRESULT OverAsync([in] Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo *info, [in] Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride *override, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.DataTransfer.DataPackageOperation> **return_value); |
| 104 |
HRESULT LeaveAsync([in] Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo *info, [out, retval] Windows.Foundation.IAsyncAction **return_value); |
| 105 |
HRESULT DropAsync([in] Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragInfo *info, [out, retval] Windows.Foundation.IAsyncOperation<Windows.ApplicationModel.DataTransfer.DataPackageOperation> **return_value); |
| 106 |
} |
| 107 |
|
| 108 |
[ |
| 109 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 110 |
exclusiveto(Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDropOperationTargetRequestedEventArgs), |
| 111 |
uuid(2aca929a-5e28-4ea6-829e-29134e665d6d) |
| 112 |
] |
| 113 |
interface ICoreDropOperationTargetRequestedEventArgs : IInspectable |
| 114 |
{ |
| 115 |
HRESULT SetTarget([in] Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDropOperationTarget *target); |
| 116 |
} |
| 117 |
|
| 118 |
[ |
| 119 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 120 |
exclusiveto(Windows.ApplicationModel.DataTransfer.DragDrop.Core.CoreDragUIOverride), |
| 121 |
uuid(89a85064-3389-4f4f-8897-7e8a3ffb3c93) |
| 122 |
] |
| 123 |
interface ICoreDragUIOverride : IInspectable |
| 124 |
{ |
| 125 |
[overload("SetContentFromSoftwareBitmap")] HRESULT SetContentFromSoftwareBitmap([in] Windows.Graphics.Imaging.SoftwareBitmap *bitmap); |
| 126 |
[overload("SetContentFromSoftwareBitmap")] HRESULT SetContentFromSoftwareBitmapWithAnchorPoint([in] Windows.Graphics.Imaging.SoftwareBitmap *bitmap, [in] Windows.Foundation.Point point); |
| 127 |
[propget] HRESULT IsContentVisible([out, retval] boolean *value); |
| 128 |
[propput] HRESULT IsContentVisible([in] boolean value); |
| 129 |
[propget] HRESULT Caption([out, retval] HSTRING *value); |
| 130 |
[propput] HRESULT Caption([in] HSTRING value); |
| 131 |
[propget] HRESULT IsCaptionVisible([out, retval] boolean *value); |
| 132 |
[propput] HRESULT IsCaptionVisible([in] boolean value); |
| 133 |
[propget] HRESULT IsGlyphVisible([out, retval] boolean *value); |
| 134 |
[propput] HRESULT IsGlyphVisible([in] boolean value); |
| 135 |
HRESULT Clear(); |
| 136 |
} |
| 137 |
|
| 138 |
[ |
| 139 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 140 |
marshaling_behavior(agile), |
| 141 |
static(Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDragDropManagerStatics, Windows.Foundation.UniversalApiContract, 1.0), |
| 142 |
threading(both) |
| 143 |
] |
| 144 |
runtimeclass CoreDragDropManager |
| 145 |
{ |
| 146 |
[default] interface Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDragDropManager; |
| 147 |
} |
| 148 |
|
| 149 |
[ |
| 150 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 151 |
marshaling_behavior(agile), |
| 152 |
threading(both) |
| 153 |
] |
| 154 |
runtimeclass CoreDragInfo |
| 155 |
{ |
| 156 |
[default] interface Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDragInfo; |
| 157 |
[contract(Windows.Foundation.UniversalApiContract, 2.0)] interface Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDragInfo2; |
| 158 |
} |
| 159 |
|
| 160 |
[ |
| 161 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 162 |
marshaling_behavior(agile), |
| 163 |
threading(both) |
| 164 |
] |
| 165 |
runtimeclass CoreDropOperationTargetRequestedEventArgs |
| 166 |
{ |
| 167 |
[default] interface Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDropOperationTargetRequestedEventArgs; |
| 168 |
} |
| 169 |
|
| 170 |
[ |
| 171 |
contract(Windows.Foundation.UniversalApiContract, 1.0), |
| 172 |
marshaling_behavior(agile), |
| 173 |
threading(both) |
| 174 |
] |
| 175 |
runtimeclass CoreDragUIOverride |
| 176 |
{ |
| 177 |
[default] interface Windows.ApplicationModel.DataTransfer.DragDrop.Core.ICoreDragUIOverride; |
| 178 |
} |
| 179 |
} |