Exemplo n.º 1
0
        /// <summary>
        /// Call this function when the user drags the mouse into the web view.
        /// <para/>This function is only used when window rendering is disabled.
        /// </summary>
        /// <param name="dragData">
        /// The <paramref name="dragData"/> should not contain file contents as this type of data is not allowed to be
        /// dragged into the web view. File contents can be removed using <see cref="CefDragData.ResetFileContents"/>
        /// (for example, if <paramref name="dragData"/> comes from the <see cref="StartDragging"/> event).
        /// </param>
        public void SendDragEnterEvent(int x, int y, CefEventFlags modifiers, CefDragData dragData, CefDragOperationsMask allowedOps)
        {
            if (dragData is null)
            {
                throw new ArgumentNullException(nameof(dragData));
            }

            CefBrowserHost browserHost = this.BrowserObject?.Host;

            if (browserHost is null)
            {
                return;
            }

            InitMouseEvent(x, y, modifiers);
            browserHost.DragTargetDragEnter(dragData, _mouseEventProxy, allowedOps);
        }