ferroui_base/input/raw/
raw_text_input_event_args.rs1use super::raw_input_event_args::raw_input_event_args;
2use super::RawInputEventArgs;
3use crate::input::{IInputDevice, IInputRoot};
4use std::rc::Rc;
5
6pub struct RawTextInputEventArgs {
8 base: RawInputEventArgs,
9 text: String,
10}
11
12raw_input_event_args!(RawTextInputEventArgs: RawInputEventArgs);
13
14impl RawTextInputEventArgs {
15 pub fn new(device: Rc<dyn IInputDevice>, timestamp: u64, root: Rc<dyn IInputRoot>, text: impl Into<String>) -> Self {
18 Self { base: RawInputEventArgs::new(device, timestamp, root), text: text.into() }
19 }
20
21 #[inline]
23 pub fn text(&self) -> &str {
24 &self.text
25 }
26}