bundled/include/LibreOfficeKit/LibreOfficeKit.h | 33 +++------- bundled/include/LibreOfficeKit/LibreOfficeKit.hxx | 60 +++++-------------- bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h | 27 ++------ 3 files changed, 35 insertions(+), 85 deletions(-)
New commits: commit a94966d8184b285286c93fa2f9950d6c6994ec24 Author: Jan Holesovsky <[email protected]> Date: Tue Dec 5 15:59:05 2017 +0100 Update the bundled headers. Change-Id: Ic68e33efc369edff40c7503670dfa91b885cec9a Reviewed-on: https://gerrit.libreoffice.org/45883 Reviewed-by: Marco Cecchetti <[email protected]> Tested-by: Marco Cecchetti <[email protected]> diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h index af3355f9..69b20106 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h @@ -213,6 +213,7 @@ struct _LibreOfficeKitDocumentClass int nTilePixelHeight, int nTileTwipWidth, int nTileTwipHeight); + /// @see lok::Document::setVisibleArea). void (*setClientVisibleArea) (LibreOfficeKitDocument* pThis, int nX, int nY, int nWidth, int nHeight); @@ -258,26 +259,26 @@ struct _LibreOfficeKitDocumentClass int* pArray, size_t nSize); - /// Paints dialog with given dialog id to the buffer - /// @see lok::Document::paintDialog(). - void (*paintDialog) (LibreOfficeKitDocument* pThis, unsigned nDialogId, + /// Paints window with given id to the buffer + /// @see lok::Document::paintWindow(). + void (*paintWindow) (LibreOfficeKitDocument* pThis, unsigned nWindowId, unsigned char* pBuffer, const int x, const int y, const int width, const int height); - /// @see lok::Document::paintActiveFloatingWindow(). - void (*paintActiveFloatingWindow) (LibreOfficeKitDocument* pThis, unsigned nDialogId, unsigned char* pBuffer, int* nWidth, int* nHeight); + /// @see lok::Document::postWindow(). + void (*postWindow) (LibreOfficeKitDocument* pThis, unsigned nWindowId, int nAction); - /// @see lok::Document::postDialogKeyEvent(). - void (*postDialogKeyEvent) (LibreOfficeKitDocument* pThis, - unsigned nDialogId, + /// @see lok::Document::postWindowKeyEvent(). + void (*postWindowKeyEvent) (LibreOfficeKitDocument* pThis, + unsigned nWindowId, int nType, int nCharCode, int nKeyCode); - /// @see lok::Document::postDialogMouseEvent(). - void (*postDialogMouseEvent) (LibreOfficeKitDocument* pThis, - unsigned nDialogId, + /// @see lok::Document::postWindowMouseEvent(). + void (*postWindowMouseEvent) (LibreOfficeKitDocument* pThis, + unsigned nWindowId, int nType, int nX, int nY, @@ -285,16 +286,6 @@ struct _LibreOfficeKitDocumentClass int nButtons, int nModifier); - /// @see lok::Document::postDialogChildMouseEvent(). - void (*postDialogChildMouseEvent) (LibreOfficeKitDocument* pThis, - unsigned nDialogId, - int nType, - int nX, - int nY, - int nCount, - int nButtons, - int nModifier); - #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx index 93c7e574..7bdd2c47 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -155,45 +155,34 @@ 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); } /** - * Renders the active floating window of a dialog - * - * Client must truncate pBuffer according to the nWidth and nHeight returned after the call. + * Posts a command to the window (dialog, popup, etc.) with given id * - * @param nDialogId Unique dialog id - * @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 + * @param nWindowid */ - void paintActiveFloatingWindow(unsigned nDialogId, - unsigned char* pBuffer, - int& nWidth, - int& nHeight) + void postWindow(unsigned nWindowId, int nAction) { - return mpDoc->pClass->paintActiveFloatingWindow(mpDoc, nDialogId, pBuffer, - &nWidth, &nHeight); + return mpDoc->pClass->postWindow(mpDoc, nWindowId, nAction); } /** @@ -264,14 +253,14 @@ public: /** * Posts a keyboard event to the dialog * - * @param nDialogId Dialog id on which key event should be posted + * @param nWindowId * @param nType Event type, like press or release. * @param nCharCode contains the Unicode character generated by this event or 0 * @param nKeyCode contains the integer code representing the key of the event (non-zero for control keys) */ - void postDialogKeyEvent(unsigned nDialogId, int nType, int nCharCode, int nKeyCode) + void postWindowKeyEvent(unsigned nWindowId, int nType, int nCharCode, int nKeyCode) { - mpDoc->pClass->postDialogKeyEvent(mpDoc, nDialogId, nType, nCharCode, nKeyCode); + mpDoc->pClass->postWindowKeyEvent(mpDoc, nWindowId, nType, nCharCode, nKeyCode); } /** @@ -290,25 +279,9 @@ public: } /** - * Posts a mouse event to the dialog with given id. - * - * @param nDialogId 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(unsigned nDialogId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier) - { - mpDoc->pClass->postDialogMouseEvent(mpDoc, nDialogId, nType, nX, nY, nCount, nButtons, nModifier); - } - - /** - * Posts a mouse event to the child of a dialog with given id. + * Posts a mouse event to the window with given id. * - * @param nDialogId Dialog id + * @param nWindowId * @param nType Event type, like down, move or up. * @param nX horizontal position in document coordinates * @param nY vertical position in document coordinates @@ -316,12 +289,11 @@ public: * @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 postDialogChildMouseEvent(unsigned nDialogId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier) + void postWindowMouseEvent(unsigned nWindowId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier) { - mpDoc->pClass->postDialogChildMouseEvent(mpDoc, nDialogId, nType, nX, nY, nCount, nButtons, nModifier); + mpDoc->pClass->postWindowMouseEvent(mpDoc, nWindowId, nType, nX, nY, nCount, nButtons, nModifier); } - /** * Posts an UNO command to the document. * @@ -447,7 +419,7 @@ public: } /** - * Show/Hide a single row/column header outline for Calc dosuments. + * Show/Hide a single row/column header outline for Calc documents. * * @param bColumn - if we are dealing with a column or row group * @param nLevel - the level to which the group belongs diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h index 62b9faf7..cf85d7c6 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -40,6 +40,12 @@ typedef enum } LibreOfficeKitTileMode; +typedef enum +{ + LOK_WINDOW_CLOSE +} +LibreOfficeKitWindowAction; + /** Optional features of LibreOfficeKit, in particular callbacks that block * LibreOfficeKit until the corresponding reply is received, which would * deadlock if the client does not support the feature. @@ -525,26 +531,7 @@ typedef enum /** * Dialog invalidation */ - LOK_CALLBACK_DIALOG = 36, - - /** - * Invalidation corresponding to dialog's children. - * Eg: Floating window etc. - * - * Payload example: - * { - * "dialogID": "SpellDialog", - * "action": "close" - * } - * - * - dialogID is the UNO command of the dialog - * - action can be - * - close, means dialog child window is closed now - * - invalidate, means dialog child window is invalidated - * It also means that dialog child window is created if it's the first - * invalidate - */ - LOK_CALLBACK_DIALOG_CHILD = 37 + LOK_CALLBACK_WINDOW = 36, } LibreOfficeKitCallbackType; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
