#[repr(C)]pub struct InputInterpreterCallback {
pub cb: InputInterpreterCallbackType,
pub ctx: OptionRefAny,
}Expand description
Configurable input interpreter callback.
Maps raw platform events + window state → semantic SystemChange actions.
The default (default_input_interpreter) handles standard desktop keybindings.
Replace this on LayoutWindow to implement vim, game controls, etc.
§Pattern
- Rust:
InputInterpreterCallback::from(my_fn_ptr)—ctxis None - Python/C: Set
cbto a trampoline,ctxtoRefAnywrapping the foreign callable
Fields§
§cb: InputInterpreterCallbackType§ctx: OptionRefAnyTrait Implementations§
Source§impl Clone for InputInterpreterCallback
impl Clone for InputInterpreterCallback
Source§impl Debug for InputInterpreterCallback
impl Debug for InputInterpreterCallback
Source§impl Default for InputInterpreterCallback
impl Default for InputInterpreterCallback
Source§impl Display for InputInterpreterCallback
impl Display for InputInterpreterCallback
Source§impl From<extern "C" fn(RefAny, *const InputInterpreterInfo<'static>) -> PreCallbackFilterResult> for InputInterpreterCallback
Allow creating callback from a raw function pointer
Sets callable to None (for native Rust/C usage)
impl From<extern "C" fn(RefAny, *const InputInterpreterInfo<'static>) -> PreCallbackFilterResult> for InputInterpreterCallback
Allow creating callback from a raw function pointer Sets callable to None (for native Rust/C usage)
Source§fn from(cb: InputInterpreterCallbackType) -> Self
fn from(cb: InputInterpreterCallbackType) -> Self
Converts to this type from the input type.
Source§impl Hash for InputInterpreterCallback
impl Hash for InputInterpreterCallback
Source§impl Ord for InputInterpreterCallback
impl Ord for InputInterpreterCallback
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for InputInterpreterCallback
impl PartialEq for InputInterpreterCallback
Source§impl PartialOrd for InputInterpreterCallback
impl PartialOrd for InputInterpreterCallback
impl Eq for InputInterpreterCallback
Auto Trait Implementations§
impl Freeze for InputInterpreterCallback
impl RefUnwindSafe for InputInterpreterCallback
impl Send for InputInterpreterCallback
impl Sync for InputInterpreterCallback
impl Unpin for InputInterpreterCallback
impl UnsafeUnpin for InputInterpreterCallback
impl UnwindSafe for InputInterpreterCallback
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more