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

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: style fix; changed the function name following zork's suggestion 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
« no previous file with comments | « SConstruct.chromiumos ('k') | chromeos_input_method.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos_input_method.h
diff --git a/chromeos_input_method.h b/chromeos_input_method.h
index c3c656b49a36f582da1e37494196d098ead3cd3e..5e2218bf598d0fd43db3bc289c8951ec4ef0d1c8 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 a handwriting stroke 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)].
+// stroke.size() should always be >= 2 (i.e. a single dot is not allowed).
+typedef std::vector<std::pair<double, double> > HandwritingStroke;
+extern void (*SendHandwritingStroke)(
+ InputMethodStatusConnection* connection, const HandwritingStroke& stroke);
+
+// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698