Merge KeyEventExtra into KeyEvent (#4029)
To make the fields easier to use, and to allow constructing KeyEvent in user test code.
This commit is contained in:
parent
6c0e3c3b15
commit
0c89ea7386
19 changed files with 71 additions and 135 deletions
|
|
@ -9,8 +9,6 @@ use std::time::Duration;
|
|||
#[cfg(x11_platform)]
|
||||
use std::{ffi::CStr, mem::MaybeUninit, os::raw::*, sync::Arc, sync::Mutex};
|
||||
|
||||
use smol_str::SmolStr;
|
||||
|
||||
pub(crate) use self::common::xkb::{physicalkey_to_scancode, scancode_to_physicalkey};
|
||||
#[cfg(x11_platform)]
|
||||
use self::x11::{XConnection, XError, XNotSupported};
|
||||
|
|
@ -22,7 +20,6 @@ use crate::dpi::Size;
|
|||
use crate::error::{EventLoopError, NotSupportedError};
|
||||
use crate::event_loop::ActiveEventLoop;
|
||||
pub(crate) use crate::icon::RgbaIcon as PlatformIcon;
|
||||
use crate::keyboard::Key;
|
||||
use crate::monitor::VideoMode;
|
||||
use crate::platform::pump_events::PumpStatus;
|
||||
#[cfg(x11_platform)]
|
||||
|
|
@ -175,12 +172,6 @@ impl MonitorHandle {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
|
||||
pub struct KeyEventExtra {
|
||||
pub text_with_all_modifiers: Option<SmolStr>,
|
||||
pub key_without_modifiers: Key,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
|
||||
pub(crate) enum PlatformCustomCursor {
|
||||
#[cfg(wayland_platform)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue