diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-08-18 15:26:26 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-15 17:07:15 +0100 |
commit | 2d6f16ec5d9eacdac82633de38402c2b5999817c (patch) | |
tree | bdafc69536275b910549c159f997d40f0d71ac9e /include | |
parent | e2c618e5615ed8005310d5eb6d2e9218b76fd6de (diff) |
lokdialog: Add dialog APIs to lok::Document class
Change-Id: I1947dc84c91e2e01072fbff3e97aa94d514ecb5a
Diffstat (limited to 'include')
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.h | 10 | ||||
-rw-r--r-- | include/LibreOfficeKit/LibreOfficeKit.hxx | 35 |
2 files changed, 41 insertions, 4 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 043c42041af4..36d1ed7e7783 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -252,19 +252,21 @@ struct _LibreOfficeKitDocumentClass int* pArray, size_t nSize); - /// WIP + /// Paints dialog with given dialog id to the buffer + /// @see lok::Document::paintDialog(). void (*paintDialog) (LibreOfficeKitDocument* pThis, const char* pDialogId, unsigned char* pBuffer, int* nWidth, int* nHeight); + /// @see lok::Document::paintActiveFloatingWindow(). void (*paintActiveFloatingWindow) (LibreOfficeKitDocument* pThis, const char* pDialogId, unsigned char* pBuffer, int* nWidth, int* nHeight); - /// WIP + /// @see lok::Document::postDialogKeyEvent(). void (*postDialogKeyEvent) (LibreOfficeKitDocument* pThis, const char* pDialogId, int nType, int nCharCode, int nKeyCode); - /// WIP + /// @see lok::Document::postDialogMouseEvent(). void (*postDialogMouseEvent) (LibreOfficeKitDocument* pThis, const char* pDialogId, int nType, @@ -274,7 +276,7 @@ struct _LibreOfficeKitDocumentClass int nButtons, int nModifier); - /// WIP + /// @see lok::Document::postDialogChildMouseEvent(). void (*postDialogChildMouseEvent) (LibreOfficeKitDocument* pThis, const char* pDialogId, int nType, diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index b5daebbb107a..bdda66709beb 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -155,6 +155,25 @@ public: } /** + * Renders a dialog with give dialog id and writes the width and height of the rendered dialog + * + * Client must truncate pBuffer according to the nWidth and nHeight returned after the call. + * + * @param pDialogId Unique dialog id to be painted + * @param pBuffer Buffer with enough memory allocated to render any dialog + * @param nWidth output parameter returning the width of the rendered dialog. + * @param nHeight output parameter returning the height of the rendered dialog + */ + void paintDialog(const char* pDialogId, + unsigned char* pBuffer, + int& nWidth, + int& nHeight) + { + return mpDoc->pClass->paintDialog(mpDoc, pDialogId, pBuffer, + &nWidth, &nHeight); + } + + /** * Gets the tile mode: the pixel format used for the pBuffer of paintTile(). * * @return an element of the LibreOfficeKitTileMode enum. @@ -235,6 +254,22 @@ public: } /** + * Posts a mouse event to the dialog with given id. + * + * @param aDialogId Dialog id where mouse event is to be posted + * @param nType Event type, like down, move or up. + * @param nX horizontal position in document coordinates + * @param nY vertical position in document coordinates + * @param nCount number of clicks: 1 for single click, 2 for double click + * @param nButtons: which mouse buttons: 1 for left, 2 for middle, 4 right + * @param nModifier: which keyboard modifier: (see include/vcl/vclenum.hxx for possible values) + */ + void postDialogMouseEvent(const char* pDialogId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier) + { + mpDoc->pClass->postDialogMouseEvent(mpDoc, pDialogId, nType, nX, nY, nCount, nButtons, nModifier); + } + + /** * Posts an UNO command to the document. * * Example argument string: |