aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/mod.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2014-08-02 10:48:17 +0200
committertomaka <pierre.krieger1708@gmail.com>2014-08-02 10:48:17 +0200
commit13c73cce5edde5b2eab3c0a1ef01a34eadf2949b (patch)
tree12e4f394fbe50dbfeed74bbbb34a7a7a3692150a /src/x11/mod.rs
parentaf756b9add1afb3c752ee2dec9e2d11fcbf5b2e0 (diff)
parent49b0a2017068925a658bb861b75efdf56dddda12 (diff)
downloadglutin-13c73cce5edde5b2eab3c0a1ef01a34eadf2949b.tar.gz
glutin-13c73cce5edde5b2eab3c0a1ef01a34eadf2949b.zip
Merge pull request #9 from tomaka/pass-builder-to-impl-new
Now passing WindowBuilder to implwin::Window::new
Diffstat (limited to 'src/x11/mod.rs')
-rw-r--r--src/x11/mod.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/x11/mod.rs b/src/x11/mod.rs
index bc89aed..6e50903 100644
--- a/src/x11/mod.rs
+++ b/src/x11/mod.rs
@@ -1,4 +1,4 @@
-use Event;
+use {Event, WindowBuilder};
use libc;
use std::{mem, ptr};
use std::sync::atomics::AtomicBool;
@@ -33,9 +33,11 @@ impl MonitorID {
}
impl Window {
- pub fn new(dimensions: Option<(uint, uint)>, title: &str, _: Option<MonitorID>)
- -> Result<Window, String>
- {
+ pub fn new(builder: WindowBuilder) -> Result<Window, String> {
+ // TODO: temporary
+ let dimensions = Some(builder.dimensions);
+ let title = builder.title.as_slice();
+
// calling XOpenDisplay
let display = unsafe {
let display = ffi::XOpenDisplay(ptr::null());