summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit/LibreOfficeKit.hxx
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-11-29 17:47:10 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-12-04 17:14:00 +0530
commit2f2679a56c0ae5dbcab6a0e6aa523587ecdc84fe (patch)
tree3463803764fd9df80da1c9deaf099969d35c6fa4 /include/LibreOfficeKit/LibreOfficeKit.hxx
parentcc05f8d9d27a8b28421a91cbfb059898d9619974 (diff)
lokdialog: Allow closing a dialog from LOK client
... and rename paintDialog -> paintWindow before it's too late. We not only render dialogs now but also popups. Change-Id: I6b1253c4d9be0c79199b683df4413658a461f850
Diffstat (limited to 'include/LibreOfficeKit/LibreOfficeKit.hxx')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 2b3d26bb0778..3c1d27b48d49 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -156,25 +156,23 @@ public:
}
/**
- * Renders a dialog with give dialog id and writes the width and height of the rendered dialog
+ * Renders a window (dialog, popup, etc.) with give id
*
- * Client must truncate pBuffer according to the nWidth and nHeight returned after the call.
- *
- * @param nDialogId Unique dialog id to be painted
+ * @param nWindowId
* @param pBuffer Buffer with enough memory allocated to render any dialog
* @param x x-coordinate from where the dialog should start painting
* @param y y-coordinate from where the dialog should start painting
* @param width The width of the dialog image to be painted
* @param height The height of the dialog image to be painted
*/
- void paintDialog(unsigned nDialogId,
+ void paintWindow(unsigned nWindowId,
unsigned char* pBuffer,
const int x,
const int y,
const int width,
const int height)
{
- return mpDoc->pClass->paintDialog(mpDoc, nDialogId, pBuffer,
+ return mpDoc->pClass->paintWindow(mpDoc, nWindowId, pBuffer,
x, y, width, height);
}
@@ -198,6 +196,16 @@ public:
}
/**
+ * Posts a command to the window (dialog, popup, etc.) with given id
+ *
+ * @param nWindowid
+ */
+ void postWindow(unsigned nWindowId, int nAction)
+ {
+ return mpDoc->pClass->postWindow(mpDoc, nWindowId, nAction);
+ }
+
+ /**
* Gets the tile mode: the pixel format used for the pBuffer of paintTile().
*
* @return an element of the LibreOfficeKitTileMode enum.