summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-11-24 01:20:56 +0530
committerJan Holesovsky <kendy@collabora.com>2017-11-29 10:16:53 +0100
commitf3f4c039072657739d2bedb7210f2a22b85fdb55 (patch)
tree62c9bb21bee0ac5e497416be7e3b4ba00866aa85 /include/LibreOfficeKit
parent2798e1aae5311094c30d8e667c1e8be4e4314f8d (diff)
lokdialog: Make vcl::DialogID an integer
This will help launching multiple instances of dialog from multiple views. The earlier approach of using the UNO command strings as dialog id would not have been useful for multi-view case. Change-Id: I01cfb3c8b204d5654df2417efdac6b50dc920f0e
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h12
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx36
2 files changed, 24 insertions, 24 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 14824821cfd7..071da712703e 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -268,29 +268,29 @@ struct _LibreOfficeKitDocumentClass
/// Paints dialog with given dialog id to the buffer
/// @see lok::Document::paintDialog().
- void (*paintDialog) (LibreOfficeKitDocument* pThis, const char* pDialogId,
+ void (*paintDialog) (LibreOfficeKitDocument* pThis, unsigned nDialogId,
unsigned char* pBuffer,
const int x, const int y,
const int width, const int height);
/// Get info about dialog with given dialog id
/// @see lok::Document::getDialogInfo().
- void (*getDialogInfo) (LibreOfficeKitDocument* pThis, const char* pDialogId,
+ void (*getDialogInfo) (LibreOfficeKitDocument* pThis, unsigned nDialogId,
char** pDialogTitle, int* pWidth, int* pHeight);
/// @see lok::Document::paintActiveFloatingWindow().
- void (*paintActiveFloatingWindow) (LibreOfficeKitDocument* pThis, const char* pDialogId, unsigned char* pBuffer, int* nWidth, int* nHeight);
+ void (*paintActiveFloatingWindow) (LibreOfficeKitDocument* pThis, unsigned nDialogId, unsigned char* pBuffer, int* nWidth, int* nHeight);
/// @see lok::Document::postDialogKeyEvent().
void (*postDialogKeyEvent) (LibreOfficeKitDocument* pThis,
- const char* pDialogId,
+ unsigned nDialogId,
int nType,
int nCharCode,
int nKeyCode);
/// @see lok::Document::postDialogMouseEvent().
void (*postDialogMouseEvent) (LibreOfficeKitDocument* pThis,
- const char* pDialogId,
+ unsigned nDialogId,
int nType,
int nX,
int nY,
@@ -300,7 +300,7 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document::postDialogChildMouseEvent().
void (*postDialogChildMouseEvent) (LibreOfficeKitDocument* pThis,
- const char* pDialogId,
+ unsigned nDialogId,
int nType,
int nX,
int nY,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 19e121fe6573..c99b425daff6 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -160,38 +160,38 @@ public:
*
* Client must truncate pBuffer according to the nWidth and nHeight returned after the call.
*
- * @param pDialogId Unique dialog id to be painted
+ * @param nDialogId Unique dialog id to be painted
* @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(const char* pDialogId,
+ void paintDialog(unsigned nDialogId,
unsigned char* pBuffer,
const int x,
const int y,
const int width,
const int height)
{
- return mpDoc->pClass->paintDialog(mpDoc, pDialogId, pBuffer,
+ return mpDoc->pClass->paintDialog(mpDoc, nDialogId, pBuffer,
x, y, width, height);
}
/* Get info about dialog with given dialog id
*
- * @param pDialogId Unique dialog id for which to get info about
+ * @param nDialogId Unique dialog id for which to get info about
* @param pDialogTitle Pointer to pointer pointing to string containing the
* dialog title. Caller should the pointer to allocated string themselves.
* @param pWidth The width of the dialog
* @param pHeight The height of the dialog
*/
- void getDialogInfo(const char* pDialogId,
+ void getDialogInfo(unsigned nDialogId,
char** pDialogTitle,
int& pWidth,
int& pHeight)
{
- return mpDoc->pClass->getDialogInfo(mpDoc, pDialogId, pDialogTitle, &pWidth, &pHeight);
+ return mpDoc->pClass->getDialogInfo(mpDoc, nDialogId, pDialogTitle, &pWidth, &pHeight);
}
@@ -200,17 +200,17 @@ public:
*
* Client must truncate pBuffer according to the nWidth and nHeight returned after the call.
*
- * @param pDialogId Unique dialog 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
*/
- void paintActiveFloatingWindow(const char* pDialogId,
+ void paintActiveFloatingWindow(unsigned nDialogId,
unsigned char* pBuffer,
int& nWidth,
int& nHeight)
{
- return mpDoc->pClass->paintActiveFloatingWindow(mpDoc, pDialogId, pBuffer,
+ return mpDoc->pClass->paintActiveFloatingWindow(mpDoc, nDialogId, pBuffer,
&nWidth, &nHeight);
}
@@ -282,14 +282,14 @@ public:
/**
* Posts a keyboard event to the dialog
*
- * @param pDialogId Dialog id on which key event should be posted
+ * @param nDialogId Dialog id on which key event should be posted
* @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(const char* pDialogId, int nType, int nCharCode, int nKeyCode)
+ void postDialogKeyEvent(unsigned nDialogId, int nType, int nCharCode, int nKeyCode)
{
- mpDoc->pClass->postDialogKeyEvent(mpDoc, pDialogId, nType, nCharCode, nKeyCode);
+ mpDoc->pClass->postDialogKeyEvent(mpDoc, nDialogId, nType, nCharCode, nKeyCode);
}
/**
@@ -310,7 +310,7 @@ public:
/**
* Posts a mouse event to the dialog with given id.
*
- * @param pDialogId Dialog id where mouse event is to be posted
+ * @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
@@ -318,15 +318,15 @@ 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 postDialogMouseEvent(const char* pDialogId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
+ void postDialogMouseEvent(unsigned nDialogId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
{
- mpDoc->pClass->postDialogMouseEvent(mpDoc, pDialogId, nType, nX, nY, nCount, nButtons, 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.
*
- * @param aDialogId Dialog id
+ * @param nDialogId Dialog id
* @param nType Event type, like down, move or up.
* @param nX horizontal position in document coordinates
* @param nY vertical position in document coordinates
@@ -334,9 +334,9 @@ 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(const char* pDialogId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
+ void postDialogChildMouseEvent(unsigned nDialogId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
{
- mpDoc->pClass->postDialogChildMouseEvent(mpDoc, pDialogId, nType, nX, nY, nCount, nButtons, nModifier);
+ mpDoc->pClass->postDialogChildMouseEvent(mpDoc, nDialogId, nType, nX, nY, nCount, nButtons, nModifier);
}