winapi_ui_automation/um/
imm.rs1use ctypes::c_uint;
7use shared::minwindef::{BOOL, DWORD, UINT};
8use shared::windef::{HWND, POINT, RECT};
9pub type LPUINT = *mut c_uint;
10STRUCT!{struct COMPOSITIONFORM {
11 dwStyle: DWORD,
12 ptCurrentPos: POINT,
13 rcArea: RECT,
14}}
15DECLARE_HANDLE!{HIMC, HIMC__}
16pub type LPCOMPOSITIONFORM = *mut COMPOSITIONFORM;
17extern "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}
37pub const CFS_DEFAULT: UINT = 0x0000;
38pub const CFS_RECT: UINT = 0x0001;
39pub const CFS_POINT: UINT = 0x0002;
40pub const CFS_FORCE_POSITION: UINT = 0x0020;
41pub const CFS_CANDIDATEPOS: UINT = 0x0040;
42pub const CFS_EXCLUDE: UINT = 0x0080;