Add ICU message format support
[chromium-blink-merge.git] / ui / base / ime / win / tsf_input_scope.h
blobd5caac390ebcd856376eec63c10f9629b7a20331
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
3 // found in the LICENSE file.
5 #ifndef UI_BASE_IME_WIN_TSF_INPUT_SCOPE_H_
6 #define UI_BASE_IME_WIN_TSF_INPUT_SCOPE_H_
8 #include <InputScope.h>
9 #include <Windows.h>
10 #include <vector>
12 #include "base/basictypes.h"
13 #include "ui/base/ime/text_input_mode.h"
14 #include "ui/base/ime/text_input_type.h"
15 #include "ui/base/ime/ui_base_ime_export.h"
17 namespace ui {
18 namespace tsf_inputscope {
20 // Initializes the TSF for input scopes. It loads the tsf dll and get the
21 // function pointer for setting the input scopes in TSF.
22 UI_BASE_IME_EXPORT void InitializeTsfForInputScopes();
24 // Returns InputScope list corresoponding to ui::TextInputType and
25 // ui::TextInputMode.
26 // This function is only used from following functions but declared for test.
27 UI_BASE_IME_EXPORT std::vector<InputScope> GetInputScopes(
28 TextInputType text_input_type,
29 TextInputMode text_input_mode);
31 // Returns an instance of ITfInputScope, which is the Windows-specific
32 // category representation corresponding to ui::TextInputType and
33 // ui::TextInputMode that we are using to specify the expected text type
34 // in the target field.
35 // The returned instance has 0 reference count. The caller must maintain its
36 // reference count.
37 UI_BASE_IME_EXPORT ITfInputScope* CreateInputScope(
38 TextInputType text_input_type,
39 TextInputMode text_input_mode);
41 // A wrapper of the SetInputScopes API exported by msctf.dll.
42 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms629026.aspx
43 // Does nothing on Windows XP in case TSF is disabled.
44 // NOTE: For TSF-aware window, you should use ITfInputScope instead.
45 UI_BASE_IME_EXPORT void SetInputScopeForTsfUnawareWindow(
46 HWND window_handle,
47 TextInputType text_input_type,
48 TextInputMode text_input_mode);
50 } // namespace tsf_inputscope
51 } // namespace ui
53 #endif // UI_BASE_IME_WIN_TSF_INPUT_SCOPE_H_