OLD | NEW |
---|---|
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 #include "ui/base/win/tsf_text_store.h" | 5 #include "ui/base/win/tsf_text_store.h" |
6 | 6 |
7 #include <OleCtl.h> | 7 #include <OleCtl.h> |
8 | 8 |
9 #include "base/win/scoped_variant.h" | 9 #include "base/win/scoped_variant.h" |
10 #include "ui/base/ime/text_input_client.h" | 10 #include "ui/base/ime/text_input_client.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 *fetched_count = 1; | 182 *fetched_count = 1; |
183 } | 183 } |
184 return S_OK; | 184 return S_OK; |
185 } | 185 } |
186 | 186 |
187 STDMETHODIMP TsfTextStore::GetStatus(TS_STATUS* status) { | 187 STDMETHODIMP TsfTextStore::GetStatus(TS_STATUS* status) { |
188 if (!status) | 188 if (!status) |
189 return E_INVALIDARG; | 189 return E_INVALIDARG; |
190 | 190 |
191 status->dwDynamicFlags = 0; | 191 status->dwDynamicFlags = 0; |
192 // We don't support hidden text. | 192 // We use transitory contexts and we don't support hidden text. |
Seigo Nonaka
2012/09/18 05:50:32
Please write why we need to set this flags.
horo
2012/09/18 05:56:31
Done.
| |
193 status->dwStaticFlags = TS_SS_NOHIDDENTEXT; | 193 status->dwStaticFlags = TS_SS_TRANSITORY | TS_SS_NOHIDDENTEXT; |
194 | 194 |
195 return S_OK; | 195 return S_OK; |
196 } | 196 } |
197 | 197 |
198 STDMETHODIMP TsfTextStore::GetText(LONG acp_start, | 198 STDMETHODIMP TsfTextStore::GetText(LONG acp_start, |
199 LONG acp_end, | 199 LONG acp_end, |
200 wchar_t* text_buffer, | 200 wchar_t* text_buffer, |
201 ULONG text_buffer_size, | 201 ULONG text_buffer_size, |
202 ULONG* text_buffer_copied, | 202 ULONG* text_buffer_copied, |
203 TS_RUNINFO* run_info_buffer, | 203 TS_RUNINFO* run_info_buffer, |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
796 | 796 |
797 bool TsfTextStore::HasReadLock() const { | 797 bool TsfTextStore::HasReadLock() const { |
798 return (current_lock_type_ & TS_LF_READ) == TS_LF_READ; | 798 return (current_lock_type_ & TS_LF_READ) == TS_LF_READ; |
799 } | 799 } |
800 | 800 |
801 bool TsfTextStore::HasReadWriteLock() const { | 801 bool TsfTextStore::HasReadWriteLock() const { |
802 return (current_lock_type_ & TS_LF_READWRITE) == TS_LF_READWRITE; | 802 return (current_lock_type_ & TS_LF_READWRITE) == TS_LF_READWRITE; |
803 } | 803 } |
804 | 804 |
805 } // namespace ui | 805 } // namespace ui |
OLD | NEW |