aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-07-30 13:11:49 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-07-30 13:11:49 +0200
commitaa7d88dbda1d000ce6e7d2c315a7496ca0e08471 (patch)
tree9b34c1bae777772fb6ccdc281c877a27e3781ed8
parent838cc2b325d85735c7db40fba389bf120b282814 (diff)
downloadglutin-aa7d88dbda1d000ce6e7d2c315a7496ca0e08471.tar.gz
glutin-aa7d88dbda1d000ce6e7d2c315a7496ca0e08471.zip
Fix bad events
-rw-r--r--src/events.rs5
-rw-r--r--src/lib.rs4
-rw-r--r--src/win32/mod.rs4
-rw-r--r--src/x11/mod.rs4
4 files changed, 7 insertions, 10 deletions
diff --git a/src/events.rs b/src/events.rs
index 3e2143a..826a7cb 100644
--- a/src/events.rs
+++ b/src/events.rs
@@ -1,11 +1,8 @@
#[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),
+ Resized(uint, uint),
/// The position of the window has changed.
Moved(int, int),
diff --git a/src/lib.rs b/src/lib.rs
index 3471d3d..44f3d9b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,9 +1,9 @@
#![feature(unsafe_destructor)]
+#![feature(globs)]
extern crate libc;
-pub use events::{Event, Element, PositionChanged, SizeChanged, Closed, CursorPositionChanged, Focused};
-pub use events::{Iconified, NeedRefresh, Pressed, Released};
+pub use events::*;
pub use hints::{Hints, ClientAPI, Profile};
#[cfg(windows)]
diff --git a/src/win32/mod.rs b/src/win32/mod.rs
index 9d44e02..bc268fc 100644
--- a/src/win32/mod.rs
+++ b/src/win32/mod.rs
@@ -362,10 +362,10 @@ extern "stdcall" fn callback(window: ffi::HWND, msg: ffi::UINT,
},
ffi::WM_SIZE => {
- use SizeChanged;
+ use Resized;
let w = ffi::LOWORD(lparam as ffi::DWORD) as uint;
let h = ffi::HIWORD(lparam as ffi::DWORD) as uint;
- send_event(window, SizeChanged(w, h));
+ send_event(window, Resized(w, h));
0
},
diff --git a/src/x11/mod.rs b/src/x11/mod.rs
index 68a061b..b099ef5 100644
--- a/src/x11/mod.rs
+++ b/src/x11/mod.rs
@@ -173,9 +173,9 @@ impl Window {
},
ffi::ResizeRequest => {
- use SizeChanged;
+ use Resized;
let rs_event: &ffi::XResizeRequestEvent = unsafe { mem::transmute(&xev) };
- events.push(SizeChanged(rs_event.width as uint, rs_event.height as uint));
+ events.push(Resized(rs_event.width as uint, rs_event.height as uint));
},
ffi::MotionNotify => {