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

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

Issue 16901011: Support CancelCompositionText/ComfirmCompositionText in TSF (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 6 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
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_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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // unless |client| is focused. 51 // unless |client| is focused.
52 virtual void OnTextInputTypeChanged(const TextInputClient* client) = 0; 52 virtual void OnTextInputTypeChanged(const TextInputClient* client) = 0;
53 53
54 // Sends an event to TSF manager that the text layout should be updated. 54 // Sends an event to TSF manager that the text layout should be updated.
55 virtual void OnTextLayoutChanged() = 0; 55 virtual void OnTextLayoutChanged() = 0;
56 56
57 // Cancels the ongoing composition if exists. 57 // Cancels the ongoing composition if exists.
58 // Returns false if an error occures. 58 // Returns false if an error occures.
59 virtual bool CancelComposition() = 0; 59 virtual bool CancelComposition() = 0;
60 60
61 // Confirms the ongoing composition if exists.
62 // Returns false if an error occures.
63 virtual bool ConfirmComposition() = 0;
64
61 // Sets currently focused TextInputClient. 65 // Sets currently focused TextInputClient.
62 // Caller must free |client|. 66 // Caller must free |client|.
63 virtual void SetFocusedClient(HWND focused_window, 67 virtual void SetFocusedClient(HWND focused_window,
64 TextInputClient* client) = 0; 68 TextInputClient* client) = 0;
65 69
66 // Removes currently focused TextInputClient. 70 // Removes currently focused TextInputClient.
67 // Caller must free |client|. 71 // Caller must free |client|.
68 virtual void RemoveFocusedClient(TextInputClient* client) = 0; 72 virtual void RemoveFocusedClient(TextInputClient* client) = 0;
69 73
70 // Obtains current thread manager. 74 // Obtains current thread manager.
71 virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() = 0; 75 virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() = 0;
72 76
73 // Returns the focused text input client. 77 // Returns the focused text input client.
74 virtual TextInputClient* GetFocusedTextInputClient() const = 0; 78 virtual TextInputClient* GetFocusedTextInputClient() const = 0;
75 79
76 protected: 80 protected:
77 // Uses GetInstance() instead. 81 // Uses GetInstance() instead.
78 TSFBridge(); 82 TSFBridge();
79 83
80 private: 84 private:
81 // Releases TLS instance. 85 // Releases TLS instance.
82 static void Finalize(void* data); 86 static void Finalize(void* data);
83 87
84 DISALLOW_COPY_AND_ASSIGN(TSFBridge); 88 DISALLOW_COPY_AND_ASSIGN(TSFBridge);
85 }; 89 };
86 90
87 } // namespace ui 91 } // namespace ui
88 92
89 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_ 93 #endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698