Feat: add hidden mode and new documentation
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
//! Window event types for mouse, keyboard, and window lifecycle.
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use keyboard_types::{KeyboardEvent, Modifiers};
|
||||
|
||||
use crate::{Point, WindowInfo};
|
||||
|
||||
/// A mouse button identifier.
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
|
||||
pub enum MouseButton {
|
||||
Left,
|
||||
@@ -34,6 +37,7 @@ pub enum ScrollDelta {
|
||||
},
|
||||
}
|
||||
|
||||
/// A mouse input event.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum MouseEvent {
|
||||
/// The mouse cursor was moved
|
||||
@@ -116,6 +120,7 @@ pub enum MouseEvent {
|
||||
},
|
||||
}
|
||||
|
||||
/// A window lifecycle event.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum WindowEvent {
|
||||
Resized(WindowInfo),
|
||||
@@ -124,6 +129,7 @@ pub enum WindowEvent {
|
||||
WillClose,
|
||||
}
|
||||
|
||||
/// Top-level input event dispatched to a [`WindowHandler`](crate::WindowHandler).
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Event {
|
||||
Mouse(MouseEvent),
|
||||
@@ -131,6 +137,7 @@ pub enum Event {
|
||||
Window(WindowEvent),
|
||||
}
|
||||
|
||||
/// The effect to apply when a drag-and-drop operation completes.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum DropEffect {
|
||||
Copy,
|
||||
@@ -139,6 +146,7 @@ pub enum DropEffect {
|
||||
Scroll,
|
||||
}
|
||||
|
||||
/// Data payload carried by a drag-and-drop operation.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum DropData {
|
||||
None,
|
||||
|
||||
Reference in New Issue
Block a user