Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ac2a3eb

Browse filesBrowse files
Ability to pass modifiers to SendMouseMoveEvent and similar (Issue cztomczak#182)
1 parent 0c1edf0 commit ac2a3eb
Copy full SHA for ac2a3eb

File tree

Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Open diff view settings
Collapse file

‎cefpython/browser.pyx‎

Copy file name to clipboardExpand all lines: cefpython/browser.pyx
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -696,17 +696,17 @@ cdef class PyBrowser:
696696

697697
cpdef py_void SendMouseClickEvent(self, int x, int y,
698698
cef_types.cef_mouse_button_type_t mouseButtonType,
699-
py_bool mouseUp, int clickCount):
699+
py_bool mouseUp, int clickCount, int modifiers=0):
700700
self.GetCefBrowser().get().SendMouseClickEvent(x, y,
701701
mouseButtonType, bool(mouseUp), clickCount)
702702

703703
cpdef py_void SendMouseMoveEvent(self, int x, int y,
704-
py_bool mouseLeave):
704+
py_bool mouseLeave, int modifiers=0):
705705
self.GetCefBrowser().get().SendMouseMoveEvent(x, y,
706706
bool(mouseLeave))
707707

708708
cpdef py_void SendMouseWheelEvent(self, int x, int y,
709-
int deltaX, int deltaY):
709+
int deltaX, int deltaY, int modifiers=0):
710710
self.GetCefBrowser().get().SendMouseWheelEvent(x, y,
711711
deltaX, deltaY)
712712

@@ -739,9 +739,9 @@ cdef class PyBrowser:
739739
bool(pyEvent["focus_on_editable_field"])
740740
self.GetCefBrowserHost().get().SendKeyEvent(cefEvent)
741741

742-
cpdef py_void SendMouseClickEvent(self, x, y,
742+
cpdef py_void SendMouseClickEvent(self, int x, int y,
743743
cef_types.cef_mouse_button_type_t mouseButtonType,
744-
py_bool mouseUp, int clickCount):
744+
py_bool mouseUp, int clickCount, int modifiers=0):
745745
cdef CefMouseEvent mouseEvent
746746
mouseEvent.x = x
747747
mouseEvent.y = y
@@ -765,25 +765,25 @@ cdef class PyBrowser:
765765
EVENTFLAG_IS_LEFT = 1 << 10,
766766
EVENTFLAG_IS_RIGHT = 1 << 11,
767767
"""
768-
mouseEvent.modifiers = 0
768+
mouseEvent.modifiers = modifiers
769769
self.GetCefBrowserHost().get().SendMouseClickEvent(mouseEvent,
770770
mouseButtonType, bool(mouseUp), clickCount)
771771

772772
cpdef py_void SendMouseMoveEvent(self, int x, int y,
773-
py_bool mouseLeave):
773+
py_bool mouseLeave, int modifiers=0):
774774
cdef CefMouseEvent mouseEvent
775775
mouseEvent.x = x
776776
mouseEvent.y = y
777-
mouseEvent.modifiers = 0
777+
mouseEvent.modifiers = modifiers
778778
self.GetCefBrowserHost().get().SendMouseMoveEvent(mouseEvent,
779779
bool(mouseLeave))
780780

781781
cpdef py_void SendMouseWheelEvent(self, int x, int y,
782-
int deltaX, int deltaY):
782+
int deltaX, int deltaY, int modifiers=0):
783783
cdef CefMouseEvent mouseEvent
784784
mouseEvent.x = x
785785
mouseEvent.y = y
786-
mouseEvent.modifiers = 0
786+
mouseEvent.modifiers = modifiers
787787
self.GetCefBrowserHost().get().SendMouseWheelEvent(mouseEvent,
788788
deltaX, deltaY)
789789

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.