pub enum FocusTarget {
Window(Window),
Popup(PopupKind),
LayerSurface(LayerSurface),
}Expand description
Input-event target for Smithay’s seat handlers. Smithay requires a concrete type as the
“target” of a keyboard / pointer / touch event; FocusTarget bridges that to the concrete
Wayland surface behind a window, popup, or layer surface.
Variants§
Trait Implementations§
Source§impl Clone for FocusTarget
impl Clone for FocusTarget
Source§fn clone(&self) -> FocusTarget
fn clone(&self) -> FocusTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FocusTarget
impl Debug for FocusTarget
Source§impl DndFocus<AppState> for FocusTarget
Forward drag-and-drop focus events (enter / motion / leave / drop) to the wrapped
target’s underlying wl_surface, reusing the WlSurface offer-data type.
impl DndFocus<AppState> for FocusTarget
Forward drag-and-drop focus events (enter / motion / leave / drop) to the wrapped
target’s underlying wl_surface, reusing the WlSurface offer-data type.
Source§type OfferData<S: Source> = <WlSurface as DndFocus<AppState>>::OfferData<S>
type OfferData<S: Source> = <WlSurface as DndFocus<AppState>>::OfferData<S>
Source§fn enter<S: Source>(
&self,
data: &mut AppState,
dh: &DisplayHandle,
source: Arc<S>,
seat: &Seat<AppState>,
location: Point<f64, Logical>,
serial: &Serial,
) -> Option<Self::OfferData<S>>
fn enter<S: Source>( &self, data: &mut AppState, dh: &DisplayHandle, source: Arc<S>, seat: &Seat<AppState>, location: Point<f64, Logical>, serial: &Serial, ) -> Option<Self::OfferData<S>>
Source§fn motion<S: Source>(
&self,
data: &mut AppState,
offer: Option<&mut Self::OfferData<S>>,
seat: &Seat<AppState>,
location: Point<f64, Logical>,
time: u32,
)
fn motion<S: Source>( &self, data: &mut AppState, offer: Option<&mut Self::OfferData<S>>, seat: &Seat<AppState>, location: Point<f64, Logical>, time: u32, )
Source§impl From<LayerSurface> for FocusTarget
Wrap a layer surface as a focus target.
impl From<LayerSurface> for FocusTarget
Wrap a layer surface as a focus target.
Source§impl From<PopupKind> for FocusTarget
Wrap a popup as a focus target.
impl From<PopupKind> for FocusTarget
Wrap a popup as a focus target.
Source§impl From<Window> for FocusTarget
Wrap a Window as a focus target.
impl From<Window> for FocusTarget
Wrap a Window as a focus target.
Source§impl IsAlive for FocusTarget
Liveness of a focus target: true while its underlying window / popup / layer surface is
still alive, so dead targets are dropped from focus.
impl IsAlive for FocusTarget
Liveness of a focus target: true while its underlying window / popup / layer surface is still alive, so dead targets are dropped from focus.
Source§impl KeyboardTarget<AppState> for FocusTarget
Forward every keyboard event (enter / leave / key / modifiers) to the wrapped target’s
underlying wl_surface, which carries Smithay’s real keyboard-target implementation.
impl KeyboardTarget<AppState> for FocusTarget
Forward every keyboard event (enter / leave / key / modifiers) to the wrapped target’s
underlying wl_surface, which carries Smithay’s real keyboard-target implementation.
Source§fn enter(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
keys: Vec<KeysymHandle<'_>>,
serial: Serial,
)
fn enter( &self, seat: &Seat<AppState>, data: &mut AppState, keys: Vec<KeysymHandle<'_>>, serial: Serial, )
Source§fn leave(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
fn leave(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
Source§fn key(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
key: KeysymHandle<'_>,
state: KeyState,
serial: Serial,
time: u32,
)
fn key( &self, seat: &Seat<AppState>, data: &mut AppState, key: KeysymHandle<'_>, state: KeyState, serial: Serial, time: u32, )
Source§impl PartialEq for FocusTarget
impl PartialEq for FocusTarget
Source§fn eq(&self, other: &FocusTarget) -> bool
fn eq(&self, other: &FocusTarget) -> bool
self and other values to be equal, and is used by ==.Source§impl PointerTarget<AppState> for FocusTarget
Forward every pointer event (motion, buttons, axis, and all swipe / pinch / hold gesture
phases) to the wrapped target’s underlying wl_surface.
impl PointerTarget<AppState> for FocusTarget
Forward every pointer event (motion, buttons, axis, and all swipe / pinch / hold gesture
phases) to the wrapped target’s underlying wl_surface.
Source§fn enter(&self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent)
fn enter(&self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent)
Source§fn motion(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &MotionEvent,
)
fn motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent, )
Source§fn relative_motion(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &RelativeMotionEvent,
)
fn relative_motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &RelativeMotionEvent, )
Source§fn axis(&self, seat: &Seat<AppState>, data: &mut AppState, frame: AxisFrame)
fn axis(&self, seat: &Seat<AppState>, data: &mut AppState, frame: AxisFrame)
Source§fn leave(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
serial: Serial,
time: u32,
)
fn leave( &self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial, time: u32, )
Source§fn gesture_swipe_begin(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureSwipeBeginEvent,
)
fn gesture_swipe_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeBeginEvent, )
Source§fn gesture_swipe_update(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureSwipeUpdateEvent,
)
fn gesture_swipe_update( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeUpdateEvent, )
Source§fn gesture_swipe_end(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureSwipeEndEvent,
)
fn gesture_swipe_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureSwipeEndEvent, )
Source§fn gesture_pinch_begin(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GesturePinchBeginEvent,
)
fn gesture_pinch_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchBeginEvent, )
Source§fn gesture_pinch_update(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GesturePinchUpdateEvent,
)
fn gesture_pinch_update( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchUpdateEvent, )
Source§fn gesture_pinch_end(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GesturePinchEndEvent,
)
fn gesture_pinch_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GesturePinchEndEvent, )
Source§fn gesture_hold_begin(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureHoldBeginEvent,
)
fn gesture_hold_begin( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureHoldBeginEvent, )
Source§fn gesture_hold_end(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &GestureHoldEndEvent,
)
fn gesture_hold_end( &self, seat: &Seat<AppState>, data: &mut AppState, event: &GestureHoldEndEvent, )
impl StructuralPartialEq for FocusTarget
Source§impl TouchTarget<AppState> for FocusTarget
Forward every touch event (down / up / motion / frame / cancel / shape / orientation) to
the wrapped target’s underlying wl_surface.
impl TouchTarget<AppState> for FocusTarget
Forward every touch event (down / up / motion / frame / cancel / shape / orientation) to
the wrapped target’s underlying wl_surface.
Source§fn down(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &DownEvent,
serial: Serial,
)
fn down( &self, seat: &Seat<AppState>, data: &mut AppState, event: &DownEvent, serial: Serial, )
Source§fn up(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &UpEvent,
serial: Serial,
)
fn up( &self, seat: &Seat<AppState>, data: &mut AppState, event: &UpEvent, serial: Serial, )
Source§fn motion(
&self,
seat: &Seat<AppState>,
data: &mut AppState,
event: &MotionEvent,
serial: Serial,
)
fn motion( &self, seat: &Seat<AppState>, data: &mut AppState, event: &MotionEvent, serial: Serial, )
Source§fn frame(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
fn frame(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
Source§fn cancel(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
fn cancel(&self, seat: &Seat<AppState>, data: &mut AppState, serial: Serial)
Source§impl WaylandFocus for FocusTarget
Expose the wrapped target’s underlying wl_surface and same-client checks so Smithay
can route focus and selection ownership by client.
impl WaylandFocus for FocusTarget
Expose the wrapped target’s underlying wl_surface and same-client checks so Smithay
can route focus and selection ownership by client.
Auto Trait Implementations§
impl !RefUnwindSafe for FocusTarget
impl !UnwindSafe for FocusTarget
impl Freeze for FocusTarget
impl Send for FocusTarget
impl Sync for FocusTarget
impl Unpin for FocusTarget
impl UnsafeUnpin for FocusTarget
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more