Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / include / comphelper / lok.hxx
blob2cc38c60e455c9ac2c3f3fd27d17a4d2a2338368
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_COMPHELPER_LOK_HXX
11 #define INCLUDED_COMPHELPER_LOK_HXX
13 #include <comphelper/comphelperdllapi.h>
15 // Interface between the LibreOfficeKit implementation called by LibreOfficeKit clients and other
16 // LibreOffice code.
18 namespace comphelper
21 namespace LibreOfficeKit
24 // Functions to be called only from the LibreOfficeKit implementation in desktop, not from other
25 // places in LibreOffice code.
27 COMPHELPER_DLLPUBLIC void setActive(bool bActive = true);
29 enum class statusIndicatorCallbackType { Start, SetValue, Finish };
31 COMPHELPER_DLLPUBLIC void setStatusIndicatorCallback(void (*callback)(void *data, statusIndicatorCallbackType type, int percent), void *data);
34 // Functions that can be called from arbitrary places in LibreOffice.
36 // Check whether the code is running as invoked through LibreOfficeKit.
37 COMPHELPER_DLLPUBLIC bool isActive();
39 /// Check whether clients register a callback for each view.
40 COMPHELPER_DLLPUBLIC bool isViewCallback();
41 /// Set whether clients register a callback for each view.
42 COMPHELPER_DLLPUBLIC void setViewCallback(bool bViewCallback);
44 // Status indicator handling. Even if in theory there could be several status indicators active at
45 // the same time, in practice there is only one at a time, so we don't handle any identification of
46 // status indicator in this API.
47 COMPHELPER_DLLPUBLIC void statusIndicatorStart();
48 COMPHELPER_DLLPUBLIC void statusIndicatorSetValue(int percent);
49 COMPHELPER_DLLPUBLIC void statusIndicatorFinish();
54 #endif // INCLUDED_COMPHELPER_LOK_HXX
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */