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 #ifndef UI_BASE_IME_WIN_TSF_BRIDGE_H_ | 5 #ifndef UI_BASE_IME_WIN_TSF_BRIDGE_H_ |
6 #define UI_BASE_IME_WIN_TSF_BRIDGE_H_ | 6 #define UI_BASE_IME_WIN_TSF_BRIDGE_H_ |
7 | 7 |
8 #include <Windows.h> | 8 #include <Windows.h> |
9 #include <msctf.h> | 9 #include <msctf.h> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 static TSFBridge* ReplaceForTesting(TSFBridge* bridge); | 44 static TSFBridge* ReplaceForTesting(TSFBridge* bridge); |
45 | 45 |
46 // Destroys the thread local instance. | 46 // Destroys the thread local instance. |
47 virtual void Shutdown() = 0; | 47 virtual void Shutdown() = 0; |
48 | 48 |
49 // Handles TextInputTypeChanged event. RWHVW is responsible for calling this | 49 // Handles TextInputTypeChanged event. RWHVW is responsible for calling this |
50 // handler whenever renderer's input text type is changed. Does nothing | 50 // handler whenever renderer's input text type is changed. Does nothing |
51 // unless |client| is focused. | 51 // unless |client| is focused. |
52 virtual void OnTextInputTypeChanged(TextInputClient* client) = 0; | 52 virtual void OnTextInputTypeChanged(TextInputClient* client) = 0; |
53 | 53 |
| 54 // Sends an event to TSF manager that the text layout should be updated. |
| 55 virtual void OnTextLayoutChanged() = 0; |
| 56 |
54 // Cancels the ongoing composition if exists. | 57 // Cancels the ongoing composition if exists. |
55 // Returns false if an error occures. | 58 // Returns false if an error occurs. |
56 virtual bool CancelComposition() = 0; | 59 virtual bool CancelComposition() = 0; |
57 | 60 |
58 // Sets currently focused TextInputClient. | 61 // Sets currently focused TextInputClient. |
59 // Caller must free |client|. | 62 // Caller must free |client|. |
60 virtual void SetFocusedClient(HWND focused_window, | 63 virtual void SetFocusedClient(HWND focused_window, |
61 TextInputClient* client) = 0; | 64 TextInputClient* client) = 0; |
62 | 65 |
63 // Removes currently focused TextInputClient. | 66 // Removes currently focused TextInputClient. |
64 // Caller must free |client|. | 67 // Caller must free |client|. |
65 virtual void RemoveFocusedClient(TextInputClient* client) = 0; | 68 virtual void RemoveFocusedClient(TextInputClient* client) = 0; |
(...skipping 11 matching lines...) Expand all Loading... |
77 private: | 80 private: |
78 // Releases TLS instance. | 81 // Releases TLS instance. |
79 static void Finalize(void* data); | 82 static void Finalize(void* data); |
80 | 83 |
81 DISALLOW_COPY_AND_ASSIGN(TSFBridge); | 84 DISALLOW_COPY_AND_ASSIGN(TSFBridge); |
82 }; | 85 }; |
83 | 86 |
84 } // namespace ui | 87 } // namespace ui |
85 | 88 |
86 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ | 89 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ |
OLD | NEW |