aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-07-31 09:42:50 +0200
committerTomaka17 <pierre.krieger1708@gmail.com>2014-07-31 09:42:50 +0200
commit8911e162ce526dd8025b7740fd643041d5624a54 (patch)
tree2ca40054a63729813f6905cdab8e7a48542c45c8 /src/lib.rs
parent270e290af9f83590fe81504ec555d3a7da3cc303 (diff)
downloadglutin-8911e162ce526dd8025b7740fd643041d5624a54.tar.gz
glutin-8911e162ce526dd8025b7740fd643041d5624a54.zip
MonitorID now defined by the implementations
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f8725b5..061f85a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -23,7 +23,8 @@ mod x11;
mod events;
mod hints;
-pub struct MonitorID(uint);
+/// Identifier for a monitor.
+pub struct MonitorID(winimpl::MonitorID);
/// Represents an OpenGL context and the Window or environment around it.
///
@@ -85,7 +86,12 @@ impl Window {
hints: &Hints, monitor: Option<MonitorID>)
-> Result<Window, String>
{
+ // extracting the monitor ID
+ let monitor = monitor.map(|id| { let MonitorID(id) = id; id });
+
+ // creating the window
let win = try!(winimpl::Window::new(dimensions, title, hints, monitor));
+
Ok(Window{
window: win,
nosend: std::kinds::marker::NoSend,