Trait gtk4::prelude::EventControllerExt[][src]

pub trait EventControllerExt: 'static {
Show 16 methods fn current_event(&self) -> Option<Event>;
fn current_event_device(&self) -> Option<Device>;
fn current_event_state(&self) -> ModifierType;
fn current_event_time(&self) -> u32;
fn name(&self) -> Option<GString>;
fn propagation_limit(&self) -> PropagationLimit;
fn propagation_phase(&self) -> PropagationPhase;
fn widget(&self) -> Option<Widget>;
fn reset(&self);
fn set_name(&self, name: &str);
fn set_propagation_limit(&self, limit: PropagationLimit);
fn set_propagation_phase(&self, phase: PropagationPhase);
fn connect_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_propagation_limit_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_propagation_phase_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_widget_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Required methods

Returns the event that is currently being handled by the controller.

At other times, None is returned.

Returns

the event that is currently handled by self

Returns the device of the event that is currently being handled by the controller.

At other times, None is returned.

Returns

device of the event is currently handled by self

Returns the modifier state of the event that is currently being handled by the controller.

At other times, 0 is returned.

Returns

modifier state of the event is currently handled by self

Returns the timestamp of the event that is currently being handled by the controller.

At other times, 0 is returned.

Returns

timestamp of the event is currently handled by self

Gets the name of self.

Gets the propagation limit of the event controller.

Returns

the propagation limit

Gets the propagation phase at which self handles events.

Returns

the propagation phase

Returns the Widget this controller relates to.

Returns

a Widget

Resets the self to a clean state.

Sets a name on the controller that can be used for debugging.

name

a name for self

Sets the event propagation limit on the event controller.

If the limit is set to PropagationLimit::SameNative, the controller won’t handle events that are targeted at widgets on a different surface, such as popovers.

limit

the propagation limit

Sets the propagation phase at which a controller handles events.

If phase is PropagationPhase::None, no automatic event handling will be performed, but other additional gesture maintenance will.

phase

a propagation phase

Implementors