Add a transition macro system

This commit is contained in:
Pierre Krieger 2017-01-28 15:00:17 +01:00
parent f1d70d351e
commit 422b332c1b
17 changed files with 162 additions and 87 deletions

View file

@ -2,6 +2,17 @@ use std::path::PathBuf;
#[derive(Clone, Debug)]
pub enum Event {
WindowEvent {
// window_id: ,
event: WindowEvent,
}
}
#[derive(Clone, Debug)]
pub enum WindowEvent {
// TODO: remove ; can break the lib internally so be careful
Awakened,
/// The size of the window has changed.
Resized(u32, u32),
@ -49,9 +60,6 @@ pub enum Event {
/// is being pressed) and stage (integer representing the click level).
TouchpadPressure(f32, i64),
/// The event loop was woken up by another thread.
Awakened,
/// The window needs to be redrawn.
Refresh,
@ -60,7 +68,6 @@ pub enum Event {
/// The parameter is true if app was suspended, and false if it has been resumed.
Suspended(bool),
/// Touch event has been received
Touch(Touch)
}