summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-23 09:32:37 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-23 10:04:54 +0100
commit0cf8aa992cfec36afea1668f3f9297def03ad43e (patch)
tree5a6643a03166d2cb2ffc8d7537d4c8dea6d4d690 /include
parentf71dfdc54085fac835bd0199c4776a0b576c473d (diff)
LOK: add Document::getTileMode()
So that clients can know if they get old-style RGBA or new-style ARGB output in paintTile(). Change-Id: Icfde4b3259444b3524e64478ccd976664a3fe0ed (cherry picked from commit fc06f801ee79fd49d54c27121ae9b2904d99f09c)
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h3
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx10
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h7
3 files changed, 20 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 93f7dca6d455..5189cca5eb5e 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -118,6 +118,9 @@ struct _LibreOfficeKitDocumentClass
const int nTileWidth,
const int nTileHeight);
+ /// @see lok::Document::getTileMode().
+ int (*getTileMode) (LibreOfficeKitDocument* pThis);
+
/// @see lok::Document::getDocumentSize().
void (*getDocumentSize) (LibreOfficeKitDocument* pThis,
long* pWidth,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 0eeb5be424a5..f907f709ee4d 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -140,6 +140,16 @@ public:
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
}
+ /**
+ * Gets the tile mode: the pixel format used for the pBuffer of paintTile().
+ *
+ * @return an element of the LibreOfficeKitTileMode enum.
+ */
+ inline int getTileMode()
+ {
+ return mpDoc->pClass->getTileMode(mpDoc);
+ }
+
/// Get the document sizes in TWIPs.
inline void getDocumentSize(long* pWidth, long* pHeight)
{
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 7b23fcbab1c3..b713f0ed49b7 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -35,6 +35,13 @@ LibreOfficeKitPartMode;
typedef enum
{
+ LOK_TILEMODE_RGBA,
+ LOK_TILEMODE_ARGB
+}
+LibreOfficeKitTileMode;
+
+typedef enum
+{
/**
* Any tiles which are over the rectangle described in the payload are no
* longer valid.