Struct gust_render::window::Window
source · Expand description
Window struct Define a struct by many thing in glfw
Fields
height: u32
width: u32
Implementations
sourceimpl<'a> Window
impl<'a> Window
Window structure implementation
pub fn set_mouse_pos<T: Scalar + Into<f32>>(&mut self, vec: Vector<T>)
pub fn poll<T: Into<Option<EventType>>>(&mut self, event: T)
pub fn unpoll<T: Into<Option<EventType>>>(&mut self, event: T)
pub fn mouse_pos(&self) -> Vector<f32>
sourcepub fn hide_cursor(&mut self)
pub fn hide_cursor(&mut self)
Change cursor to hidden mode
sourcepub fn disable_cursor(&mut self)
pub fn disable_cursor(&mut self)
Change cursor to disabled mode
sourcepub fn enable_cursor(&mut self)
pub fn enable_cursor(&mut self)
Change cursor to normal mode
sourcepub fn poll_events(&mut self)
pub fn poll_events(&mut self)
Poll the event
sourcepub fn set_clear_color(&mut self, new_color: Color)
pub fn set_clear_color(&mut self, new_color: Color)
Set clear color
pub fn set_view(&mut self, view: View)
pub fn view(&self) -> &View
pub fn view_mut(&mut self) -> &mut View
pub fn set_fps_limit(&mut self, limit: u32) -> u32
pub fn fps_limit(&self) -> u32
pub fn event(&self) -> &EventReceiver
pub fn event_mut(&mut self) -> &mut EventReceiver
Trait Implementations
sourceimpl Drawer for Window
impl Drawer for Window
sourcefn draw<T: Drawable>(&mut self, drawable: &T)
fn draw<T: Drawable>(&mut self, drawable: &T)
Function that draw on itself needed by everything that can be draw.
sourcefn draw_mut<T: DrawableMut>(&mut self, drawable: &mut T)
fn draw_mut<T: DrawableMut>(&mut self, drawable: &mut T)
Function that can draw a DrawableMut.
sourcefn draw_with_context<T: Drawable>(
&mut self,
drawable: &mut T,
context: &mut Context<'_>
)
fn draw_with_context<T: Drawable>(
&mut self,
drawable: &mut T,
context: &mut Context<'_>
)
Draw with context a Drawable.
sourcefn draw_with_context_mut<T: DrawableMut>(
&mut self,
drawable: &mut T,
context: &mut Context<'_>
)
fn draw_with_context_mut<T: DrawableMut>(
&mut self,
drawable: &mut T,
context: &mut Context<'_>
)
Draw with context fonction if you want to define you own fonction
fn get_sizes(&self) -> Vector<f32>
fn get_center(&self) -> Vector<f32>
fn projection(&self) -> &Matrix4<f32>
Auto Trait Implementations
impl RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl UnwindSafe for Window
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.sourceimpl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
sourcefn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresourcefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).sourceunsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.sourcefn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.