Add iterators for events and WindowBuilder
This commit is contained in:
parent
959613870c
commit
5dda167021
7 changed files with 104 additions and 148 deletions
|
|
@ -6,7 +6,7 @@ use std::sync::atomics::AtomicBool;
|
|||
use std::ptr;
|
||||
use super::{event, ffi};
|
||||
use super::{MonitorID, Window};
|
||||
use {Event, Hints};
|
||||
use Event;
|
||||
|
||||
/// Stores the current window and its events dispatcher.
|
||||
///
|
||||
|
|
@ -15,7 +15,7 @@ use {Event, Hints};
|
|||
local_data_key!(WINDOW: (ffi::HWND, Sender<Event>))
|
||||
|
||||
pub fn new_window(dimensions: Option<(uint, uint)>, title: &str,
|
||||
_hints: &Hints, monitor: Option<MonitorID>)
|
||||
monitor: Option<MonitorID>)
|
||||
-> Result<Window, String>
|
||||
{
|
||||
use std::mem;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use std::sync::atomics::AtomicBool;
|
||||
use std::ptr;
|
||||
use {Event, Hints};
|
||||
use Event;
|
||||
|
||||
pub use self::monitor::{MonitorID, get_available_monitors, get_primary_monitor};
|
||||
|
||||
|
|
@ -36,10 +36,10 @@ pub struct Window {
|
|||
impl Window {
|
||||
/// See the docs if the crate root file.
|
||||
pub fn new(dimensions: Option<(uint, uint)>, title: &str,
|
||||
hints: &Hints, monitor: Option<MonitorID>)
|
||||
monitor: Option<MonitorID>)
|
||||
-> Result<Window, String>
|
||||
{
|
||||
init::new_window(dimensions, title, hints, monitor)
|
||||
init::new_window(dimensions, title, monitor)
|
||||
}
|
||||
|
||||
/// See the docs if the crate root file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue