Update to windows-sys 0.59 (#4098)
This commit is contained in:
parent
3a39a6ddb0
commit
23011c6b0a
17 changed files with 166 additions and 137 deletions
|
|
@ -3,12 +3,11 @@ use std::os::windows::prelude::OsStringExt;
|
|||
use std::ptr::null_mut;
|
||||
|
||||
use windows_sys::Win32::Foundation::{POINT, RECT};
|
||||
use windows_sys::Win32::Globalization::HIMC;
|
||||
use windows_sys::Win32::UI::Input::Ime::{
|
||||
ImmAssociateContextEx, ImmGetCompositionStringW, ImmGetContext, ImmReleaseContext,
|
||||
ImmSetCandidateWindow, ImmSetCompositionWindow, ATTR_TARGET_CONVERTED,
|
||||
ATTR_TARGET_NOTCONVERTED, CANDIDATEFORM, CFS_EXCLUDE, CFS_POINT, COMPOSITIONFORM, GCS_COMPATTR,
|
||||
GCS_COMPSTR, GCS_CURSORPOS, GCS_RESULTSTR, IACE_CHILDREN, IACE_DEFAULT,
|
||||
GCS_COMPSTR, GCS_CURSORPOS, GCS_RESULTSTR, HIMC, IACE_CHILDREN, IACE_DEFAULT,
|
||||
};
|
||||
use windows_sys::Win32::UI::WindowsAndMessaging::{GetSystemMetrics, SM_IMMENABLED};
|
||||
|
||||
|
|
@ -138,9 +137,9 @@ impl ImeContext {
|
|||
}
|
||||
|
||||
if allowed {
|
||||
unsafe { ImmAssociateContextEx(hwnd, 0, IACE_DEFAULT) };
|
||||
unsafe { ImmAssociateContextEx(hwnd, null_mut(), IACE_DEFAULT) };
|
||||
} else {
|
||||
unsafe { ImmAssociateContextEx(hwnd, 0, IACE_CHILDREN) };
|
||||
unsafe { ImmAssociateContextEx(hwnd, null_mut(), IACE_CHILDREN) };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue