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> /// 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())); }
/// <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); }
/// <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);