pub trait EventControllerExt: IsA<EventController> + 'static {
Show 17 methods
// Provided 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: Option<&str>) { ... }
fn set_propagation_limit(&self, limit: PropagationLimit) { ... }
fn set_propagation_phase(&self, phase: PropagationPhase) { ... }
fn set_static_name(&self, name: Option<&str>) { ... }
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
Trait containing all EventController
methods.
§Implementors
DropControllerMotion
, DropTargetAsync
, DropTarget
, EventControllerFocus
, EventControllerKey
, EventControllerLegacy
, EventControllerMotion
, EventControllerScroll
, EventController
, Gesture
, PadController
, ShortcutController
Provided Methods§
Sourcefn current_event(&self) -> Option<Event>
fn current_event(&self) -> Option<Event>
Sourcefn current_event_device(&self) -> Option<Device>
fn current_event_device(&self) -> Option<Device>
Sourcefn current_event_state(&self) -> ModifierType
fn current_event_state(&self) -> ModifierType
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
Sourcefn current_event_time(&self) -> u32
fn current_event_time(&self) -> u32
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
Sourcefn propagation_limit(&self) -> PropagationLimit
fn propagation_limit(&self) -> PropagationLimit
Sourcefn propagation_phase(&self) -> PropagationPhase
fn propagation_phase(&self) -> PropagationPhase
Sourcefn set_propagation_limit(&self, limit: PropagationLimit)
fn set_propagation_limit(&self, limit: PropagationLimit)
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
Sourcefn set_propagation_phase(&self, phase: PropagationPhase)
fn set_propagation_phase(&self, phase: PropagationPhase)
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
Sourcefn set_static_name(&self, name: Option<&str>)
Available on crate feature v4_8
only.
fn set_static_name(&self, name: Option<&str>)
v4_8
only.Sets a name on the controller that can be used for debugging.
§name
a name for @self, must be a static string
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.