summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit/LibreOfficeKit.h
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-05-09 14:37:27 +0100
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-25 13:04:28 +0100
commitd2382e3f3d9a53c6197edc9c64665f718538c92b (patch)
treef9642a8712adaeec6feee6a1c330ef7923286379 /include/LibreOfficeKit/LibreOfficeKit.h
parent9e4f23698af8079edc114d7006ef6a7fc229c1c9 (diff)
Add tiled rendering via liblibreoffice.
We still need to add functions for getting dimensions of documents etc. for this to be truly useful, this is also only usable for writer documents for now. Change-Id: I07812c9b72caca71dfd509705af48c1d355cb2f8
Diffstat (limited to 'include/LibreOfficeKit/LibreOfficeKit.h')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 33b5872c76e2..68b96a090691 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -30,6 +30,17 @@ typedef struct _LibreOfficeKitDocumentClass LibreOfficeKitDocumentClass;
#define LIBREOFFICEKIT_HAS(pKit,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitClass,member,(pKit)->pClass->nSize)
+#ifdef LOK_USE_UNSTABLE_API
+typedef enum
+{
+ WRITER,
+ SPREADSHEET,
+ PRESENTATION,
+ OTHER
+}
+LibreOfficeKitDocumentType;
+#endif // LOK_USE_UNSTABLE_API
+
struct _LibreOfficeKit
{
LibreOfficeKitClass* pClass;
@@ -60,6 +71,37 @@ struct _LibreOfficeKitDocumentClass
const char *pUrl,
const char *pFormat,
const char *pFilterOptions);
+ int (*saveAsWithOptions) (LibreOfficeKitDocument* pThis,
+ const char *pUrl,
+ const char *pFormat,
+ const char *pFilterOptions);
+#ifdef LOK_USE_UNSTABLE_API
+ LibreOfficeKitDocumentType (*getDocumentType) (LibreOfficeKitDocument* pThis);
+
+ // Part refers to either indivual sheets in a Spreadsheet, or slides
+ // in a Slideshow, and has no relevance for wrtier documents.
+ int (*getNumberOfParts) (LibreOfficeKitDocument* pThis);
+
+ 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,
+ const int nCanvasWidth,
+ const int nCanvasHeight,
+ const int nTilePosX,
+ const int nTilePosY,
+ const int nTileWidth,
+ const int nTileHeight);
+#endif // LOK_USE_UNSTABLE_API
};
LibreOfficeKit* lok_init (const char* pInstallPath);