aboutsummaryrefslogtreecommitdiffstats
path: root/src/events.rs
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-07-27 12:59:45 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-07-27 12:59:45 +0200
commit13b79ffaaf3877531e5ebbcc3ae0068dae5e4516 (patch)
treea0adb2a503126a5e79af848433a0413df8a4ba32 /src/events.rs
parent1cc0447c5ea5beb92d53d71f3bdc51f0bca33cd2 (diff)
downloadglutin-13b79ffaaf3877531e5ebbcc3ae0068dae5e4516.tar.gz
glutin-13b79ffaaf3877531e5ebbcc3ae0068dae5e4516.zip
Cleanup crate root
Diffstat (limited to 'src/events.rs')
-rw-r--r--src/events.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/events.rs b/src/events.rs
new file mode 100644
index 0000000..f66e6a2
--- /dev/null
+++ b/src/events.rs
@@ -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),
+}