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:
- a
WinitGraphicsBackend, which can give you an implementation of aRenderer(or evenGlesRenderer) through itsrenderermethod in addition to further functionality to access and manage the created winit-window. - a
WinitEventLoop, which dispatches someWinitEventfrom the host graphics server.
The other types in this module are the instances of the associated types of these two traits for the winit backend.
Structs§
- Winit
Event Loop - Abstracted event loop of a
WinitWindow. - Winit
Graphics Backend - Window with an active EGL Context created by
winit. - Winit
Input - Marker used to define the
InputBackendtypes for the winit backend. - Winit
Keyboard Input Event - Winit-Backend internal event wrapping
winit’s types into aKeyboardKeyEvent - Winit
Mouse Input Event - Winit-Backend internal event wrapping
winit’s types into aPointerButtonEvent - Winit
Mouse Moved Event - Winit-Backend internal event wrapping
winit’s types into aPointerMotionAbsoluteEvent - Winit
Mouse Wheel Event - Winit-Backend internal event wrapping
winit’s types into aPointerAxisEvent - Winit
Touch Cancelled Event - Winit-Backend internal event wrapping
winit’s types into aTouchCancelEvent - Winit
Touch Ended Event - Winit-Backend internal event wrapping
winit’s types into aTouchUpEvent - Winit
Touch Moved Event - Winit-Backend internal event wrapping
winit’s types into aTouchMotionEvent - Winit
Touch Started Event - Winit-Backend internal event wrapping
winit’s types into aTouchDownEvent - Winit
Virtual Device - Virtual input device used by the backend to associate input events
Enums§
- Error
- Errors thrown by the
winitbackends - Winit
Event - Specific events generated by Winit
Functions§
- init
- Create a new
WinitGraphicsBackend, which implements theRenderertrait and a correspondingWinitEventLoop. - init_
from_ attributes - Create a new
WinitGraphicsBackend, which implements theRenderertrait, from a givenWindowAttributesstruct and a correspondingWinitEventLoop. - init_
from_ attributes_ with_ gl_ attr - Create a new
WinitGraphicsBackend, which implements theRenderertrait, from a givenWindowAttributesstruct, as well as givenGlAttributesfor further customization of the rendering pipeline and a correspondingWinitEventLoop.