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 
16 class 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 
26 COMPHELPER_DLLPUBLIC void setActive(bool bActive = true);
27 
29 {
30  Start,
31  SetValue,
32  Finish
33 };
34 
36  void (*callback)(void* data, statusIndicatorCallbackType type, int percent), void* data);
37 
38 // Functions that can be called from arbitrary places in LibreOffice.
39 
40 // Check whether the code is running as invoked through LibreOfficeKit.
42 
47 COMPHELPER_DLLPUBLIC void setLocalRendering(bool bLocalRendering = true);
49 
53 COMPHELPER_DLLPUBLIC void setPartInInvalidation(bool bPartInInvalidation);
54 
58 COMPHELPER_DLLPUBLIC void setTiledPainting(bool bTiledPainting);
62 COMPHELPER_DLLPUBLIC void setDialogPainting(bool bDialogPainting);
64 COMPHELPER_DLLPUBLIC void setDPIScale(double fDPIScale);
68 COMPHELPER_DLLPUBLIC void setTiledAnnotations(bool bTiledAnnotations);
72 COMPHELPER_DLLPUBLIC void setRangeHeaders(bool bTiledAnnotations);
75 
76 enum Compat : sal_uInt32
77 {
78  none = 0,
81 };
86 
90 COMPHELPER_DLLPUBLIC void setViewIdForVisCursorInvalidation(bool bViewIdForVisCursorInvalidation);
91 
93 COMPHELPER_DLLPUBLIC void setLocale(const LanguageTag& languageTag);
96 
98 COMPHELPER_DLLPUBLIC void setLanguageTag(const LanguageTag& languageTag);
102 COMPHELPER_DLLPUBLIC bool isAllowlistedLanguage(const OUString& lang);
103 
104 // Status indicator handling. Even if in theory there could be several status indicators active at
105 // the same time, in practice there is only one at a time, so we don't handle any identification of
106 // status indicator in this API.
110 }
111 
112 #endif // INCLUDED_COMPHELPER_LOK_HXX
113 
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool isAllowlistedLanguage(const OUString &lang)
If the language name should be used for this LOK instance.
Definition: lok.cxx:208
bool isTiledAnnotations()
Check if annotations rendering is turned off.
Definition: lok.cxx:145
void setViewIdForVisCursorInvalidation(bool bViewIdForVisCursorInvalidation)
Set whether clients want viewId in visible cursor invalidation payload.
Definition: lok.cxx:155
void statusIndicatorFinish()
Definition: lok.cxx:279
void setTiledPainting(bool bTiledPainting)
Set if we are doing tiled painting.
Definition: lok.cxx:110
void setDPIScale(double fDPIScale)
Set the DPI scale for rendering for HiDPI displays.
Definition: lok.cxx:130
void setLanguageTag(const LanguageTag &rLanguageTag)
Update the current LOK's language.
Definition: lok.cxx:196
bool isRangeHeaders()
Check if range based header data is enabled.
Definition: lok.cxx:165
bool isCompatFlagSet(Compat flag)
Get compatibility flags.
Definition: lok.cxx:182
bool isTiledPainting()
Check if we are doing tiled painting.
Definition: lok.cxx:115
bool isDialogPainting()
Check if we are painting the dialog.
Definition: lok.cxx:125
bool isPartInInvalidation()
Check whether clients want a part number in an invalidation payload.
Definition: lok.cxx:105
void setRangeHeaders(bool bRangeHeaders)
Set if we want range based header data.
Definition: lok.cxx:150
void setLocalRendering(bool bLocalRendering)
Shift the coordinates before rendering each bitmap.
Definition: lok.cxx:170
void setStatusIndicatorCallback(void(*callback)(void *data, statusIndicatorCallbackType type, int percent), void *data)
Definition: lok.cxx:261
const LanguageTag & getLanguageTag()
Get the current LOK's language.
Definition: lok.cxx:201
void setDialogPainting(bool bDialogPainting)
Set if we are painting the dialog.
Definition: lok.cxx:120
void statusIndicatorSetValue(int percent)
Definition: lok.cxx:273
void setCompatFlag(Compat flag)
Set compatibility flags.
Definition: lok.cxx:180
const LanguageTag & getLocale()
Get the current LOK's locale.
Definition: lok.cxx:189
bool isViewIdForVisCursorInvalidation()
Check whether clients want viewId in visible cursor invalidation payload.
Definition: lok.cxx:160
void setTiledAnnotations(bool bTiledAnnotations)
Set if we want no annotations rendering.
Definition: lok.cxx:140
#define COMPHELPER_DLLPUBLIC
void setActive(bool bActive)
Definition: lok.cxx:90
void setPartInInvalidation(bool bPartInInvalidation)
Set whether clients want a part number in an invalidation payload.
Definition: lok.cxx:100
double getDPIScale()
Get the DPI scale for rendering for HiDPI displays.
Definition: lok.cxx:135
void setLocale(const LanguageTag &rLanguageTag)
Update the current LOK's locale.
Definition: lok.cxx:184