diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-03-13 17:18:11 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-03-14 10:14:11 +0100 |
commit | efef0583c62be4aeb5c360621cb3072ff336eb6b (patch) | |
tree | 346a86de3e7931b5292810811b054e04ac2b4da3 /include/sfx2/lokhelper.hxx | |
parent | 1da82a6e80cd2147839031250dba10976560962d (diff) |
LOK: re-factor async key & mouse event re-posting.
A fairly pure re-factor, although adding disposed window
checking to a number of sites with a warning.
Moves the event emission helpers from VCL into SfxLokHelper: we're
going to need more view / integration here next anyway.
Removes lots of copy/paste horror.
Change-Id: I279c11a1d8093b4feeeb6b7850f500806fff80dd
Reviewed-on: https://gerrit.libreoffice.org/69218
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include/sfx2/lokhelper.hxx')
-rw-r--r-- | include/sfx2/lokhelper.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index be68f2e91044..62c024508de1 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -57,6 +57,16 @@ public: /// Notify about the editing context change. static void notifyContextChange(SfxViewShell const* pViewShell, const OUString& aApplication, const OUString& aContext); + /// Helper for posting async key event + static void postKeyEventAsync(const VclPtr<vcl::Window> &xWindow, + int nType, int nCharCode, int nKeyCode); + + /// Helper for posting async mouse event + static void postMouseEventAsync(const VclPtr<vcl::Window> &xWindow, + int nType, const Point &rPos, + int nCount, MouseEventModifiers aModifiers, + int nButtons, int nModifier); + /// A special value to signify 'infinity'. /// This value is chosen such that sal_Int32 will not overflow when manipulated. static const long MaxTwips = 1e9; |