pub struct WinitEnv {
Show 13 fields seats: SeatHandler, outputs: OutputHandler, shm: ShmHandler, compositor: SimpleGlobal<WlCompositor>, subcompositor: SimpleGlobal<WlSubcompositor>, shell: ShellHandler, relative_pointer_manager: SimpleGlobal<ZwpRelativePointerManagerV1>, pointer_constraints: SimpleGlobal<ZwpPointerConstraintsV1>, text_input_manager: SimpleGlobal<ZwpTextInputManagerV3>, decoration_manager: SimpleGlobal<ZxdgDecorationManagerV1>, xdg_activation: SimpleGlobal<XdgActivationV1>, fractional_scale_manager: SimpleGlobal<WpFractionalScaleManagerV1>, viewporter: SimpleGlobal<WpViewporter>,
}
Expand description

The environment that we utilize.

Fields§

§seats: SeatHandler§outputs: OutputHandler§shm: ShmHandler§compositor: SimpleGlobal<WlCompositor>§subcompositor: SimpleGlobal<WlSubcompositor>§shell: ShellHandler§relative_pointer_manager: SimpleGlobal<ZwpRelativePointerManagerV1>§pointer_constraints: SimpleGlobal<ZwpPointerConstraintsV1>§text_input_manager: SimpleGlobal<ZwpTextInputManagerV3>§decoration_manager: SimpleGlobal<ZxdgDecorationManagerV1>§xdg_activation: SimpleGlobal<XdgActivationV1>§fractional_scale_manager: SimpleGlobal<WpFractionalScaleManagerV1>§viewporter: SimpleGlobal<WpViewporter>

Implementations§

source§

impl WinitEnv

source

pub fn new() -> Self

Trait Implementations§

source§

impl GlobalHandler<WlCompositor> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<WlCompositor>>

Access the global if it was signaled
source§

impl GlobalHandler<WlShell> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<WlShell>>

Access the global if it was signaled
source§

impl GlobalHandler<WlShm> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<WlShm>>

Access the global if it was signaled
source§

impl GlobalHandler<WlSubcompositor> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<WlSubcompositor>>

Access the global if it was signaled
source§

impl GlobalHandler<WpFractionalScaleManagerV1> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<WpFractionalScaleManagerV1>>

Access the global if it was signaled
source§

impl GlobalHandler<WpViewporter> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<WpViewporter>>

Access the global if it was signaled
source§

impl GlobalHandler<XdgActivationV1> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<XdgActivationV1>>

Access the global if it was signaled
source§

impl GlobalHandler<XdgWmBase> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<XdgWmBase>>

Access the global if it was signaled
source§

impl GlobalHandler<ZwpPointerConstraintsV1> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<ZwpPointerConstraintsV1>>

Access the global if it was signaled
source§

impl GlobalHandler<ZwpRelativePointerManagerV1> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<ZwpRelativePointerManagerV1>>

Access the global if it was signaled
source§

impl GlobalHandler<ZwpTextInputManagerV3> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<ZwpTextInputManagerV3>>

Access the global if it was signaled
source§

impl GlobalHandler<ZxdgDecorationManagerV1> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<ZxdgDecorationManagerV1>>

Access the global if it was signaled
source§

impl GlobalHandler<ZxdgShellV6> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

This global was created and signaled in the registry with given id and version
source§

fn get(&self) -> Option<Attached<ZxdgShellV6>>

Access the global if it was signaled
source§

impl InnerEnv for WinitEnv

source§

fn process_event( &mut self, event: GlobalEvent, registry: Attached<WlRegistry>, ddata: DispatchData<'_> )

Process a GlobalEvent
source§

impl MultiGlobalHandler<WlOutput> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

A new instance of this global was created with given id and version
source§

fn removed(&mut self, id: u32, ddata: DispatchData<'_>)

The instance with given id was removed
source§

fn get_all(&self) -> Vec<Attached<WlOutput>>

Access all the currently existing instances
source§

impl MultiGlobalHandler<WlSeat> for WinitEnv

source§

fn created( &mut self, registry: Attached<WlRegistry>, id: u32, version: u32, ddata: DispatchData<'_> )

A new instance of this global was created with given id and version
source§

fn removed(&mut self, id: u32, ddata: DispatchData<'_>)

The instance with given id was removed
source§

fn get_all(&self) -> Vec<Attached<WlSeat>>

Access all the currently existing instances
source§

impl OutputHandling for WinitEnv

source§

fn listen<F: FnMut(WlOutput, &OutputInfo, DispatchData<'_>) + 'static>( &mut self, f: F ) -> OutputStatusListener

Insert a listener for output creation and removal events
source§

impl SeatHandling for WinitEnv

source§

fn listen<F: FnMut(Attached<WlSeat>, &SeatData, DispatchData<'_>) + 'static>( &mut self, f: F ) -> SeatListener

Insert a listener for seat events
source§

impl ShellHandling for WinitEnv

source§

fn get_shell(&self) -> Option<Shell>

Get the best available shell

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.