pub struct Window { /* private fields */ }
Implementations§
Source§impl Window
impl Window
pub fn set_cursor_type(&self, cursor_type: CursorType)
pub fn set_cursor_position(&self, position: Vec2<f64>)
pub fn cursor_position(&self) -> Vec2<f64>
Source§impl Window
impl Window
pub fn new(title: &str, vsync: bool) -> Self
pub fn swap_buffers(&self)
pub fn real_size(&self) -> Vec2<usize>
pub fn size(&self) -> Vec2<usize>
pub fn ugli(&self) -> &Rc<Ugli>
pub fn should_close(&self) -> bool
pub fn is_key_pressed(&self, key: Key) -> bool
pub fn pressed_keys(&self) -> HashSet<Key>
pub fn mouse_pos(&self) -> Vec2<f64>
pub fn set_fullscreen(&self, fullscreen: bool)
pub fn is_fullscreen(&self) -> bool
pub fn toggle_fullscreen(&self)
Auto Trait Implementations§
impl !Freeze for Window
impl !RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl !UnwindSafe for Window
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more