Cleanup crate root

This commit is contained in:
Tomaka17 2014-07-27 12:59:45 +02:00
parent 1cc0447c5e
commit 13b79ffaaf
3 changed files with 178 additions and 97 deletions

33
src/events.rs Normal file
View file

@ -0,0 +1,33 @@
#[deriving(Clone,Show)]
pub enum Event {
/// The position of the window has changed.
PositionChanged(uint, uint),
/// The size of the window has changed.
SizeChanged(uint, uint),
/// The window has been closed.
Closed,
/// The cursor has moved on the window.
///
/// The parameter are the (x,y) coords in pixels relative to the top-left corner of the window.
CursorPositionChanged(uint, uint),
/// The window gained or lost focus.
///
/// The parameter is true if the window has gained focus, and false if it has lost focus.
Focused(bool),
/// The window has been turned into an icon or restored.
///
/// The parameter is true if the window has been iconified, and false if it has been restored.
Iconified(bool),
/// The system asked that the content of this window must be redrawn.
NeedRefresh,
/// The size of the framebuffer of the window has changed.
FramebufferSizeChanged(uint, uint),
}