summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2018-02-07 17:19:58 +0530
committerpranavk <pranavk@collabora.co.uk>2018-02-08 08:40:25 +0100
commit7f9f58f3a304733f7089719a5a65eef8c68c2b8d (patch)
tree3ee9c3b4548304306a7dbd9ed0ab33249d88cc64 /include/LibreOfficeKit
parent274825b4180c81540cd0d1b22c5243f1b39fe4db (diff)
sw lok: IME support + unit test
Change-Id: I557493db23dfa3529606050c86161628dbd722e7 Reviewed-on: https://gerrit.libreoffice.org/49354 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'include/LibreOfficeKit')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h5
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx11
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h11
3 files changed, 27 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index d42bd3434689..ebc112fb7bd5 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -300,6 +300,11 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document::setViewLanguage().
void (*setViewLanguage) (LibreOfficeKitDocument* pThis, int nId, const char* language);
+ /// @see lok::Document::postExtTextInputEvent
+ void (*postExtTextInputEvent) (LibreOfficeKitDocument* pThis,
+ int nType,
+ const char* pText);
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 310b9cfcee88..0983560898a4 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -537,6 +537,17 @@ public:
mpDoc->pClass->setViewLanguage(mpDoc, nId, language);
}
+ /**
+ * Post the text input from external input window, like IME
+ *
+ * @param nType see LibreOfficeKitExtTextInputType
+ * @param pText Text for LOK_EXT_TEXTINPUT
+ */
+ void postExtTextInputEvent(int nType, const char* pText)
+ {
+ mpDoc->pClass->postExtTextInputEvent(mpDoc, nType, pText);
+ }
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index b1349b45a1c1..b90aa6279c41 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -582,6 +582,17 @@ LibreOfficeKitKeyEventType;
typedef enum
{
+ /// cf. SalEvent::ExtTextInput
+ LOK_EXT_TEXTINPUT,
+ /// cf. SalEvent::ExtTextInputPos
+ LOK_EXT_TEXTINPUT_POS,
+ /// cf. SalEvent::EndExtTextInput
+ LOK_EXT_TEXTINPUT_END
+}
+LibreOfficeKitExtTextInputType;
+
+typedef enum
+{
/// A pressed gesture has started.
LOK_MOUSEEVENT_MOUSEBUTTONDOWN,
/// A pressed gesture has finished.