mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-09 21:01:29 +11:00
Implement ReceivedCharacter on win32
This commit is contained in:
parent
c67ab381bf
commit
754a6ef60f
|
@ -159,6 +159,7 @@ pub static SWP_NOZORDER: UINT = 0x0004;
|
|||
pub static SWP_SHOWWINDOW: UINT = 0x0040;
|
||||
|
||||
// messages
|
||||
pub static WM_CHAR: UINT = 0x0102;
|
||||
pub static WM_COMMAND: UINT = 0x0111;
|
||||
pub static WM_DESTROY: UINT = 0x0002;
|
||||
pub static WM_MOUSEMOVE: UINT = 0x0200;
|
||||
|
|
|
@ -321,6 +321,14 @@ extern "stdcall" fn callback(window: ffi::HWND, msg: ffi::UINT,
|
|||
0
|
||||
},
|
||||
|
||||
ffi::WM_CHAR => {
|
||||
use std::mem;
|
||||
use events::ReceivedCharacter;
|
||||
let chr: char = unsafe { mem::transmute(wparam) };
|
||||
send_event(window, ReceivedCharacter(chr));
|
||||
0
|
||||
},
|
||||
|
||||
ffi::WM_MOUSEMOVE => {
|
||||
use CursorPositionChanged;
|
||||
|
||||
|
|
Loading…
Reference in a new issue