[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - bundled/include
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon May 6 09:54:04 UTC 2019
bundled/include/LibreOfficeKit/LibreOfficeKit.h | 18 ++-----
bundled/include/LibreOfficeKit/LibreOfficeKit.hxx | 48 +++++++------------
bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h | 2
bundled/include/LibreOfficeKit/LibreOfficeKitInit.h | 15 +----
bundled/include/LibreOfficeKit/LibreOfficeKitTypes.h | 6 ++
5 files changed, 35 insertions(+), 54 deletions(-)
New commits:
commit 4aba297557e4d138e7def6dc5845bdc15f497c84
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Mon May 6 11:08:14 2019 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon May 6 11:53:44 2019 +0200
Update the bundled headers from cp-6.0.
Change-Id: I225ad28d6859aac1c6a3a9bd1c34e85010a73b0a
Reviewed-on: https://gerrit.libreoffice.org/71850
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 4b3800357..9fa134b56 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -104,6 +104,12 @@ struct _LibreOfficeKitClass
const int nCertificateBinarySize,
const unsigned char* pPrivateKeyBinary,
const int nPrivateKeyBinarySize);
+
+ /// @see lok::Office::runLoop()
+ void (*runLoop) (LibreOfficeKit* pThis,
+ LibreOfficeKitPollCallback pPollCallback,
+ LibreOfficeKitWakeCallback pWakeCallback,
+ void* pData);
};
#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize)
@@ -328,18 +334,6 @@ struct _LibreOfficeKitDocumentClass
const int width, const int height,
const double dpiscale);
-#ifdef IOS
- /// @see lok::Document::paintTileToCGContext().
- void (*paintTileToCGContext) (LibreOfficeKitDocument* pThis,
- void* rCGContext,
- const int nCanvasWidth,
- const int nCanvasHeight,
- const int nTilePosX,
- const int nTilePosY,
- const int nTileWidth,
- const int nTileHeight);
-#endif // IOS
-
// CERTIFICATE AND SIGNING
/// @see lok::Document::insertCertificate().
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
index 895ca5bf5..235053fa0 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -188,7 +188,7 @@ public:
*
* @param nWindowid
*/
- void postWindow(unsigned nWindowId, int nAction, const char* pData)
+ void postWindow(unsigned nWindowId, int nAction, const char* pData = nullptr)
{
return mpDoc->pClass->postWindow(mpDoc, nWindowId, nAction, pData);
}
@@ -561,34 +561,6 @@ public:
mpDoc->pClass->postWindowExtTextInputEvent(mpDoc, nWindowId, nType, pText);
}
-#ifdef IOS
- /**
- * Renders a subset of the document to a Core Graphics context.
- *
- * Note that the buffer size and the tile size implicitly supports
- * rendering at different zoom levels, as the number of rendered pixels and
- * the rendered rectangle of the document are independent.
- *
- * @param rCGContext the CGContextRef, cast to a void*.
- * @param nCanvasHeight number of pixels in a column of pBuffer.
- * @param nTilePosX logical X position of the top left corner of the rendered rectangle, in TWIPs.
- * @param nTilePosY logical Y position of the top left corner of the rendered rectangle, in TWIPs.
- * @param nTileWidth logical width of the rendered rectangle, in TWIPs.
- * @param nTileHeight logical height of the rendered rectangle, in TWIPs.
- */
- void paintTileToCGContext(void* rCGContext,
- const int nCanvasWidth,
- const int nCanvasHeight,
- const int nTilePosX,
- const int nTilePosY,
- const int nTileWidth,
- const int nTileHeight)
- {
- return mpDoc->pClass->paintTileToCGContext(mpDoc, rCGContext, nCanvasWidth, nCanvasHeight,
- nTilePosX, nTilePosY, nTileWidth, nTileHeight);
- }
-#endif // IOS
-
/**
* Insert certificate (in binary form) to the certificate store.
*/
@@ -852,6 +824,24 @@ public:
pCertificateBinary, nCertificateBinarySize,
pPrivateKeyBinary, nPrivateKeyBinarySize);
}
+
+ /**
+ * Runs the main-loop in the current thread. To trigger this
+ * mode you need to putenv a SAL_LOK_OPTIONS containing 'unipoll'.
+ * The @pPollCallback is called to poll for events from the Kit client
+ * and the @pWakeCallback can be called by internal LibreOfficeKit threads
+ * to wake the caller of 'runLoop' ie. the main thread.
+ *
+ * it is expected that runLoop does not return until Kit exit.
+ *
+ * @pData is a context/closure passed to both methods.
+ */
+ void runLoop(LibreOfficeKitPollCallback pPollCallback,
+ LibreOfficeKitWakeCallback pWakeCallback,
+ void* pData)
+ {
+ mpThis->pClass->runLoop(mpThis, pPollCallback, pWakeCallback, pData);
+ }
};
/// Factory method to create a lok::Office instance.
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
index c8168f9b7..7ff69d1b3 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -381,7 +381,7 @@ typedef enum
/**
* The size and/or the position of the view cursor changed. A view cursor
- * is a cursor of another view, the current view can't change it.
+ * is a cursor of an other view, the current view can't change it.
*
* The payload format:
*
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h b/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
index 6667d2b92..5c600b502 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -287,22 +287,13 @@ static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_p
}
free( imp_lib );
// dlhandle is "leaked"
- // coverity[leaked_storage] - on purpose
+ // coverity[leaked_storage]
return pSym( install_path );
}
- if (user_profile_url != NULL && user_profile_url[0] == '/')
- {
- // It should be either a file: URL or a vnd.sun.star.pathname: URL.
- fprintf( stderr, "second parameter to lok_init_2 '%s' should be a URL, not a pathname\n", user_profile_url );
- lok_dlclose( dlhandle );
- free( imp_lib );
- return NULL;
- }
-
free( imp_lib );
// dlhandle is "leaked"
- // coverity[leaked_storage] - on purpose
+ // coverity[leaked_storage]
return pSym2( install_path, user_profile_url );
#else
return libreofficekit_hook_2( install_path, user_profile_url );
@@ -339,7 +330,7 @@ int lok_preinit( const char *install_path, const char *user_profile_url )
free( imp_lib );
// dlhandle is "leaked"
- // coverity[leaked_storage] - on purpose
+ // coverity[leaked_storage]
return pSym( install_path, user_profile_url );
}
#endif
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitTypes.h b/bundled/include/LibreOfficeKit/LibreOfficeKitTypes.h
index 2e9078ff4..e12ddad19 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKitTypes.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKitTypes.h
@@ -22,6 +22,12 @@ extern "C"
*/
typedef void (*LibreOfficeKitCallback)(int nType, const char* pPayload, void* pData);
+/** @see lok::Office::runLoop().
+ @since LibreOffice 6.3
+ */
+typedef int (*LibreOfficeKitPollCallback)(void* pData, int timeoutUs);
+typedef void (*LibreOfficeKitWakeCallback)(void* pData);
+
#ifdef __cplusplus
}
#endif
More information about the Libreoffice-commits
mailing list