| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -566,6 +566,7 @@ for a description of the available keys. | |||
| 566 | 566 | | mouseButtonType | int | | |
| 567 | 567 | | mouseUp | bool | | |
| 568 | 568 | | clickCount | int | | |
| 569 | + | modifiers | int | | ||
| 569 | 570 | | __Return__ | void | | |
| 570 | 571 | ||
| 571 | 572 | Send a mouse click event to the browser. The |x| and |y| coordinates are relative to the upper-left corner of the view. | |
@@ -576,28 +577,21 @@ cefpython.`MOUSEBUTTON_LEFT` | |||
| 576 | 577 | cefpython.`MOUSEBUTTON_MIDDLE` | |
| 577 | 578 | cefpython.`MOUSEBUTTON_RIGHT` | |
| 578 | 579 | ||
| 579 | - TODO: allow to pass modifiers which represents bit flags | ||
| 580 | - describing any pressed modifier keys. Modifiers can also | ||
| 581 | - be passed to SendMouseMoveEvent(), SendMouseWheelEvent(). | ||
| 582 | - See cef_event_flags_t enum for modifiers values: | ||
| 583 | - | ||
| 584 | - ``` | ||
| 585 | - enum cef_event_flags_t { | ||
| 586 | - EVENTFLAG_NONE = 0, | ||
| 587 | - EVENTFLAG_CAPS_LOCK_ON = 1 << 0, | ||
| 588 | - EVENTFLAG_SHIFT_DOWN = 1 << 1, | ||
| 589 | - EVENTFLAG_CONTROL_DOWN = 1 << 2, | ||
| 590 | - EVENTFLAG_ALT_DOWN = 1 << 3, | ||
| 591 | - EVENTFLAG_LEFT_MOUSE_BUTTON = 1 << 4, | ||
| 592 | - EVENTFLAG_MIDDLE_MOUSE_BUTTON = 1 << 5, | ||
| 593 | - EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6, | ||
| 594 | - // Mac OS-X command key. | ||
| 595 | - EVENTFLAG_COMMAND_DOWN = 1 << 7, | ||
| 596 | - EVENTFLAG_NUM_LOCK_ON = 1 << 8, | ||
| 597 | - EVENTFLAG_IS_KEY_PAD = 1 << 9, | ||
| 598 | - EVENTFLAG_IS_LEFT = 1 << 10, | ||
| 599 | - EVENTFLAG_IS_RIGHT = 1 << 11, | ||
| 600 | - ``` | ||
| 580 | + `modifiers` flags: | ||
| 581 | + | ||
| 582 | + * EVENTFLAG_NONE | ||
| 583 | + * EVENTFLAG_CAPS_LOCK_ON | ||
| 584 | + * EVENTFLAG_SHIFT_DOWN | ||
| 585 | + * EVENTFLAG_CONTROL_DOWN | ||
| 586 | + * EVENTFLAG_ALT_DOWN | ||
| 587 | + * EVENTFLAG_LEFT_MOUSE_BUTTON | ||
| 588 | + * EVENTFLAG_MIDDLE_MOUSE_BUTTON | ||
| 589 | + * EVENTFLAG_RIGHT_MOUSE_BUTTON | ||
| 590 | + * EVENTFLAG_COMMAND_DOWN (Mac) | ||
| 591 | + * EVENTFLAG_NUM_LOCK_ON (Mac) | ||
| 592 | + * EVENTFLAG_IS_KEY_PAD (Mac) | ||
| 593 | + * EVENTFLAG_IS_LEFT (Mac) | ||
| 594 | + * EVENTFLAG_IS_RIGHT (Mac) | ||
| 601 | 595 | ||
| 602 | 596 | ||
| 603 | 597 | ### SendMouseMoveEvent | |
@@ -607,9 +601,12 @@ enum cef_event_flags_t { | |||
| 607 | 601 | | x | int | | |
| 608 | 602 | | y | int | | |
| 609 | 603 | | mouseLeave | bool | | |
| 604 | + | modifiers | int | | ||
| 610 | 605 | | __Return__ | void | | |
| 611 | 606 | ||
| 612 | - Send a mouse move event to the browser. The |x| and |y| coordinates are relative to the upper-left corner of the view. | ||
| 607 | + Send a mouse move event to the browser. The |x| and |y| coordinates are | ||
| 608 | + relative to the upper-left corner of the view. For a list of modifiers | ||
| 609 | + flags see SendMouseClickEvent(). | ||
| 613 | 610 | ||
| 614 | 611 | ||
| 615 | 612 | ### SendMouseWheelEvent | |
@@ -620,9 +617,10 @@ Send a mouse move event to the browser. The |x| and |y| coordinates are relative | |||
| 620 | 617 | | y | int | | |
| 621 | 618 | | deltaX | int | | |
| 622 | 619 | | deltaY | int | | |
| 620 | + | modifiers | int | | ||
| 623 | 621 | | __Return__ | void | | |
| 624 | 622 | ||
| 625 | - 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 [RenderHandler](RenderHandler.md).GetScreenPoint() should be implemented properly. | ||
| 623 | + 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 [RenderHandler](RenderHandler.md).GetScreenPoint() should be implemented properly. For a list of modifiers flags see SendMouseClickEvent(). | ||
| 626 | 624 | ||
| 627 | 625 | ||
| 628 | 626 | ### SendFocusEvent | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -561,7 +561,9 @@ def on_touch_move(self, touch, *kwargs): | |||
| 561 | 561 | return | |
| 562 | 562 | ||
| 563 | 563 | y = self.height-touch.pos[1] | |
| 564 | - self.browser.SendMouseMoveEvent(touch.x, y, mouseLeave=False) | ||
| 564 | + modifiers = cefpython.EVENTFLAG_LEFT_MOUSE_BUTTON | ||
| 565 | + self.browser.SendMouseMoveEvent(touch.x, y, mouseLeave=False, | ||
| 566 | + modifiers=modifiers) | ||
| 565 | 567 | ||
| 566 | 568 | ||
| 567 | 569 | def on_touch_up(self, touch, *kwargs): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments