Index: chromeos_input_method.h |
diff --git a/chromeos_input_method.h b/chromeos_input_method.h |
index c3c656b49a36f582da1e37494196d098ead3cd3e..4a0953e68d75d954d4552c06f23b312341b97147 100644 |
--- a/chromeos_input_method.h |
+++ b/chromeos_input_method.h |
@@ -7,6 +7,7 @@ |
#include <sstream> |
#include <string> |
+#include <utility> |
#include <vector> |
#include <base/basictypes.h> |
@@ -278,6 +279,20 @@ extern bool (*SetImeConfig)(InputMethodStatusConnection* connection, |
extern std::string (*GetKeyboardOverlayId)( |
const std::string& input_method_id); |
+// Sends handwriting strokes to ibus-daemon. The std::pair contains x and y |
+// coordinates. (0.0, 0.0) represents the top-left corner of a handwriting area, |
+// and (1.0, 1.0) does the bottom-right. For example, the second stroke for ロ |
+// (Katakana character Ro) would be something like [(0,0), (1,0), (1,1)]. |
+// strokes.size() should always be >= 2 (i.e. a single dot is not allowed). |
+typedef std::vector<std::pair<double, double> > HandwritingStrokes; |
+extern void (*SendHandwritingStrokes)( |
+ InputMethodStatusConnection* connection, const HandwritingStrokes& strokes); |
+ |
+// Clears the last N handwriting strokes. Pass zero for clearing all strokes. |
+// TODO(yusukes): Currently ibus-daemon only accepts 0 for |n_strokes|. |
+extern void (*CancelHandwriting)(InputMethodStatusConnection* connection, |
+ int n_strokes); |
+ |
// |
// FUNCTIONS BELOW ARE ONLY FOR UNIT TESTS. DO NOT USE THEM. |
// |