1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include <sal/types.h>
24 // An extended callback type that allows passing in also some binary data,
25 // so that post-processing the messages does not require conversions
26 // from and to strings.
28 // TODO: It might possibly make sense to drop the generic type/payload function
29 // and have only a dedicated function for each message type?
31 class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI SfxLokCallbackInterface
34 virtual ~SfxLokCallbackInterface() {}
35 // LibreOfficeKitCallback equivalent.
36 virtual void libreOfficeKitViewCallback(int nType
, const rtl::OString
& pPayload
) = 0;
37 // Callback that explicitly provides view id (which is also included in the payload).
38 virtual void libreOfficeKitViewCallbackWithViewId(int nType
, const rtl::OString
& pPayload
,
41 // LOK_CALLBACK_INVALIDATE_TILES
42 // nPart is either part, -1 for all-parts, or INT_MIN if
43 // comphelper::LibreOfficeKit::isPartInInvalidation() is not set
44 virtual void libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle
* pRect
, int nPart
,
47 // A message of the given type should be sent, for performance purpose only a notification
48 // is given here, details about the message should be queried from SfxViewShell when necessary.
49 // This is used for messages that are generated often but only the last one is needed.
50 virtual void libreOfficeKitViewUpdatedCallback(int nType
) = 0;
51 // Like libreOfficeKitViewUpdatedCallback(), but a last message is needed for each nViewId value.
52 // SfxViewShell:getLOKPayload() will be called on nSourceViewId view.
53 virtual void libreOfficeKitViewUpdatedCallbackPerViewId(int nType
, int nViewId
,
56 // There are pending invalidate tiles calls that need to be processed.
57 // A call to SfxViewShell::flushPendingLOKInvalidateTiles() should be scheduled.
58 virtual void libreOfficeKitViewAddPendingInvalidateTiles() = 0;
59 virtual void dumpState(rtl::OStringBuffer
& rState
) = 0;
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */