Debian Codegraph @

third_party/rust/winapi/src/um/imm.rs

raw
1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 use ctypes::c_uint;
7 use shared::minwindef::{BOOL, DWORD, UINT};
8 use shared::windef::{HWND, POINT, RECT};
9 pub type LPUINT = *mut c_uint;
10 STRUCT!{struct COMPOSITIONFORM {
11 dwStyle: DWORD,
12 ptCurrentPos: POINT,
13 rcArea: RECT,
14 }}
15 DECLARE_HANDLE!{HIMC, HIMC__}
16 pub type LPCOMPOSITIONFORM = *mut COMPOSITIONFORM;
17 extern "system" {
18 pub fn ImmGetContext(
19 hwnd: HWND,
20 ) -> HIMC;
21 pub fn ImmGetOpenStatus(
22 himc: HIMC,
23 ) -> BOOL;
24 pub fn ImmSetOpenStatus(
25 himc: HIMC,
26 fopen: BOOL,
27 ) -> BOOL;
28 pub fn ImmSetCompositionWindow(
29 himc: HIMC,
30 lpCompForm: LPCOMPOSITIONFORM,
31 ) -> BOOL;
32 pub fn ImmReleaseContext(
33 hwnd: HWND,
34 himc: HIMC,
35 ) -> BOOL;
36 }
37 pub const CFS_DEFAULT: UINT = 0x0000;
38 pub const CFS_RECT: UINT = 0x0001;
39 pub const CFS_POINT: UINT = 0x0002;
40 pub const CFS_FORCE_POSITION: UINT = 0x0020;
41 pub const CFS_CANDIDATEPOS: UINT = 0x0040;
42 pub const CFS_EXCLUDE: UINT = 0x0080;