Struct speedy2d::Window [−][src]
Struct representing a window.
Implementations
impl Window<()>
[src]
pub fn new_centered<Str, Size>(
title: Str,
size: Size
) -> Result<Window<()>, BacktraceError<WindowCreationError>> where
Str: AsRef<str>,
Size: Into<Vector2<u32>>,
[src]
title: Str,
size: Size
) -> Result<Window<()>, BacktraceError<WindowCreationError>> where
Str: AsRef<str>,
Size: Into<Vector2<u32>>,
Create a new window, centered in the middle of the primary monitor.
pub fn new_fullscreen_borderless<Str>(
title: Str
) -> Result<Window<()>, BacktraceError<WindowCreationError>> where
Str: AsRef<str>,
[src]
title: Str
) -> Result<Window<()>, BacktraceError<WindowCreationError>> where
Str: AsRef<str>,
Create a new window, in fullscreen borderless mode on the primary monitor.
pub fn new_with_options(
title: &str,
options: WindowCreationOptions
) -> Result<Window<()>, BacktraceError<WindowCreationError>>
[src]
title: &str,
options: WindowCreationOptions
) -> Result<Window<()>, BacktraceError<WindowCreationError>>
Create a new window with the specified options.
impl<UserEventType: 'static> Window<UserEventType>
[src]
pub fn new_with_user_events(
title: &str,
options: WindowCreationOptions
) -> Result<Self, BacktraceError<WindowCreationError>>
[src]
title: &str,
options: WindowCreationOptions
) -> Result<Self, BacktraceError<WindowCreationError>>
Create a new window with the specified options, with support for user events. See window::UserEventSender.
pub fn create_user_event_sender(&self) -> UserEventSender<UserEventType>
[src]
Creates a window::UserEventSender, which can be used to post custom events to this event loop from another thread.
If calling this, specify the type of the event data using
Window::<YourTypeHere>::new_with_user_events()
.
See UserEventSender::send_event, WindowHandler::on_user_event.
pub fn run_loop<H>(self, handler: H) -> ! where
H: WindowHandler<UserEventType> + 'static,
[src]
H: WindowHandler<UserEventType> + 'static,
Run the window event loop, with the specified callback handler.
Once the event loop finishes running, the entire app will terminate, even if other threads are still running. See WindowHelper::terminate_loop().
Auto Trait Implementations
impl<UserEventType = ()> !RefUnwindSafe for Window<UserEventType>
impl<UserEventType = ()> !Send for Window<UserEventType>
impl<UserEventType = ()> !Sync for Window<UserEventType>
impl<UserEventType> Unpin for Window<UserEventType> where
UserEventType: Unpin,
UserEventType: Unpin,
impl<UserEventType = ()> !UnwindSafe for Window<UserEventType>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,