Module window

Source
Expand description

Contains useful types for interacting with winit.

Structs§

ActivationToken
An opaque token used to activate the Window.
ActiveEventLoop
Target that associates windows with an EventLoop.
AsyncRequestSerial
A unique identifier of the winit’s async request.
CursorIconParseError
An error which could be returned when parsing CursorIcon.
CustomCursor
Use a custom image as a cursor (mouse pointer).
CustomCursorSource
Source for CustomCursor.
DeviceId
Identifier of an input device.
EventLoop
Provides a way to retrieve events from the system and from the windows that were registered to the events loop.
EventLoopBuilder
Object that allows building the event loop.
EventLoopClosed
The error that is returned when an EventLoopProxy attempts to wake up an EventLoop that no longer exists.
EventLoopProxy
Used to send custom events to EventLoop.
Icon
An icon used for the window titlebar, taskbar, etc.
InnerSizeWriter
Handle to synchronously change the size of the window from the WindowEvent.
KeyEvent
Describes a keyboard input targeting a window.
Modifiers
Describes keyboard modifiers event.
ModifiersState
Represents the current state of the keyboard modifiers
OwnedDisplayHandle
A proxy for the underlying display handle.
RawKeyEvent
Describes a keyboard input as a raw device event.
SmolStr
A SmolStr is a string type that has the following properties:
Touch
Represents a touch event
Window
Represents a window.
WindowAttributes
Attributes used when creating a window.
WindowButtons
WindowId
Identifier of a window. Unique for each window.

Enums§

BadIcon
An error produced when using Icon::from_rgba with invalid arguments.
BadImage
An error produced when using CustomCursor::from_rgba with invalid arguments.
ControlFlow
Set through ActiveEventLoop::set_control_flow().
Cursor
See Window::set_cursor() for more details.
CursorGrabMode
The behavior of cursor grabbing.
CursorIcon
Describes the appearance of the (usually mouse) cursor icon.
DeviceEvent
Represents raw hardware events that are not associated with any particular window.
DeviceEvents
Control when device events are captured.
ElementState
Describes the input state of a key.
Event
Describes a generic event.
Force
Describes the force of a touch event
Fullscreen
Fullscreen modes.
Ime
Describes input method events.
ImePurpose
Generic IME purposes for use in Window::set_ime_purpose.
Key
Key represents the meaning of a keypress.
KeyCode
Code representing the location of a physical key
KeyLocation
The location of the key on the keyboard.
ModifiersKeyState
The state of the particular modifiers key.
MouseButton
Describes a button of a mouse controller.
MouseScrollDelta
Describes a difference in the mouse scroll wheel state.
NamedKey
A Key::Named value
NativeKey
Contains the platform-native logical key identifier
NativeKeyCode
Contains the platform-native physical key identifier
PhysicalKey
Represents the location of a physical key.
ResizeDirection
Defines the orientation that a window resize will be performed.
StartCause
Describes the reason the event loop is resuming.
Theme
The theme variant to use.
TouchPhase
Describes touch-screen input state.
UserAttentionType
Platform-specific
WindowEvent
Describes an event from a [Window].
WindowLevel
A window level groups windows with respect to their z-position.

Constants§

MAX_CURSOR_SIZE
The maximum width and height for a cursor when using CustomCursor::from_rgba.

Type Aliases§

AxisId
Identifier for a specific analog axis on some device.
ButtonId
Identifier for a specific button on some device.