Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9323)

Unified Diff: chromeos_input_method.h

Issue 6880171: Add two libcros interfaces for handwriting: SendHandwritingStrokes and CancelHandwriting. (Closed) Base URL: ssh://gitrw.chromium.org:9222/cros.git@master
Patch Set: review Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
//
« no previous file with comments | « SConstruct.chromiumos ('k') | chromeos_input_method.cc » ('j') | chromeos_input_method.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698