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

Side by Side Diff: win8/metro_driver/ime/text_store_delegate.h

Issue 53553003: WIP: Ash IME support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « win8/metro_driver/ime/text_store.cc ('k') | win8/metro_driver/metro_driver.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WIN8_METRO_DRIVER_IME_TEXT_STORE_DELEGATE_H_
6 #define WIN8_METRO_DRIVER_IME_TEXT_STORE_DELEGATE_H_
7
8 #include <vector>
9
10 #include <windows.h>
11
12 #include "base/basictypes.h"
13 #include "base/strings/string16.h"
14
15 namespace metro_viewer {
16 struct UnderlineInfo;
17 }
18
19 namespace metro_driver {
20
21 // A delegate class which receives text change events occurred in the virtual
22 // text store and returns where the on-going composition is displayed in turn.
23 class TextStoreDelegate {
24 public:
25 virtual ~TextStoreDelegate() {}
26
27 // Called when on-going composition is updated. An empty |text| represents
28 // that the composition is canceled.
29 virtual void OnCompositionChanged(
30 const string16& text,
31 int32 selection_start,
32 int32 selection_end,
33 const std::vector<metro_viewer::UnderlineInfo>& underlines) = 0;
34
35 // Called when |text| is committed.
36 virtual void OnTextCommitted(const string16& text) = 0;
37
38 // Called when an IME requests the caret position. Objects that implement
39 // this method must return the caret position in screen coordinates.
40 virtual RECT GetCaretBounds() = 0;
41
42 // Called when an IME requests the bounding box of an character whose
43 // index is |index| in the on-going composition. position. Objects that
44 // implement this method must return true and fill the character bounds into
45 // |rect| in screen coordinates.
46 // Should return false if |index| is invalid.
47 virtual bool GetCompositionCharacterBounds(uint32 index, RECT* rect) = 0;
48 };
49
50 } // namespace metro_driver
51
52 #endif // WIN8_METRO_DRIVER_IME_TEXT_STORE_DELEGATE_H_
OLDNEW
« no previous file with comments | « win8/metro_driver/ime/text_store.cc ('k') | win8/metro_driver/metro_driver.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698