MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
GlobalGraphicsInfo.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace MayaFlux::Core {
6
7//==============================================================================
8// GRAPHICS BACKEND CONFIGURATION (Vulkan/OpenGL/etc.)
9//==============================================================================
10
11/**
12 * @struct GraphicsBackendInfo
13 * @brief Configuration for graphics API backend (Vulkan/OpenGL/etc.)
14 *
15 * Separate from windowing - this is GPU/rendering configuration.
16 * GraphicsSurfaceInfo handles windows, this handles the graphics API.
17 */
18struct MAYAFLUX_API GraphicsBackendInfo {
19 /** @brief Enable validation layers; defaults on in debug builds. */
20#if defined(MAYAFLUX_DEBUG) && MAYAFLUX_DEBUG
21 bool enable_validation = true;
22#else
23 bool enable_validation = false;
24#endif
25
26 /** @brief Enable GPU debug markers (for profiling tools) */
27 bool enable_debug_markers = false;
28
29 /** @brief Required device features (Vulkan-specific) */
30 struct {
31 bool compute_shaders = true;
32 bool geometry_shaders = false;
33 bool tessellation_shaders = false;
34 bool multi_viewport = false;
35 bool sampler_anisotropy = true;
36 bool fill_mode_non_solid = false;
37 } required_features;
38
39 /**
40 * @brief Preferred physical device class when no explicit selector matches.
41 *
42 * AUTO scores discrete above integrated above virtual above everything
43 * else. The other values pin the class; if no device of that class
44 * survives the presentation and extension filters, selection falls back
45 * to AUTO ordering unless strict_device_selection is set.
46 *
47 * EXTERNAL is a heuristic, not a device type. Vulkan reports an external GPU
48 * as DISCRETE GPU, indistinguishable from a built-in one. EXTERNAL therefore
49 * means DISCRETE plus a preference for the highest PCI bus number, since
50 * a Thunderbolt-attached device sits behind a PCIe switch well above the
51 * root complex. It requires VK_EXT_pci_bus_info; without that extension
52 * EXTERNAL behaves as DISCRETE and says so in the log.
53 */
54 enum class DevicePreference : uint8_t {
55 AUTO,
56 DISCRETE,
57 INTEGRATED,
58 VIRTUAL,
59 EXTERNAL
60 } device_preference = DevicePreference::AUTO;
61
62 /** @brief Index into enumeration order; negative disables. Debugging escape hatch, prefer device_uuid. */
63 int32_t device_index = -1;
64
65 /** @brief Device UUID as 32 lowercase hex chars, no separators; empty disables. Read it from the startup candidate table. */
66 std::string device_uuid;
67
68 /** @brief Case-insensitive substring of the device name; empty disables. Ambiguous matches take the highest scoring one. */
69 std::string device_name;
70
71 /** @brief Require the graphics queue family to support presentation. Set false for headless or compute-only. */
72 bool require_presentation = true;
73
74 /** @brief Treat an unmatched selector as fatal rather than falling back to scoring. */
75 bool strict_device_selection = false;
76
77 /** @brief Memory allocation strategy */
78 enum class MemoryStrategy : uint8_t {
79 CONSERVATIVE, ///< Minimize allocations
80 BALANCED, ///< Balance speed and memory
81 AGGRESSIVE ///< Maximize performance
82 } memory_strategy = MemoryStrategy::BALANCED;
83
84 /** @brief Command buffer pooling strategy */
85 enum class CommandPooling : uint8_t {
86 PER_THREAD, ///< One pool per thread
87 SHARED, ///< Shared pool
88 PER_QUEUE ///< One pool per queue family
89 } command_pooling = CommandPooling::PER_THREAD;
90
91 /** @brief Maximum number of frames in flight (GPU pipelining) */
92 uint32_t max_frames_in_flight = 2;
93
94 /** @brief Enable compute queue (separate from graphics) */
95 bool enable_compute_queue = true;
96
97 /** @brief Enable transfer queue (separate from graphics) */
98 bool enable_transfer_queue = false;
99
100 /** @brief Shader compilation strategy */
101 enum class ShaderCompilation : uint8_t {
102 RUNTIME, ///< Compile at runtime
103 PRECOMPILED, ///< Use pre-compiled SPIR-V
104 CACHED ///< Cache compiled shaders
105 } shader_compilation = ShaderCompilation::CACHED;
106
107 /** @brief Shader cache directory (if caching enabled) */
108 std::filesystem::path shader_cache_dir = "cache/shaders";
109
110 /** @brief Backend-specific extensions to request */
111 std::vector<std::string> required_extensions;
112 std::vector<std::string> optional_extensions;
113
114 static constexpr auto describe()
115 {
116 return std::make_tuple(
117 Reflect::member("enable_validation", &GraphicsBackendInfo::enable_validation),
118 Reflect::member("enable_debug_markers", &GraphicsBackendInfo::enable_debug_markers),
119 Reflect::member("device_preference", &GraphicsBackendInfo::device_preference),
120 Reflect::member("device_index", &GraphicsBackendInfo::device_index),
121 Reflect::member("device_uuid", &GraphicsBackendInfo::device_uuid),
122 Reflect::member("device_name", &GraphicsBackendInfo::device_name),
123 Reflect::member("require_presentation", &GraphicsBackendInfo::require_presentation),
124 Reflect::member("strict_device_selection", &GraphicsBackendInfo::strict_device_selection),
125 // Reflect::member("required_features", &GraphicsBackendInfo::required_features),
126 Reflect::member("memory_strategy", &GraphicsBackendInfo::memory_strategy),
127 Reflect::member("command_pooling", &GraphicsBackendInfo::command_pooling),
128 Reflect::member("max_frames_in_flight", &GraphicsBackendInfo::max_frames_in_flight),
129 Reflect::member("enable_compute_queue", &GraphicsBackendInfo::enable_compute_queue),
130 Reflect::member("enable_transfer_queue", &GraphicsBackendInfo::enable_transfer_queue),
131 Reflect::member("shader_compilation", &GraphicsBackendInfo::shader_compilation),
132 Reflect::member("shader_cache_dir", &GraphicsBackendInfo::shader_cache_dir),
133 Reflect::member("required_extensions", &GraphicsBackendInfo::required_extensions),
134 Reflect::member("optional_extensions", &GraphicsBackendInfo::optional_extensions));
135 }
136};
137
138/**
139 * @struct GraphicsResourceLimits
140 * @brief Resource limits and budgets for graphics subsystem
141 *
142 * Prevents runaway resource usage, similar to audio buffer limits.
143 */
144struct MAYAFLUX_API GraphicsResourceLimits {
145 /** @brief Maximum number of concurrent windows */
146 uint32_t max_windows = 16;
147
148 /** @brief Maximum staging buffer size (MB) */
149 uint32_t max_staging_buffer_mb = 256;
150
151 /** @brief Maximum compute buffer size (MB) */
152 uint32_t max_compute_buffer_mb = 1024;
153
154 /** @brief Maximum texture cache size (MB) */
155 uint32_t max_texture_cache_mb = 2048;
156
157 /** @brief Maximum number of descriptor sets */
158 uint32_t max_descriptor_sets = 1024;
159
160 /** @brief Maximum number of pipeline state objects */
161 uint32_t max_pipelines = 256;
162
163 static constexpr auto describe()
164 {
165 return std::make_tuple(
166 Reflect::member("max_windows", &GraphicsResourceLimits::max_windows),
167 Reflect::member("max_staging_buffer_mb", &GraphicsResourceLimits::max_staging_buffer_mb),
168 Reflect::member("max_compute_buffer_mb", &GraphicsResourceLimits::max_compute_buffer_mb),
169 Reflect::member("max_texture_cache_mb", &GraphicsResourceLimits::max_texture_cache_mb),
170 Reflect::member("max_descriptor_sets", &GraphicsResourceLimits::max_descriptor_sets),
171 Reflect::member("max_pipelines", &GraphicsResourceLimits::max_pipelines));
172 }
173};
174
175//==============================================================================
176// GLOBAL VISUAL STREAM INFO (Parallel to GlobalStreamInfo)
177//==============================================================================
178
179/**
180 * @struct GraphicsSurfaceInfo
181 * @brief System-wide configuration for visual stream processing
182 *
183 * Defines technical parameters for ALL windows/visual streams in the system.
184 * This is set once at subsystem initialization, similar to audio sample rate.
185 * Individual windows inherit these defaults but can override specific params.
186 */
187struct MAYAFLUX_API GraphicsSurfaceInfo {
188
189 /**
190 * @enum SurfaceFormat
191 * @brief Default pixel format for window surfaces (Vulkan-compatible)
192 */
193 enum class SurfaceFormat : uint8_t {
194 B8G8R8A8_SRGB, ///< Most common - 8-bit SRGB
195 R8G8B8A8_SRGB, ///< Alternative 8-bit SRGB
196 B8G8R8A8_UNORM, ///< 8-bit linear
197 R8G8B8A8_UNORM, ///< 8-bit linear
198 R16G16B16A16_SFLOAT, ///< 16-bit float HDR
199 A2B10G10R10_UNORM, ///< 10-bit HDR
200 R32G32B32A32_SFLOAT, ///< 32-bit float
201 };
202
203 /** @brief Default surface format for new windows */
204 SurfaceFormat format = SurfaceFormat::B8G8R8A8_SRGB;
205
206 /**
207 * @enum ColorSpace
208 * @brief Default color space for window surfaces
209 */
210 enum class ColorSpace : uint8_t {
211 SRGB_NONLINEAR, ///< Standard sRGB
212 EXTENDED_SRGB, ///< Extended sRGB for HDR
213 HDR10_ST2084, ///< HDR10 PQ
214 DISPLAY_P3, ///< DCI-P3
215 };
216
217 /** @brief Default color space for new windows */
218 ColorSpace color_space = ColorSpace::SRGB_NONLINEAR;
219
220 /**
221 * @enum PresentMode
222 * @brief Frame presentation strategy
223 */
224 enum class PresentMode : uint8_t {
225 IMMEDIATE, ///< No vsync, tear possible
226 MAILBOX, ///< Triple buffering, no tear
227 FIFO, ///< Vsync, no tear
228 FIFO_RELAXED, ///< Vsync, tear if late
229 };
230
231 /** @brief Default presentation mode for new windows */
232 PresentMode present_mode = PresentMode::FIFO;
233
234 /** @brief Default number of swapchain images (double/triple buffering) */
235 uint32_t image_count = 3;
236
237 /** @brief Enable region-based processing by default */
238 bool enable_regions = true;
239
240 /** @brief Maximum regions per window container */
241 uint32_t max_regions_per_window = 256;
242
243 /** @brief Enable HDR output if available */
244 bool enable_hdr {};
245
246 /** @brief Measure and report actual frame times */
247 bool measure_frame_time {};
248
249 /** @brief Backend-specific configuration parameters */
250 std::unordered_map<std::string, std::any> backend_options;
251
252 static constexpr auto describe()
253 {
254 return std::make_tuple(
255 Reflect::member("format", &GraphicsSurfaceInfo::format),
256 Reflect::member("color_space", &GraphicsSurfaceInfo::color_space),
257 Reflect::member("present_mode", &GraphicsSurfaceInfo::present_mode),
258 Reflect::member("image_count", &GraphicsSurfaceInfo::image_count),
259 Reflect::member("enable_regions", &GraphicsSurfaceInfo::enable_regions),
260 Reflect::member("max_regions_per_window", &GraphicsSurfaceInfo::max_regions_per_window),
261 Reflect::member("enable_hdr", &GraphicsSurfaceInfo::enable_hdr),
262 Reflect::member("measure_frame_time", &GraphicsSurfaceInfo::measure_frame_time));
263 }
264};
265
266/**
267 * @struct KeyRepeatConfig
268 * @brief Key repeat timing for native window backends.
269 *
270 * Wayland, Win32 and Cocoa backends implement client-side repeat using these values.
271 */
273 /** @brief Delay before repeat starts in milliseconds. */
274 uint32_t initial_delay_ms { 90 };
275
276 /** @brief Interval between repeat events in milliseconds. */
277 uint32_t interval_ms { 16 };
278
279 /** @brief Delay before text character repeat starts in milliseconds. */
280 uint32_t text_initial_delay_ms { 400 };
281
282 /** @brief Interval between repeated text character events in milliseconds. */
283 uint32_t text_interval_ms { 33 };
284
285 /** @brief If true, compositor-reported repeat_info overrides these values. */
287
288 static constexpr auto describe()
289 {
290 return std::make_tuple(
295 Reflect::member("allow_compositor_override", &KeyRepeatConfig::allow_compositor_override));
296 }
297};
298
299/**
300 * @struct TextConfig
301 * @brief Default font configuration for Portal::Text.
302 *
303 * When present, GraphicsSubsystem initializes Portal::Text and attempts to
304 * load the specified font as the system default. Users may call
305 * Portal::Text::set_default_font() at any time after initialization to
306 * replace or augment this.
307 *
308 * When absent, Portal::Text is still initialized but no default atlas is
309 * created; any call to InkPress that requires a default atlas will log an
310 * error until the user sets one explicitly.
311 */
313 /** @brief Font family name forwarded to Platform::find_font(). */
314 std::string family;
315
316 /** @brief Optional style hint (e.g. "Regular", "Bold"). */
317 std::string style;
318
319 /** @brief Glyph rasterization height in pixels. */
320 uint32_t pixel_size { 24 };
321
322 /** @brief Atlas texture dimension (power of two). */
323 uint32_t atlas_size { 512 };
324
325 static constexpr auto describe()
326 {
327 return std::make_tuple(
332 }
333};
334
335struct MAYAFLUX_API GlobalGraphicsConfig {
336 /** @brief Key repeat timing for native Wayland, Win32 and Cocoa backends. */
338
339 /** @brief System-wide configuration for visual stream processing */
341
342 /** @brief Graphics backend configuration */
344
345 /** @brief Resource limits */
347
348 /**
349 * @enum WindowingBackend
350 * @brief Windowing library selection
351 */
352 enum class WindowingBackend : uint8_t {
353 WINDOWS, ///< Native Win32
354 WAYLAND, ///< Native Wayland
355 COCOA, ///< Native Cocoa
356 NONE ///< No windowing (offscreen rendering only)
357 };
358
359 /**
360 * @enum VisualApi
361 * @brief Supported graphics APIs (backend selection)
362 */
363 enum class GraphicsApi : uint8_t {
364 VULKAN,
365 OPENGL,
366 METAL,
367 DIRECTX12
368 };
369
370 /** @brief Target frame rate for visual processing (Hz) */
371 uint32_t target_frame_rate = 60;
372
373#if defined(MAYAFLUX_PLATFORM_WINDOWS)
374#ifndef WIN32_BACKEND
375#error "Windows builds require WIN32_BACKEND"
376#endif // WIN32_BACKEND
377 /** @brief Selected windowing backend */
378 WindowingBackend windowing_backend = WindowingBackend::WINDOWS;
379#elif defined(WAYLAND_BACKEND)
380 /** @brief Selected windowing backend */
381 WindowingBackend windowing_backend = WindowingBackend::WAYLAND;
382#elif defined(COCOA_BACKEND)
383 /** @brief Selected windowing backend */
384 WindowingBackend windowing_backend = WindowingBackend::COCOA;
385#else
386 /** @brief Selected windowing backend */
387 WindowingBackend windowing_backend = WindowingBackend::NONE;
388#endif // defined(MAYAFLUX_PLATFORM_WINDOWS) && defined (WIN32_BACKEND)
389
390 /** @brief Selected graphics API for rendering */
391 GraphicsApi requested_api = GraphicsApi::VULKAN;
392
393 /** @brief Default font for Portal::Text. */
394 TextConfig text_config {
395#if defined(MAYAFLUX_PLATFORM_LINUX)
396 "sans-serif", "", 24, 512
397#elif defined(MAYAFLUX_PLATFORM_MACOS)
398 "Helvetica Neue", "", 24, 512
399#elif defined(MAYAFLUX_PLATFORM_WINDOWS)
400 "Segoe UI", "", 24, 512
401#else
402 "sans-serif", "", 24, 512
403#endif
404 };
405
406 static constexpr auto describe()
407 {
408 return std::make_tuple(
409 Reflect::member("key_repeat_config", &GlobalGraphicsConfig::key_repeat_config),
410 Reflect::member("surface_info", &GlobalGraphicsConfig::surface_info),
411 Reflect::member("backend_info", &GlobalGraphicsConfig::backend_info),
412 Reflect::member("resource_limits", &GlobalGraphicsConfig::resource_limits),
413 Reflect::member("target_frame_rate", &GlobalGraphicsConfig::target_frame_rate),
414 Reflect::member("windowing_backend", &GlobalGraphicsConfig::windowing_backend),
415 Reflect::member("requested_api", &GlobalGraphicsConfig::requested_api),
416 Reflect::member("text_config", &GlobalGraphicsConfig::text_config));
417 }
418};
419
420//==============================================================================
421// PER-WINDOW CREATION INFO (Parallel to audio ChannelConfig)
422//==============================================================================
423
424/**
425 * @struct WindowCreateInfo
426 * @brief Configuration for creating a single window instance
427 *
428 * Lightweight per-window parameters. Most settings inherited from
429 * GraphicsSurfaceInfo. This is like creating a new audio channel - you specify
430 * only what differs from global defaults.
431 */
432struct MAYAFLUX_API WindowCreateInfo {
433 /** @brief Window title/identifier */
434 std::string title { "MayaFlux Window" };
435
436 /** @brief Initial window dimensions */
437 uint32_t width { 1920 };
438 uint32_t height { 1080 };
439
440 /** @brief Target monitor ID (-1 = primary monitor) */
441 int32_t monitor_id { -1 };
442
443 /** @brief Start in fullscreen mode */
444 bool fullscreen {};
445
446 /** @brief Window can be resized by user */
447 bool resizable { true };
448
449 /** @brief Show OS window decorations (title bar, borders) */
450 bool decorated { true };
451
452 /** @brief Transparent framebuffer (compositing) */
453 bool transparent {};
454
455 /** @brief Window always on top */
456 bool floating {};
457
458 /** @brief Register this window for processing (if false, no grpahics API handles visuals) */
459 bool register_for_processing { true };
460
461 /** @brief Override global surface format (nullopt = use global default) */
462 std::optional<GraphicsSurfaceInfo::SurfaceFormat> surface_format;
463
464 /** @brief Override global present mode (nullopt = use global default) */
465 std::optional<GraphicsSurfaceInfo::PresentMode> present_mode;
466
467 /** @brief Container dimensions (channels) */
468 struct {
469 uint32_t color_channels { 4 };
470 bool has_depth {};
471 bool has_stencil {};
472 } container_format;
473
474 std::array<float, 4> clear_color { { 0.0F, 0.0F, 0.0F, 1.0F } };
475};
476
477//==============================================================================
478// WINDOW RUNTIME STATE (Read-only, updated by subsystem)
479//==============================================================================
480
481/**
482 * @struct WindowState
483 * @brief Runtime state of a window (mutable by system, read by user)
484 *
485 * You don't set these - the windowing subsystem updates them as events occur.
486 */
488 uint32_t current_width = 0;
489 uint32_t current_height = 0;
490
491 bool is_visible = true;
492 bool is_focused = false;
493 bool is_minimized = false;
494 bool is_maximized = false;
495 bool is_hovered = false;
496
497 uint64_t frame_count = 0;
498 double last_present_time = 0.0;
499 double average_frame_time = 0.0;
500};
501
502//==============================================================================
503// INPUT CONFIGURATION (Runtime mutable)
504//==============================================================================
505
506/**
507 * @enum CursorMode
508 * @brief Cursor visibility and behavior
509 */
510enum class CursorMode : uint8_t {
511 NORMAL, ///< Visible and movable
512 HIDDEN, ///< Invisible but movable
513 DISABLED, ///< Invisible and locked (FPS camera)
514 CAPTURED, ///< Invisible, locked, raw motion
515};
516
517/**
518 * @struct InputConfig
519 * @brief Input configuration for a window
520 *
521 * Can be changed at runtime via window->set_input_config()
522 */
532
533//==============================================================================
534// WINDOW EVENTS
535//==============================================================================
536
537/**
538 * @enum WindowEventType
539 * @brief Types of window and input events
540 */
569
570/**
571 * @struct WindowEvent
572 * @brief Event data for window and input events
573 */
576 double timestamp;
577
578 struct ResizeData {
579 uint32_t width, height;
580 };
581 struct KeyData {
582 int16_t key;
583 int32_t scancode, mods;
584 };
585 /// @brief Resolved Unicode codepoint, layout/shift/dead-key/IME composed.
586 struct TextData {
587 uint32_t codepoint;
588 };
590 double x, y;
591 };
593 int8_t button;
594 int32_t mods;
595 };
596 struct ScrollData {
598 };
599
600 using EventData = std::variant<
601 std::monostate,
603 KeyData,
604 TextData,
608 std::any>;
609
611
612 WindowEvent() = default;
613 WindowEvent(const WindowEvent&) = default;
614 WindowEvent(WindowEvent&&) noexcept = default;
615 WindowEvent& operator=(const WindowEvent&) = default;
616 WindowEvent& operator=(WindowEvent&&) noexcept = default;
617 ~WindowEvent() = default;
618};
619
620using WindowEventCallback = std::function<void(const WindowEvent&)>;
621
622//==============================================================================
623// MONITOR INFORMATION (System query, not per-window config)
624//==============================================================================
625
626/**
627 * @struct VideoMode
628 * @brief Monitor video mode
629 */
630struct VideoMode {
631 uint32_t width, height;
632 uint32_t refresh_rate;
633 uint8_t red_bits, green_bits, blue_bits;
634
635 bool operator==(const VideoMode& other) const
636 {
637 return width == other.width && height == other.height && refresh_rate == other.refresh_rate;
638 }
639};
640
641/**
642 * @struct MonitorInfo
643 * @brief Information about a physical display
644 */
646 int32_t id;
647 std::string name;
648 int32_t width_mm, height_mm;
650 bool is_primary = false;
651};
652
653} // namespace MayaFlux::Core
bool format
uint32_t width
uint32_t height
CursorMode
Cursor visibility and behavior.
@ DISABLED
Invisible and locked (FPS camera)
@ NORMAL
Visible and movable.
@ CAPTURED
Invisible, locked, raw motion.
@ HIDDEN
Invisible but movable.
WindowEventType
Types of window and input events.
std::function< void(const WindowEvent &)> WindowEventCallback
constexpr auto member(std::string_view key, T Class::*ptr)
Definition Mirror.hpp:37
GraphicsSurfaceInfo surface_info
System-wide configuration for visual stream processing.
WindowingBackend
Windowing library selection.
GraphicsResourceLimits resource_limits
Resource limits.
GraphicsBackendInfo backend_info
Graphics backend configuration.
KeyRepeatConfig key_repeat_config
Key repeat timing for native Wayland, Win32 and Cocoa backends.
std::vector< std::string > required_extensions
Backend-specific extensions to request.
MemoryStrategy
Memory allocation strategy.
DevicePreference
Preferred physical device class when no explicit selector matches.
std::vector< std::string > optional_extensions
std::string device_name
Case-insensitive substring of the device name; empty disables.
CommandPooling
Command buffer pooling strategy.
ShaderCompilation
Shader compilation strategy.
std::string device_uuid
Device UUID as 32 lowercase hex chars, no separators; empty disables.
Configuration for graphics API backend (Vulkan/OpenGL/etc.)
Resource limits and budgets for graphics subsystem.
ColorSpace
Default color space for window surfaces.
SurfaceFormat
Default pixel format for window surfaces (Vulkan-compatible)
PresentMode
Frame presentation strategy.
std::unordered_map< std::string, std::any > backend_options
Backend-specific configuration parameters.
System-wide configuration for visual stream processing.
Input configuration for a window.
uint32_t interval_ms
Interval between repeat events in milliseconds.
uint32_t text_interval_ms
Interval between repeated text character events in milliseconds.
uint32_t initial_delay_ms
Delay before repeat starts in milliseconds.
bool allow_compositor_override
If true, compositor-reported repeat_info overrides these values.
uint32_t text_initial_delay_ms
Delay before text character repeat starts in milliseconds.
Key repeat timing for native window backends.
Information about a physical display.
std::string style
Optional style hint (e.g.
static constexpr auto describe()
uint32_t atlas_size
Atlas texture dimension (power of two).
uint32_t pixel_size
Glyph rasterization height in pixels.
std::string family
Font family name forwarded to Platform::find_font().
Default font configuration for Portal::Text.
bool operator==(const VideoMode &other) const
std::optional< GraphicsSurfaceInfo::PresentMode > present_mode
Override global present mode (nullopt = use global default)
std::optional< GraphicsSurfaceInfo::SurfaceFormat > surface_format
Override global surface format (nullopt = use global default)
Configuration for creating a single window instance.
Resolved Unicode codepoint, layout/shift/dead-key/IME composed.
std::variant< std::monostate, ResizeData, KeyData, TextData, MousePosData, MouseButtonData, ScrollData, std::any > EventData
WindowEvent(const WindowEvent &)=default
WindowEvent(WindowEvent &&) noexcept=default
Event data for window and input events.
Runtime state of a window (mutable by system, read by user)