Skip to main content

Module window

Module window 

Source
Expand description

Window configuration, input state, and platform-specific options. Window configuration types, input state, and platform-specific options.

This module defines the core types used by the windowing system:

  • Window configuration: [WindowSize], [WindowFlags], [WindowPosition], [RendererOptions], [PlatformSpecificOptions]
  • Input state: [KeyboardState], [MouseState], [TouchState], [CursorPosition]
  • Monitor/display info: [Monitor], [MonitorId], [VideoMode]
  • Virtual key codes: [VirtualKeyCode], [ScanCode]
  • Window icons: [WindowIcon], [TaskBarIcon]
  • Platform options: [WindowsWindowOptions], [LinuxWindowOptions], [MacWindowOptions], [WasmWindowOptions]

These types are consumed by the platform shell backends in dll/src/desktop/shell2/{windows,macos,linux}/ and by layout/src/window_state.rs for state management.

Structs§

AndroidHandle
AzStringPair
A key-value pair of strings, used for X11 WM_CLASS and other platform properties
DebugState
Toggles webrender debug flags (will make stuff appear on the screen that you might not want to - used for debugging purposes)
IOSHandle
IconKey
Key that is used for checking whether a window icon has changed - this way azul doesn’t need to diff the actual bytes, just the icon key. Use IconKey::new() to generate a new, unique key
KeyboardState
Determines which keys are pressed currently (modifiers, etc.)
LargeWindowIconBytes
32x32x4 bytes icon
LinuxDecorationsState
State for tracking hover and interaction with Linux window decoration elements (CSD).
LinuxWindowOptions
MacOSHandle
MacWindowOptions
macOS-specific window options (reserved for future use)
Monitor
Complete information about a monitor/display
MonitorId
Identifies a specific monitor/display
MonitorVec
MonitorVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
MouseState
Mouse position, cursor type, user scroll input, etc.
PlatformSpecificOptions
Platform-specific window configuration options (Windows, Linux, macOS, WASM)
RendererOptions
ScanCodeVec
ScanCodeVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
ScrollResult
Result of dispatching a scroll delta into the system scroll-handling pipeline.
SmallWindowIconBytes
16x16x4 bytes icon
StringPairVec
StringPairVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
TaskBarIcon
256x256x4 bytes window icon
TouchPoint
Single touch point (finger, stylus, etc.)
TouchPointVec
TouchPointVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
TouchState
VideoMode
VideoModeVec
VideoModeVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
VirtualKeyCodeCombo
VirtualKeyCodeVec
VirtualKeyCodeVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
WasmWindowOptions
WASM/web-specific window options (reserved for future use)
WaylandHandle
WaylandTheme
WebHandle
WindowFlags
WindowId
Unique identifier for a window, auto-assigned via atomic counter.
WindowSize
WindowsHandle
WindowsWindowOptions
XWindowTypeVec
XWindowTypeVecSlice
C-compatible slice type for $struct_name. This is a non-owning view into a Vec’s data.
XcbHandle
XlibHandle

Enums§

AcceleratorKey
Utility function for easier creation of a keymap - i.e. [vec![Ctrl, S], my_function]
ContextMenuMouseButton
CursorPosition
FullScreenMode
HwAcceleration
ImePosition
IME composition window rectangle (cursor position + height)
MonitorVecDestructor
MouseCursorType
OptionChar
OptionHwndHandle
OptionKeyboardState
OptionLinuxDecorationsState
OptionMonitor
OptionMonitorId
OptionMouseCursorType
OptionMouseState
OptionRendererOptions
OptionRendererType
OptionStringPair
OptionStringPairVec
OptionTaskBarIcon
OptionTouchPoint
OptionVideoMode
OptionVirtualKeyCode
OptionVirtualKeyCodeCombo
OptionWaylandTheme
OptionWindowFlags
OptionWindowIcon
OptionWindowTheme
OptionX11Visual
OptionXWindowType
RawWindowHandle
RendererType
ScanCodeVecDestructor
Srgb
StringPairVecDestructor
TouchPointVecDestructor
UpdateFocusWarning
UserAttentionType
VideoModeVecDestructor
VirtualKeyCode
Symbolic name for a keyboard key, does NOT take the keyboard locale into account
VirtualKeyCodeVecDestructor
Vsync
WindowBackgroundMaterial
Compositor blur/transparency effects for window background
WindowDecorations
Window decoration style
WindowFrame
Window frame state (normal, minimized, maximized, fullscreen)
WindowIcon
WindowPosition
Position of the window on screen
WindowTheme
State, size, etc of the window, for comparing to the last frame
WindowType
Window type classification for behavior control
XWindowType
X window type. Maps directly to _NET_WM_WINDOW_TYPE.
XWindowTypeVecDestructor

Constants§

DEFAULT_TITLE

Functions§

process_system_scroll
Dispatch a system scroll event and return a ScrollResult describing what happened.

Type Aliases§

HwndHandle
Note: this should be a *mut HWND
MonitorVecDestructorType
ScanCode
Hardware-dependent keyboard scan code.
ScanCodeVecDestructorType
StringPairVecDestructorType
TouchPointVecDestructorType
VideoModeVecDestructorType
VirtualKeyCodeVecDestructorType
X11Visual
XWindowTypeVecDestructorType