Пример #1
0
 /// <summary>
 /// Send a mouse click event to the browser. The |x| and |y| coordinates are
 /// relative to the upper-left corner of the view.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
 /// </remarks>
 public void SendMouseClickEvent(CfxMouseEvent @event, CfxMouseButtonType type, bool mouseUp, int clickCount)
 {
     CfxApi.BrowserHost.cfx_browser_host_send_mouse_click_event(NativePtr, CfxMouseEvent.Unwrap(@event), (int)type, mouseUp ? 1 : 0, clickCount);
 }
 /// <summary>
 /// Call this function when the user completes the drag operation by dropping
 /// the object onto the web view (after calling DragTargetDragEnter). The
 /// object being dropped is |dragData|, given as an argument to the previous
 /// DragTargetDragEnter call. This function is only used when window rendering
 /// is disabled.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
 /// </remarks>
 public void DragTargetDrop(CfxMouseEvent @event)
 {
     CfxApi.BrowserHost.cfx_browser_host_drag_target_drop(NativePtr, CfxMouseEvent.Unwrap(@event));
 }
 /// <summary>
 /// Call this function each time the mouse is moved across the web view during
 /// a drag operation (after calling DragTargetDragEnter and before calling
 /// DragTargetDragLeave/DragTargetDrop). This function is only used when window
 /// rendering is disabled.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
 /// </remarks>
 public void DragTargetDragOver(CfxMouseEvent @event, CfxDragOperationsMask allowedOps)
 {
     CfxApi.BrowserHost.cfx_browser_host_drag_target_drag_over(NativePtr, CfxMouseEvent.Unwrap(@event), (int)allowedOps);
 }
 /// <summary>
 /// Send a mouse wheel event to the browser. The |x| and |y| coordinates are
 /// relative to the upper-left corner of the view. The |deltaX| and |deltaY|
 /// values represent the movement delta in the X and Y directions respectively.
 /// In order to scroll inside select popups with window rendering disabled
 /// CfxRenderHandler.GetScreenPoint should be implemented properly.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
 /// </remarks>
 public void SendMouseWheelEvent(CfxMouseEvent @event, int deltaX, int deltaY)
 {
     CfxApi.BrowserHost.cfx_browser_host_send_mouse_wheel_event(NativePtr, CfxMouseEvent.Unwrap(@event), deltaX, deltaY);
 }
 /// <summary>
 /// Send a mouse move event to the browser. The |x| and |y| coordinates are
 /// relative to the upper-left corner of the view.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
 /// </remarks>
 public void SendMouseMoveEvent(CfxMouseEvent @event, bool mouseLeave)
 {
     CfxApi.BrowserHost.cfx_browser_host_send_mouse_move_event(NativePtr, CfxMouseEvent.Unwrap(@event), mouseLeave ? 1 : 0);
 }
Пример #6
0
 /// <summary>
 /// Call this function when the user drags the mouse into the web view (before
 /// calling DragTargetDragOver/DragTargetLeave/DragTargetDrop). |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
 /// CfxDragData.ResetFileContents (for example, if |dragData| comes from
 /// CfxRenderHandler.StartDragging). This function is only used when
 /// window rendering is disabled.
 /// </summary>
 /// <remarks>
 /// See also the original CEF documentation in
 /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_browser_capi.h">cef/include/capi/cef_browser_capi.h</see>.
 /// </remarks>
 public void DragTargetDragEnter(CfxDragData dragData, CfxMouseEvent @event, CfxDragOperationsMask allowedOps)
 {
     CfxApi.cfx_browser_host_drag_target_drag_enter(NativePtr, CfxDragData.Unwrap(dragData), CfxMouseEvent.Unwrap(@event), (int)allowedOps);
 }