diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-20 16:42:34 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-06-20 15:12:54 +0000 |
commit | c544a8b674dd7ac9dd466a84a440ede030942438 (patch) | |
tree | 3da18d0b6717c9f50edc1c157c9f5d77b2d0e0a3 /include | |
parent | 55bd0ac154a7118f7cce48ffd1e44a48d9099413 (diff) |
sw lok: add LOK_CALLBACK_INVALIDATE_VIEW_CURSOR
So a view can be aware where cursors of other views are.
Change-Id: I6133fb55aa2869843c0284b7d76264bab3b3d5da
Reviewed-on: https://gerrit.libreoffice.org/26513
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKitEnums.h | 17 | ||||
-rw-r--r-- | include/sfx2/lokhelper.hxx | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h index 4b8ff351689d..4229e73e6728 100644 --- a/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -312,6 +312,23 @@ typedef enum */ LOK_CALLBACK_CONTEXT_MENU, + /** + * The size and/or the position of the view cursor changed. A view cursor + * is a cursor of an other view, the current view can't change it. + * + * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES. + * The payload format: + * + * { + * "viewId": "..." + * "rectangle": "..." + * } + * + * - viewId is a value returned earlier by lok::Document::createView() + * - rectangle uses the format of LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR + */ + LOK_CALLBACK_INVALIDATE_VIEW_CURSOR, + } LibreOfficeKitCallbackType; diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index 2a691f65759c..43c01892e98b 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -26,7 +26,7 @@ public: /// Set a view shell as current one. static void setView(std::uintptr_t nId); /// Get the currently active view. - static std::uintptr_t getView(); + static std::uintptr_t getView(SfxViewShell *pViewShell = nullptr); /// Get the number of views of the current object shell. static std::size_t getViews(); }; |