From 0434043aed646ef853eb60dcb01909745caec87e Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Fri, 16 May 2014 09:07:52 +0100 Subject: 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 --- include/LibreOfficeKit/LibreOfficeKit.h | 12 ++---------- include/LibreOfficeKit/LibreOfficeKit.hxx | 7 +++---- 2 files changed, 5 insertions(+), 14 deletions(-) (limited to 'include/LibreOfficeKit') 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 }; -- cgit