#[macro_use]
mod event_handlers;
mod window_base;
pub (crate) use window_base::WindowBase;
pub use window_base::default_draw_parameters;
mod window_page;
pub use window_page::WindowPage;
mod window;
pub use window::Window;
mod settings;
pub use settings::*;
mod mouse_cursor;
pub use mouse_cursor::MouseCursor;
use glium::glutin::event::{
ModifiersState,
MouseScrollDelta,
MouseButton,
};
#[cfg(feature="file_drop")]
use std::path::PathBuf;
pub static mut mouse_cursor:MouseCursor=MouseCursor::new();
pub static mut window_width:f32=0f32;
pub static mut window_height:f32=0f32;
pub static mut window_center:[f32;2]=[0f32;2];
#[cfg(feature="fps_counter")]
pub static mut fps:u32=0;
#[cfg(feature="ups_counter")]
pub static mut ups:u32=0;
#[derive(PartialEq)]
pub (crate) enum EventLoopState<O:PartialEq>{
Running,
CloseRequested,
Closed(O),
}
#[derive(Clone,Debug)]
pub enum InnerWindowEvent{
EventLoopCloseRequested,
Update,
}
#[derive(Clone,Debug)]
pub enum WindowEvent{
#[cfg(not(feature="lazy"))]
Update,
RedrawRequested,
CloseRequested,
EventLoopClosed,
Suspended,
Resumed,
Focused(bool),
Resized([u32;2]),
Moved([i32;2]),
MouseMovementDelta([f32;2]),
MouseWheelScroll(MouseScrollDelta),
MousePressed(MouseButton),
MouseReleased(MouseButton),
KeyboardPressed(KeyboardButton),
KeyboardReleased(KeyboardButton),
CharacterInput(char),
ModifiersChanged(ModifiersState),
#[cfg(feature="file_drop")]
DroppedFile(PathBuf),
#[cfg(feature="file_drop")]
HoveredFile(PathBuf),
#[cfg(feature="file_drop")]
HoveredFileCancelled,
}
#[derive(Clone,PartialEq,Debug)]
#[repr(u32)]
pub enum KeyboardButton{
One,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Zero,
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
M,
N,
O,
P,
Q,
R,
S,
T,
U,
V,
W,
X,
Y,
Z,
Escape,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
F13,
F14,
F15,
F16,
F17,
F18,
F19,
F20,
F21,
F22,
F23,
F24,
Screenshot,
Scroll,
Pause,
Insert,
Home,
Delete,
End,
PageDown,
PageUp,
Left,
Up,
Right,
Down,
Backspace,
Enter,
Space,
Compose,
Caret,
Numlock,
Numpad0,
Numpad1,
Numpad2,
Numpad3,
Numpad4,
Numpad5,
Numpad6,
Numpad7,
Numpad8,
Numpad9,
AbntC1,
AbntC2,
Add,
Apostrophe,
Apps,
At,
Ax,
Backslash,
Calculator,
Capital,
Colon,
Comma,
Convert,
Decimal,
Divide,
Equals,
Grave,
Kana,
Kanji,
LeftAlt,
LeftBracket,
LeftControl,
LeftShift,
LeftWin,
Mail,
MediaSelect,
MediaStop,
Minus,
Multiply,
Mute,
MyComputer,
NavigateForward,
NavigateBackward,
NextTrack,
NoConvert,
NumpadComma,
NumpadEnter,
NumpadEquals,
OEM102,
Period,
PlayPause,
Power,
PrevTrack,
RightAlt,
RightBracket,
RightControl,
RightShift,
RightWin,
Semicolon,
Slash,
Sleep,
Stop,
Subtract,
Sysrq,
Tab,
Underline,
Unlabeled,
VolumeDown,
VolumeUp,
Wake,
WebBack,
WebFavorites,
WebForward,
WebHome,
WebRefresh,
WebSearch,
WebStop,
Yen,
Copy,
Paste,
Cut,
Unknown,
}