OLD | NEW |
(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_SERVICE_H_ |
| 6 #define WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_ |
| 7 |
| 8 #include <Windows.h> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_ptr.h" |
| 13 |
| 14 namespace metro_driver { |
| 15 |
| 16 class TextStoreDelegate; |
| 17 |
| 18 // A high level interface to interact with virtual text store built on top of |
| 19 // Text Services Framewors (TSF). |
| 20 class TextService { |
| 21 public: |
| 22 TextService(HWND window_handle, TextStoreDelegate* text_store_delegate); |
| 23 ~TextService(); |
| 24 |
| 25 // Cancels on-going composition. Does nothing if there is no composition. |
| 26 void CancelComposition(); |
| 27 |
| 28 // Updates document type with |input_scopes|. An empty |input_scopes| |
| 29 // represents IMEs should be disabled until non-empty |input_scopes| is |
| 30 // specified. |
| 31 // Note: |input_scopes| is defined as std::vector<int32> here rather than |
| 32 // std::vector<InputScope> because the wire format of IPC message |
| 33 // MetroViewerHostMsg_ImeTextInputClientUpdated uses std::vector<int32> to |
| 34 // avoid dependency on <InputScope.h> header. |
| 35 void OnDocumentTypeChanged(const std::vector<int32>& input_scopes); |
| 36 |
| 37 // Notifies TSF that the attached window gains keyboard focus. |
| 38 void OnWindowActivated(); |
| 39 |
| 40 private: |
| 41 struct InternalState; |
| 42 scoped_ptr<InternalState> state_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(TextService); |
| 45 }; |
| 46 |
| 47 } // namespace metro_driver |
| 48 |
| 49 #endif // WIN8_METRO_DRIVER_IME_TEXT_SERVICE_H_ |
OLD | NEW |