summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-11-30 14:59:02 +0000
committerMichael Meeks <michael.meeks@collabora.com>2019-12-02 17:22:02 +0100
commit2f463f9d1f45546318a57de57f6e5e918063af0a (patch)
treeed0e81124ae7e26c3ee4b27915f47b42ad5c7d22 /include
parent1903d0275b09d88eec6e57303a8a7d34246cb230 (diff)
lok: add viewId to window painting, to allow special-casing on render.
View switching should not cause the sidebar UX to re-build at all. Particularly it should not do this when we switch view just to render a sidebar. Change-Id: Iec0427cdc8308fc273d73ea56dd208bfa7036471 Reviewed-on: https://gerrit.libreoffice.org/84120 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 92814f3389de346f3ae32cddb38f079763e68ddf) Reviewed-on: https://gerrit.libreoffice.org/84129 Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/84223
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h9
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx7
2 files changed, 13 insertions, 3 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 78f2b478e861..a486886c15de 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -427,6 +427,15 @@ struct _LibreOfficeKitDocumentClass
int* pFontHeight,
int pOrientation);
+ /// Switches view to viewId if viewId >= 0, and paints window
+ /// @see lok::Document::paintWindowDPI().
+ void (*paintWindowForView) (LibreOfficeKitDocument* pThis, unsigned nWindowId,
+ unsigned char* pBuffer,
+ const int x, const int y,
+ const int width, const int height,
+ const double dpiscale,
+ int viewId);
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 18a20c7a2e2d..318bf943cca9 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -177,10 +177,11 @@ public:
const int y,
const int width,
const int height,
- const double dpiscale = 1.0)
+ const double dpiscale = 1.0,
+ const int viewId = -1)
{
- return mpDoc->pClass->paintWindowDPI(mpDoc, nWindowId, pBuffer,
- x, y, width, height, dpiscale);
+ return mpDoc->pClass->paintWindowForView(mpDoc, nWindowId, pBuffer, x, y,
+ width, height, dpiscale, viewId);
}
/**