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

Side by Side Diff: ui/base/ime/win/tsf_text_store.h

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/ime/win/tsf_event_router.cc ('k') | ui/base/ime/win/tsf_text_store_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_IME_WIN_TSF_TEXT_STORE_H_ 5 #ifndef UI_BASE_IME_WIN_TSF_TEXT_STORE_H_
6 #define UI_BASE_IME_WIN_TSF_TEXT_STORE_H_ 6 #define UI_BASE_IME_WIN_TSF_TEXT_STORE_H_
7 7
8 #include <msctf.h> 8 #include <msctf.h>
9 #include <deque> 9 #include <deque>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "base/win/scoped_comptr.h" 14 #include "base/win/scoped_comptr.h"
15 #include "ui/base/ime/composition_underline.h" 15 #include "ui/base/ime/composition_underline.h"
16 #include "ui/base/range/range.h"
17 #include "ui/base/ui_export.h" 16 #include "ui/base/ui_export.h"
17 #include "ui/gfx/range/range.h"
18 18
19 namespace ui { 19 namespace ui {
20 class TextInputClient; 20 class TextInputClient;
21 21
22 // TSFTextStore is used to interact with the input method via TSF manager. 22 // TSFTextStore is used to interact with the input method via TSF manager.
23 // TSFTextStore have a string buffer which is manipulated by TSF manager through 23 // TSFTextStore have a string buffer which is manipulated by TSF manager through
24 // ITextStoreACP interface methods such as SetText(). 24 // ITextStoreACP interface methods such as SetText().
25 // When the input method updates the composition, TSFTextStore calls 25 // When the input method updates the composition, TSFTextStore calls
26 // TextInputClient::SetCompositionText(). And when the input method finishes the 26 // TextInputClient::SetCompositionText(). And when the input method finishes the
27 // composition, TSFTextStore calls TextInputClient::InsertText() and clears the 27 // composition, TSFTextStore calls TextInputClient::InsertText() and clears the
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // |string_buffer_|: "aoiumi" 251 // |string_buffer_|: "aoiumi"
252 // |committed_size_|: 3 252 // |committed_size_|: 3
253 string16 string_buffer_; 253 string16 string_buffer_;
254 size_t committed_size_; 254 size_t committed_size_;
255 255
256 // |selection_start_| and |selection_end_| indicates the selection range. 256 // |selection_start_| and |selection_end_| indicates the selection range.
257 // Example: "iue" is selected 257 // Example: "iue" is selected
258 // |string_buffer_|: "aiueo" 258 // |string_buffer_|: "aiueo"
259 // |selection_.start()|: 1 259 // |selection_.start()|: 1
260 // |selection_.end()|: 4 260 // |selection_.end()|: 4
261 Range selection_; 261 gfx::Range selection_;
262 262
263 // |start_offset| and |end_offset| of |composition_undelines_| indicates 263 // |start_offset| and |end_offset| of |composition_undelines_| indicates
264 // the offsets in |string_buffer_|. 264 // the offsets in |string_buffer_|.
265 // Example: "aoi" is committed. There are two underlines in "umi" and "no". 265 // Example: "aoi" is committed. There are two underlines in "umi" and "no".
266 // |string_buffer_|: "aoiumino" 266 // |string_buffer_|: "aoiumino"
267 // |committed_size_|: 3 267 // |committed_size_|: 3
268 // composition_undelines_.underlines[0].start_offset: 3 268 // composition_undelines_.underlines[0].start_offset: 3
269 // composition_undelines_.underlines[0].end_offset: 6 269 // composition_undelines_.underlines[0].end_offset: 6
270 // composition_undelines_.underlines[1].start_offset: 6 270 // composition_undelines_.underlines[1].start_offset: 6
271 // composition_undelines_.underlines[1].end_offset: 8 271 // composition_undelines_.underlines[1].end_offset: 8
(...skipping 16 matching lines...) Expand all
288 // attributes of the composition string. 288 // attributes of the composition string.
289 base::win::ScopedComPtr<ITfCategoryMgr> category_manager_; 289 base::win::ScopedComPtr<ITfCategoryMgr> category_manager_;
290 base::win::ScopedComPtr<ITfDisplayAttributeMgr> display_attribute_manager_; 290 base::win::ScopedComPtr<ITfDisplayAttributeMgr> display_attribute_manager_;
291 291
292 DISALLOW_COPY_AND_ASSIGN(TSFTextStore); 292 DISALLOW_COPY_AND_ASSIGN(TSFTextStore);
293 }; 293 };
294 294
295 } // namespace ui 295 } // namespace ui
296 296
297 #endif // UI_BASE_IME_WIN_TSF_TEXT_STORE_H_ 297 #endif // UI_BASE_IME_WIN_TSF_TEXT_STORE_H_
OLDNEW
« no previous file with comments | « ui/base/ime/win/tsf_event_router.cc ('k') | ui/base/ime/win/tsf_text_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698