Change return type of border_size to u16

This commit is contained in:
Tim Diekmann
2017-11-30 10:56:18 +01:00
committed by GitHub
parent 9f6ad8ebaf
commit 68ad612a69
+2 -2
View File
@@ -1161,13 +1161,13 @@ impl Window {
}
/// Use this function to get the size of a window's borders (decorations) around the client area.
pub fn border_size(&self) -> (i32, i32, i32, i32) {
pub fn border_size(&self) -> (u16, u16, u16, u16) {
let mut top: c_int = 0;
let mut left: c_int = 0;
let mut bottom: c_int = 0;
let mut right: c_int = 0;
unsafe { sys::SDL_GetWindowBordersSize(self.context.raw, &mut top, &mut left, &mut bottom, &mut right) };
(top as i32, left as i32, bottom as i32, right as i32)
(top as u16, left as u16, bottom as u16, right as u16)
}
pub fn set_size(&mut self, width: u32, height: u32)