#[repr(C)]pub struct KuiEvent {
pub size: u32,
pub origin: u16,
pub key: u64,
pub payload: *const KuiValue,
pub window: u32,
pub reply_sink: *mut KuiReplySink,
pub slot: u64,
}Expand description
One event from the UI, as kui_poll_event writes it and kui_run’s
on_event receives it.
key is the node that emitted it, payload the tag the node was
declared with plus what the event adds (its kind, a pointer
position, a key’s code), origin 0 for the host’s own nodes and an
extension’s index otherwise, window which window it came from. An
[out] struct: start from KUI_EVENT_INIT so size is set.
Fields§
§size: u32Set to sizeof(KuiEvent) before the call (KUI_EVENT_INIT does);
comes back as the number of bytes the library filled.
origin: u16§key: u64§payload: *const KuiValueBorrowed until the next kui_poll_event/kui_ctx_free; NULL if none.
window: u32Which window the event came from; 0 (KUI_WINDOW_MAIN) until a
second one is opened. Appended in ABI 4; a host reserving the older
layout gets a shorter write and never sees it.
reply_sink: *mut KuiReplySinkWhere kui_reply sends a reply to this event, or NULL when there is
nowhere to send one (every event a host polls itself). A host has no
use for it: it is the library’s channel to a plugin, which passes
the event straight back. See KuiReplySink. Appended in ABI 10.
slot: u64The key of the slot whose fill drew the node (what kui_key_of
answers for the slot’s full name), or 0 for a node the host drew
itself. Appended after reply_sink without a bump: a host
reserving the older layout never sees it.
Trait Implementations§
Auto Trait Implementations§
impl !Send for KuiEvent
impl !Sync for KuiEvent
impl Freeze for KuiEvent
impl RefUnwindSafe for KuiEvent
impl Unpin for KuiEvent
impl UnsafeUnpin for KuiEvent
impl UnwindSafe for KuiEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.