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" { ImmGetContext( hwnd: HWND, ) -> HIMC18 pub fn ImmGetContext( 19 hwnd: HWND, 20 ) -> HIMC; ImmGetOpenStatus( himc: HIMC, ) -> BOOL21 pub fn ImmGetOpenStatus( 22 himc: HIMC, 23 ) -> BOOL; ImmSetOpenStatus( himc: HIMC, fopen: BOOL, ) -> BOOL24 pub fn ImmSetOpenStatus( 25 himc: HIMC, 26 fopen: BOOL, 27 ) -> BOOL; ImmSetCompositionWindow( himc: HIMC, lpCompForm: LPCOMPOSITIONFORM, ) -> BOOL28 pub fn ImmSetCompositionWindow( 29 himc: HIMC, 30 lpCompForm: LPCOMPOSITIONFORM, 31 ) -> BOOL; ImmReleaseContext( hwnd: HWND, himc: HIMC, ) -> BOOL32 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; 43