limnus_screen/
lib.rs

1/*
2 * Copyright (c) Peter Bjorklund. All rights reserved. https://github.com/swamp/limnus
3 * Licensed under the MIT License. See LICENSE in the project root for license information.
4 */
5use int_math::UVec2;
6use limnus_message::prelude::Message;
7use limnus_resource::prelude::*;
8
9#[derive(Debug, Clone)]
10pub enum ScreenMode {
11    WindowedFullscreen,
12    Windowed,
13    WindowedOnTop,
14}
15
16#[derive(Debug, Resource, Clone)]
17pub struct Window {
18    pub mode: ScreenMode,
19    pub title: String,
20    pub requested_surface_size: UVec2,
21    pub minimal_surface_size: UVec2,
22}
23
24#[derive(Message, Debug)]
25pub enum WindowMessage {
26    CursorMoved(UVec2),
27    WindowCreated(),
28    Resized(UVec2),
29}