summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-27 15:38:30 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-02 08:51:01 +0100
commit6650fe947d41bc43cb05b572acb50180799d5b91 (patch)
tree13e0efb096f8aa410a4db57cdd162960b42c92e8 /include/LibreOfficeKit
parent645bebd9f6090b1c617bd95ea990a7dac4afaabc (diff)
LOK: move Office::postKeyEvent to Document
The implementation still sends them to the currently active VCL frame, not to the given document, though. Change-Id: I6fa2decdea3f949c55287e802cb3373c85664207
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h8
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx26
2 files changed, 17 insertions, 17 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index f8a62b243959..ea9846a585b7 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -49,9 +49,6 @@ struct _LibreOfficeKitClass
LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis,
const char* pURL,
const char* pOptions);
-#ifdef LOK_USE_UNSTABLE_API
- void (*postKeyEvent) (LibreOfficeKit* pThis, int nType, int nCharCode, int nKeyCode);
-#endif // LOK_USE_UNSTABLE_API
};
#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize)
@@ -125,6 +122,11 @@ struct _LibreOfficeKitDocumentClass
LibreOfficeKitCallback pCallback,
void* pData);
+ /// @see lok::Document::postKeyEvent
+ void (*postKeyEvent)(LibreOfficeKitDocument* pThis,
+ int nType,
+ int nCharCode,
+ int nKeyCode);
/// @see lok::Document::postMouseEvent
void (*postMouseEvent)(LibreOfficeKitDocument* pThis,
int nType,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index f8d6e195c82a..a44238236699 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -106,6 +106,18 @@ public:
}
/**
+ * Posts a keyboard event to the focused frame.
+ *
+ * @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)
+ */
+ inline void postKeyEvent(int nType, int nCharCode, int nKeyCode)
+ {
+ mpDoc->pClass->postKeyEvent(mpDoc, nType, nCharCode, nKeyCode);
+ }
+
+ /**
* Posts a mouse event to the document.
*
* @param nType Event type, like down, move or up.
@@ -167,20 +179,6 @@ public:
{
return mpThis->pClass->getError(mpThis);
}
-
-#ifdef LOK_USE_UNSTABLE_API
- /**
- * Posts a keyboard event to the focused frame.
- *
- * @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)
- */
- inline void postKeyEvent(int nType, int nCharCode, int nKeyCode)
- {
- mpThis->pClass->postKeyEvent(mpThis, nType, nCharCode, nKeyCode);
- }
-#endif // LOK_USE_UNSTABLE_API
};
inline Office* lok_cpp_init(const char* pInstallPath)