summaryrefslogtreecommitdiffstats
path: root/ui/base/ime/composition_text.h
diff options
context:
space:
mode:
authorsuzhe@google.com <suzhe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 23:19:20 +0000
committersuzhe@google.com <suzhe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 23:19:20 +0000
commita738cb179ea4f49083478316f5274c0a6accffd7 (patch)
tree5e8c879413326095a897ed31b377a490ef781269 /ui/base/ime/composition_text.h
parent511ca0d0a8c2941c64d4fd55c7bccaaef4d884ea (diff)
downloadchromium_src-a738cb179ea4f49083478316f5274c0a6accffd7.zip
chromium_src-a738cb179ea4f49083478316f5274c0a6accffd7.tar.gz
chromium_src-a738cb179ea4f49083478316f5274c0a6accffd7.tar.bz2
Move chrome/browser/ime_input.* to ui/base/win/
Move ExtractCompositionInfo method in chrome/browser/renderer_host/gtk_im_context_wrapper.cc to ui/base/gtk/gtk_im_context_util.cc BUG=75003 TEST=none Review URL: http://codereview.chromium.org/6709023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/ime/composition_text.h')
-rw-r--r--ui/base/ime/composition_text.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/ui/base/ime/composition_text.h b/ui/base/ime/composition_text.h
new file mode 100644
index 0000000..2014e50
--- /dev/null
+++ b/ui/base/ime/composition_text.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_IME_COMPOSITION_TEXT_H_
+#define UI_BASE_IME_COMPOSITION_TEXT_H_
+#pragma once
+
+#include "base/string16.h"
+#include "ui/base/ime/composition_underline.h"
+#include "ui/base/range/range.h"
+
+namespace ui {
+
+// A struct represents the status of an ongoing composition text.
+struct CompositionText {
+ CompositionText();
+ ~CompositionText();
+
+ void Clear();
+
+ // Content of the composition text.
+ string16 text;
+
+ // Underline information of the composition text.
+ // They must be sorted in ascending order by their start_offset and cannot be
+ // overlapped with each other.
+ CompositionUnderlines underlines;
+
+ // Selection range in the composition text. It represents the caret position
+ // if the range length is zero. Usually it's used for representing the target
+ // clause (on Windows). Gtk doesn't have such concept, so background color is
+ // usually used instead.
+ Range selection;
+};
+
+} // namespace ui
+
+#endif // UI_BASE_IME_COMPOSITION_TEXT_H_