Module winit

Module winit 

Source
Available on crate feature backend_winit only.
Expand description

Implementation of backend traits for types provided by winit

This module provides the appropriate implementations of the backend interfaces for running a compositor as a Wayland or X11 client using winit.

§Usage

The backend is initialized using one of the init, init_from_attributes or init_from_attributes_with_gl_attr functions, depending on the amount of control you want on the initialization of the backend. These functions will provide you with two objects:

The other types in this module are the instances of the associated types of these two traits for the winit backend.

Structs§

WinitEventLoop
Abstracted event loop of a WinitWindow.
WinitGraphicsBackend
Window with an active EGL Context created by winit.
WinitInput
Marker used to define the InputBackend types for the winit backend.
WinitKeyboardInputEvent
Winit-Backend internal event wrapping winit’s types into a KeyboardKeyEvent
WinitMouseInputEvent
Winit-Backend internal event wrapping winit’s types into a PointerButtonEvent
WinitMouseMovedEvent
Winit-Backend internal event wrapping winit’s types into a PointerMotionAbsoluteEvent
WinitMouseWheelEvent
Winit-Backend internal event wrapping winit’s types into a PointerAxisEvent
WinitTouchCancelledEvent
Winit-Backend internal event wrapping winit’s types into a TouchCancelEvent
WinitTouchEndedEvent
Winit-Backend internal event wrapping winit’s types into a TouchUpEvent
WinitTouchMovedEvent
Winit-Backend internal event wrapping winit’s types into a TouchMotionEvent
WinitTouchStartedEvent
Winit-Backend internal event wrapping winit’s types into a TouchDownEvent
WinitVirtualDevice
Virtual input device used by the backend to associate input events

Enums§

Error
Errors thrown by the winit backends
WinitEvent
Specific events generated by Winit

Functions§

init
Create a new WinitGraphicsBackend, which implements the Renderer trait and a corresponding WinitEventLoop.
init_from_attributes
Create a new WinitGraphicsBackend, which implements the Renderer trait, from a given WindowAttributes struct and a corresponding WinitEventLoop.
init_from_attributes_with_gl_attr
Create a new WinitGraphicsBackend, which implements the Renderer trait, from a given WindowAttributes struct, as well as given GlAttributes for further customization of the rendering pipeline and a corresponding WinitEventLoop.