pub struct EventArgs {
pub event_type: EventType,
pub window: Option<ObjectHandle>,
pub pane: Option<ObjectHandle>,
pub tab: Option<ObjectHandle>,
pub data: EventData,
pub timestamp: Instant,
}Expand description
Event arguments passed to handlers
Contains all contextual information about an event, including:
- The event type
- Handles to affected terminal objects (window, pane, tab)
- Event-specific data payload
- Timestamp when the event occurred
Fields§
§event_type: EventTypeType of event being fired
window: Option<ObjectHandle>Handle to the window associated with this event (if any)
pane: Option<ObjectHandle>Handle to the pane associated with this event (if any)
tab: Option<ObjectHandle>Handle to the tab associated with this event (if any)
data: EventDataEvent-specific data payload
timestamp: InstantWhen this event was created
Implementations§
Source§impl EventArgs
impl EventArgs
Sourcepub fn with_window(self, handle: ObjectHandle) -> Self
pub fn with_window(self, handle: ObjectHandle) -> Self
Set the window handle (builder pattern)
Sourcepub fn with_pane(self, handle: ObjectHandle) -> Self
pub fn with_pane(self, handle: ObjectHandle) -> Self
Set the pane handle (builder pattern)
Sourcepub fn with_tab(self, handle: ObjectHandle) -> Self
pub fn with_tab(self, handle: ObjectHandle) -> Self
Set the tab handle (builder pattern)
Sourcepub fn has_window(&self) -> bool
pub fn has_window(&self) -> bool
Check if this event has window context
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventArgs
impl RefUnwindSafe for EventArgs
impl Send for EventArgs
impl Sync for EventArgs
impl Unpin for EventArgs
impl UnsafeUnpin for EventArgs
impl UnwindSafe for EventArgs
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.