aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11')
-rw-r--r--src/x11/ffi.rs4
-rw-r--r--src/x11/mod.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/x11/ffi.rs b/src/x11/ffi.rs
index fe91033..8ab6f45 100644
--- a/src/x11/ffi.rs
+++ b/src/x11/ffi.rs
@@ -1,5 +1,5 @@
#![allow(dead_code)]
-#![allow(non_snake_case_functions)]
+#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
use libc;
@@ -27,7 +27,7 @@ pub type VisualID = libc::c_ulong; // TODO: not sure
pub type Window = XID;
pub type XrmDatabase = *const (); // TODO: not sure
pub type XIC = *mut ();
-pub type XID = uint;
+pub type XID = libc::uintptr_t;
pub type XIM = *mut ();
pub type Screen = ();
diff --git a/src/x11/mod.rs b/src/x11/mod.rs
index 315c2b3..80a84f7 100644
--- a/src/x11/mod.rs
+++ b/src/x11/mod.rs
@@ -172,7 +172,7 @@ impl Window {
as *const u8) as *const ();
}
- addr.to_option().map(|addr| {
+ addr.as_ref().map(|addr| {
let addr: extern "system" fn(*mut ffi::Display, ffi::GLXFBConfig, ffi::GLXContext,
ffi::Bool, *const libc::c_int) -> ffi::GLXContext = mem::transmute(addr);
addr
@@ -181,7 +181,7 @@ impl Window {
// creating IM
let im = unsafe {
- let im = ffi::XOpenIM(display, ptr::null(), ptr::mut_null(), ptr::mut_null());
+ let im = ffi::XOpenIM(display, ptr::null(), ptr::null_mut(), ptr::null_mut());
if im.is_null() {
return Err(format!("XOpenIM failed"));
}
@@ -320,7 +320,7 @@ impl Window {
unimplemented!()
}
- pub fn set_inner_size(&self, x: uint, y: uint) {
+ pub fn set_inner_size(&self, _x: uint, _y: uint) {
unimplemented!()
}
@@ -390,7 +390,7 @@ impl Window {
let raw_ev: *mut ffi::XKeyEvent = event;
let count = ffi::Xutf8LookupString(self.ic, mem::transmute(raw_ev),
mem::transmute(buffer.as_mut_ptr()),
- buffer.len() as libc::c_int, ptr::mut_null(), ptr::mut_null());
+ buffer.len() as libc::c_int, ptr::null_mut(), ptr::null_mut());
str::from_utf8(buffer.as_slice().slice_to(count as uint))
.unwrap_or("").to_string()