private int on_drag_enter(cef_drag_handler_t *self, cef_browser_t *browser, cef_drag_data_t *dragData, CefDragOperationsMask mask)
        {
            CheckSelf(self);

            var m_browser  = CefBrowser.FromNative(browser);
            var m_dragData = CefDragData.FromNative(dragData);
            var m_result   = OnDragEnter(m_browser, m_dragData, mask);

            return(m_result ? 1 : 0);
        }
        private int start_dragging(cef_render_handler_t *self, cef_browser_t *browser, cef_drag_data_t *drag_data, CefDragOperationsMask allowed_ops, int x, int y)
        {
            CheckSelf(self);

            var m_browser  = CefBrowser.FromNative(browser);
            var m_dragData = CefDragData.FromNative(drag_data);

            var m_result = StartDragging(m_browser, m_dragData, allowed_ops, x, y);

            return(m_result ? 1 : 0);
        }
 /// <summary>
 /// Called when an external drag event enters the browser window. |dragData|
 /// contains the drag event data and |mask| represents the type of drag
 /// operation. Return false for default drag handling behavior or true to
 /// cancel the drag event.
 /// </summary>
 protected abstract bool OnDragEnter(CefBrowser browser, CefDragData dragData, CefDragOperationsMask mask);
 /// <summary>
 /// Called when the user starts dragging content in the web view. Contextual
 /// information about the dragged content is supplied by |drag_data|.
 /// (|x|, |y|) is the drag start location in screen coordinates.
 /// OS APIs that run a system message loop may be used within the
 /// StartDragging call.
 /// Return false to abort the drag operation. Don't call any of
 /// CefBrowserHost::DragSource*Ended* methods after returning false.
 /// Return true to handle the drag operation. Call
 /// CefBrowserHost::DragSourceEndedAt and DragSourceSystemDragEnded either
 /// synchronously or asynchronously to inform the web view that the drag
 /// operation has ended.
 /// </summary>
 protected virtual bool StartDragging(CefBrowser browser, CefDragData dragData, CefDragOperationsMask allowedOps, int x, int y)
 {
     return(false);
 }
Exemple #5
0
 /// <summary>
 /// Call this method when the user drags the mouse into the web view (before
 /// calling DragTargetDragOver/DragTargetLeave/DragTargetDrop).
 /// |drag_data| 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
 /// CefDragData::ResetFileContents (for example, if |drag_data| comes from
 /// CefRenderHandler::StartDragging).
 /// This method is only used when window rendering is disabled.
 /// </summary>
 public void DragTargetDragEnter(CefDragData dragData, CefMouseEvent mouseEvent, CefDragOperationsMask allowedOps)
 {
     var n_mouseEvent = mouseEvent.ToNative();
     cef_browser_host_t.drag_target_drag_enter(_self,
         dragData.ToNative(),
         &n_mouseEvent,
         allowedOps);
 }
 /// <summary>
 /// Returns a copy of the current object.
 /// </summary>
 public CefDragData Clone()
 {
     return(CefDragData.FromNative(cef_drag_data_t.clone(_self)));
 }
 /// <summary>
 /// Create a new CefDragData object.
 /// </summary>
 public static CefDragData Create()
 {
     return(CefDragData.FromNative(cef_drag_data_t.create()));
 }
Exemple #8
0
 /// <summary>
 /// Called when an external drag event enters the browser window. |dragData|
 /// contains the drag event data and |mask| represents the type of drag
 /// operation. Return false for default drag handling behavior or true to
 /// cancel the drag event.
 /// </summary>
 protected virtual bool OnDragEnter(CefBrowser browser, CefDragData dragData, CefDragOperationsMask mask)
 {
     return(false);
 }
Exemple #9
0
 /// <summary>
 /// Called when the user starts dragging content in the web view. Contextual
 /// information about the dragged content is supplied by |drag_data|.
 /// OS APIs that run a system message loop may be used within the
 /// StartDragging call.
 /// Return false to abort the drag operation. Don't call any of
 /// CefBrowserHost::DragSource*Ended* methods after returning false.
 /// Return true to handle the drag operation. Call
 /// CefBrowserHost::DragSourceEndedAt and DragSourceSystemDragEnded either
 /// synchronously or asynchronously to inform the web view that the drag
 /// operation has ended.
 /// </summary>
 protected virtual bool StartDragging(CefBrowser browser, CefDragData dragData, CefDragOperationsMask allowedOps, int x, int y)
 {
     return false;
 }
Exemple #10
0
 /// <summary>
 /// Called when an external drag event enters the browser window. |dragData|
 /// contains the drag event data and |mask| represents the type of drag
 /// operation. Return false for default drag handling behavior or true to
 /// cancel the drag event.
 /// </summary>
 protected abstract bool OnDragEnter(CefBrowser browser, CefDragData dragData, CefDragOperationsMask mask);