LibreOffice Module comphelper (master) 1
lok.hxx
Go to the documentation of this file.
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.
4 *
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 */
9
10#ifndef INCLUDED_COMPHELPER_LOK_HXX
11#define INCLUDED_COMPHELPER_LOK_HXX
12
14#include <rtl/ustring.hxx>
15
16class LanguageTag;
17
18// Interface between the LibreOfficeKit implementation called by LibreOfficeKit clients and other
19// LibreOffice code.
20
22{
23// Functions to be called only from the LibreOfficeKit implementation in desktop, not from other
24// places in LibreOffice code.
25
26COMPHELPER_DLLPUBLIC void setActive(bool bActive = true);
27
29{
30 Start,
32 Finish
33};
34
36 void (*callback)(void* data, statusIndicatorCallbackType type, int percent, const char* pText),
37 void* data);
38
39// Functions that can be called from arbitrary places in LibreOffice.
40
41// Check whether the code is running as invoked through LibreOfficeKit.
43
48COMPHELPER_DLLPUBLIC void setLocalRendering(bool bLocalRendering = true);
50
54COMPHELPER_DLLPUBLIC void setPartInInvalidation(bool bPartInInvalidation);
55
59COMPHELPER_DLLPUBLIC void setTiledPainting(bool bTiledPainting);
63COMPHELPER_DLLPUBLIC void setDialogPainting(bool bDialogPainting);
65COMPHELPER_DLLPUBLIC void setDPIScale(double fDPIScale);
69COMPHELPER_DLLPUBLIC void setTiledAnnotations(bool bTiledAnnotations);
73COMPHELPER_DLLPUBLIC void setRangeHeaders(bool bTiledAnnotations);
76
77enum Compat : sal_uInt32
78{
79 none = 0,
82};
87
91COMPHELPER_DLLPUBLIC void setViewIdForVisCursorInvalidation(bool bViewIdForVisCursorInvalidation);
92
94COMPHELPER_DLLPUBLIC void setLocale(const LanguageTag& languageTag);
97
99COMPHELPER_DLLPUBLIC void setLanguageTag(const LanguageTag& languageTag);
103COMPHELPER_DLLPUBLIC bool isAllowlistedLanguage(const OUString& lang);
104
105// Status indicator handling. Even if in theory there could be several status indicators active at
106// the same time, in practice there is only one at a time, so we don't handle any identification of
107// status indicator in this API.
108COMPHELPER_DLLPUBLIC void statusIndicatorStart(const OUString& sText);
111
112COMPHELPER_DLLPUBLIC void setBlockedCommandList(const char* blockedCommandList);
113}
114
115#endif // INCLUDED_COMPHELPER_LOK_HXX
116
117/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define COMPHELPER_DLLPUBLIC
virtual void SetValue(tools::Long nNew) override
void statusIndicatorStart(const OUString &sText)
Definition: lok.cxx:267
void statusIndicatorFinish()
Definition: lok.cxx:279
void setTiledPainting(bool bTiledPainting)
Set if we are doing tiled painting.
Definition: lok.cxx:110
void setCompatFlag(Compat flag)
Set compatibility flags.
Definition: lok.cxx:180
double getDPIScale()
Get the DPI scale for rendering for HiDPI displays.
Definition: lok.cxx:135
void setDialogPainting(bool bDialogPainting)
Set if we are painting the dialog.
Definition: lok.cxx:120
bool isDialogPainting()
Check if we are painting the dialog.
Definition: lok.cxx:125
COMPHELPER_DLLPUBLIC void setBlockedCommandList(const char *blockedCommandList)
bool isTiledPainting()
Check if we are doing tiled painting.
Definition: lok.cxx:115
bool isTiledAnnotations()
Check if annotations rendering is turned off.
Definition: lok.cxx:145
void statusIndicatorSetValue(int percent)
Definition: lok.cxx:273
bool isAllowlistedLanguage(const OUString &lang)
If the language name should be used for this LOK instance.
Definition: lok.cxx:208
bool isCompatFlagSet(Compat flag)
Get compatibility flags.
Definition: lok.cxx:182
bool isPartInInvalidation()
Check whether clients want a part number in an invalidation payload.
Definition: lok.cxx:105
const LanguageTag & getLocale()
Get the current LOK's locale.
Definition: lok.cxx:189
bool isRangeHeaders()
Check if range based header data is enabled.
Definition: lok.cxx:165
void setRangeHeaders(bool bRangeHeaders)
Set if we want range based header data.
Definition: lok.cxx:150
const LanguageTag & getLanguageTag()
Get the current LOK's language.
Definition: lok.cxx:201
void setPartInInvalidation(bool bPartInInvalidation)
Set whether clients want a part number in an invalidation payload.
Definition: lok.cxx:100
bool isViewIdForVisCursorInvalidation()
Check whether clients want viewId in visible cursor invalidation payload.
Definition: lok.cxx:160
void setLocale(const LanguageTag &rLanguageTag)
Update the current LOK's locale.
Definition: lok.cxx:184
void setTiledAnnotations(bool bTiledAnnotations)
Set if we want no annotations rendering.
Definition: lok.cxx:140
void setLanguageTag(const LanguageTag &rLanguageTag)
Update the current LOK's language.
Definition: lok.cxx:196
void setStatusIndicatorCallback(void(*callback)(void *data, statusIndicatorCallbackType type, int percent, const char *pText), void *data)
Definition: lok.cxx:261
void setLocalRendering(bool bLocalRendering)
Shift the coordinates before rendering each bitmap.
Definition: lok.cxx:170
void setActive(bool bActive)
Definition: lok.cxx:90
void setViewIdForVisCursorInvalidation(bool bViewIdForVisCursorInvalidation)
Set whether clients want viewId in visible cursor invalidation payload.
Definition: lok.cxx:155
void setDPIScale(double fDPIScale)
Set the DPI scale for rendering for HiDPI displays.
Definition: lok.cxx:130