Skip to content

Commit 58f6596

Browse files
committed
Changing interop interface to be controller instead of args
1 parent d7bfa12 commit 58f6596

File tree

1 file changed

+21
-43
lines changed

1 file changed

+21
-43
lines changed

specs/DragStarting.md

Lines changed: 21 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -130,49 +130,6 @@ interface ICoreWebView2DragStartingEventArgs : IUnknown {
130130
131131
132132
133-
/// Returns an `ICoreWebView2Deferral` object. Use this operation to complete
134-
/// the CoreWebView2DragStartingEventArgs.
135-
///
136-
/// Until the deferral is completed, subsequent attempts to initiate drag
137-
/// in the WebView2 will fail and if the cursor was changed as part of
138-
/// drag it will not restore.
139-
HRESULT GetDeferral(
140-
[out, retval] ICoreWebView2Deferral** value);
141-
142-
143-
}
144-
145-
/// Interop interface for the CoreWebView2DragStartingEventArgs WinRT object to
146-
/// allow WinRT end developers to be able to access the COM interface arguments.
147-
/// This interface is implemented by the
148-
/// Microsoft.Web.WebView2.Core.CoreWebView2DragStartingEventArgs runtime class.
149-
[uuid(7a4daef9-1701-463f-992d-2136460cf76e), object, pointer_default(unique)]
150-
interface ICoreWebView2StagingDragStartingEventArgsInterop : IUnknown {
151-
/// The operations this drag data supports.
152-
[propget] HRESULT AllowedOperations(
153-
[out, retval] COREWEBVIEW2_DRAG_EFFECTS* value);
154-
155-
156-
/// The data being dragged.
157-
[propget] HRESULT Data([out, retval] IDataObject** value);
158-
159-
/// The position at which drag was detected. This position is given in
160-
/// screen pixel coordinates as opposed to WebView2 relative coordinates.
161-
[propget] HRESULT Position([out, retval] POINT* value);
162-
163-
164-
/// Gets the `Handled` property.
165-
[propget] HRESULT Handled([out, retval] BOOL* value);
166-
167-
168-
/// Indicates whether this event has been handled by the app. If the
169-
/// app handles this event, WebView2 will not initiate drag drop. If
170-
/// the app does not handle the event, WebView2 will initiate its own
171-
/// drag drop logic.
172-
[propput] HRESULT Handled([in] BOOL value);
173-
174-
175-
176133
/// Returns an `ICoreWebView2Deferral` object. Use this operation to complete
177134
/// the CoreWebView2DragStartingEventArgs.
178135
///
@@ -213,5 +170,26 @@ interface ICoreWebView2CompositionController5 : IUnknown {
213170
[in] EventRegistrationToken token);
214171
215172
173+
}
174+
175+
/// Interop interface for the CoreWebView2CompositionController WinRT object to
176+
/// allow WinRT end developers to be able to access the COM interface arguments.
177+
/// This interface is implemented by the
178+
/// Microsoft.Web.WebView2.Core.CoreWebView2CompositionController runtime class.
179+
[uuid(7a4daef9-1701-463f-992d-2136460cf76e), object, pointer_default(unique)]
180+
interface ICoreWebView2StagingCompositionControllerInterop : IUnknown {
181+
/// Adds an event handler for the `DragStarting` event. `DragStarting` is
182+
/// raised when the WebView2 detects a drag started within the WebView2.
183+
/// This event can be used to override WebView2's default drag starting
184+
/// logic.
185+
HRESULT add_DragStarting(
186+
[in] ICoreWebView2StagingDragStartingEventHandler* eventHandler,
187+
[out] EventRegistrationToken* token);
188+
189+
/// Removes an event handler previously added with `add_DragStarting`.
190+
HRESULT remove_DragStarting(
191+
[in] EventRegistrationToken token);
192+
193+
216194
}
217195
```

0 commit comments

Comments
 (0)