diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-05-16 09:07:52 +0100 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-06-25 13:04:28 +0100 |
commit | 0434043aed646ef853eb60dcb01909745caec87e (patch) | |
tree | 7e50e1e041b48e64dcace917378fd1c2e2d0121c /include/LibreOfficeKit | |
parent | 3a26638155de5ba804f5260dfb72b392424b9b50 (diff) |
Return a bitmap buffer for tiled rendering from LibLO.
We still need some way of managing the buffers properly rather
than just keeping a static reference to the last buffer
that was rendered.
Change-Id: I17940c758948aa9418f4e0216ecd253d128cd04f
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 12 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 7 |
2 files changed, 5 insertions, 14 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 68b96a090691..b893067d0a67 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -85,16 +85,8 @@ struct _LibreOfficeKitDocumentClass void (*setPart) (LibreOfficeKitDocument* pThis, int nPart); - // pCanvas is a pointer to the appropriate type of graphics object: - // Windows: HDC - // iOS/OSX: CGContextRef - // Unx: A full SystemGraphicsData - // (This is as we need multiple pieces of data on Unx -- in the future - // it would potentially be best to define our own simple equivalent - // structure here which can then be copied into a SystemGraphicsData - // within the paintTile implementation.) - void (*paintTile) (LibreOfficeKitDocument* pThis, - void* Canvas, + // Get a pointer to a raw array, of size 3*nCanvasWidth*nCanvasHeight + unsigned char* (*paintTile) (LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 6f50d19cd49a..6fd2512bd477 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -59,16 +59,15 @@ public: mpDoc->pClass->setPart(mpDoc, nPart); } - inline void paintTile(void* pHandle, - const int nCanvasWidth, + inline unsigned char* paintTile(const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight) { - mpDoc->pClass->paintTile(mpDoc, pHandle, nCanvasWidth, nCanvasHeight, - nTilePosX, nTilePosY, nTileWidth, nTileHeight); + return mpDoc->pClass->paintTile(mpDoc, nCanvasWidth, nCanvasHeight, + nTilePosX, nTilePosY, nTileWidth, nTileHeight); } #endif // LOK_USE_UNSTABLE_API }; |