Remove deprecated functions

This commit is contained in:
Pierre Krieger 2015-04-03 18:36:57 +02:00
parent 424cc5ea49
commit b99309bee2
4 changed files with 11 additions and 11 deletions

View file

@ -142,7 +142,7 @@ pub enum GlRequest {
}, },
} }
#[derive(Debug, Copy)] #[derive(Debug, Copy, Clone)]
pub enum MouseCursor { pub enum MouseCursor {
/// The platform-dependent default cursor. /// The platform-dependent default cursor.
Default, Default,
@ -199,7 +199,7 @@ pub enum MouseCursor {
} }
/// Describes how glutin handles the cursor. /// Describes how glutin handles the cursor.
#[derive(Debug, Copy)] #[derive(Debug, Copy, Clone)]
pub enum CursorState { pub enum CursorState {
/// Normal cursor behavior. /// Normal cursor behavior.
Normal, Normal,

View file

@ -40,7 +40,7 @@ pub fn new_window(builder: BuilderAttribs<'static>, builder_sharelists: Option<C
{ {
// initializing variables to be sent to the task // initializing variables to be sent to the task
let title = OsStr::from_str(&builder.title).encode_wide().chain(Some(0).into_iter()) let title = OsStr::new(&builder.title).encode_wide().chain(Some(0).into_iter())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let (tx, rx) = channel(); let (tx, rx) = channel();
@ -267,7 +267,7 @@ unsafe fn init(title: Vec<u16>, builder: BuilderAttribs<'static>,
} }
unsafe fn register_window_class() -> Vec<u16> { unsafe fn register_window_class() -> Vec<u16> {
let class_name = OsStr::from_str("Window Class").encode_wide().chain(Some(0).into_iter()) let class_name = OsStr::new("Window Class").encode_wide().chain(Some(0).into_iter())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let class = winapi::WNDCLASSEXW { let class = winapi::WNDCLASSEXW {
@ -530,7 +530,7 @@ unsafe fn set_pixel_format(hdc: &WindowWrapper, id: libc::c_int) -> Result<(), C
} }
unsafe fn load_opengl32_dll() -> Result<winapi::HMODULE, CreationError> { unsafe fn load_opengl32_dll() -> Result<winapi::HMODULE, CreationError> {
let name = OsStr::from_str("opengl32.dll").encode_wide().chain(Some(0).into_iter()) let name = OsStr::new("opengl32.dll").encode_wide().chain(Some(0).into_iter())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let lib = kernel32::LoadLibraryW(name.as_ptr()); let lib = kernel32::LoadLibraryW(name.as_ptr());

View file

@ -111,7 +111,7 @@ impl Window {
/// ///
/// Calls SetWindowText on the HWND. /// Calls SetWindowText on the HWND.
pub fn set_title(&self, text: &str) { pub fn set_title(&self, text: &str) {
let text = OsStr::from_str(text).encode_wide().chain(Some(0).into_iter()) let text = OsStr::new(text).encode_wide().chain(Some(0).into_iter())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
unsafe { unsafe {

View file

@ -7,7 +7,7 @@ use std::cell::Cell;
use std::sync::atomic::AtomicBool; use std::sync::atomic::AtomicBool;
use std::collections::VecDeque; use std::collections::VecDeque;
use super::ffi; use super::ffi;
use std::sync::{Arc, Mutex, Once, ONCE_INIT, Weak}; use std::sync::{Arc, Mutex, Once, ONCE_INIT};
use Api; use Api;
use CursorState; use CursorState;