[−][src]Struct screen_13::prelude::Program
Program is the required information to start an event loop, and therefore an Engine
.
Remarks: The fullscreen/windowed setting this program describes may not be what Screen 13 chooses at runtime if there is a previously written configuration file present.
Fields
Program author, or company.
fullscreen: bool
Whether the program uses a full-screen video mode or not.
icon: Option<Icon<'b>>
Program window icon, if set.
name: &'static str
Program name, or title.
resizable: bool
Whether the program window is resizable or not, while in window mode.
Has no effect while in fullscreen mode.
title: &'a str
Program window title.
This is what is shown to the user.
Implementations
impl Program<'static, 'static>
[src]
pub const FULLSCREEN: Program<'static, 'static>
[src]
A default program description, with a fullscreen setting.
This is most useful for small examples and demos. Real programs should fill in all the info manually.
pub const WINDOW: Program<'static, 'static>
[src]
A default program description, with a window mode setting.
This is most useful for small examples and demos. Real programs should fill in all the info manually.
impl Program<'_, '_>
[src]
pub const fn new(name: &'static str, author: &'static str) -> Self
[src]
Creates a new Program description.
By default the program will be fullscreen; use the builder functions to change this and make other important choices.
Remarks: Programs running in windowed mode automatically select an appropriately sized and placed window. Current logic provides a window centered on the primary display at HD resolution.
Remarks: When in debug mode the default is windowed mode.
pub const fn with_fullscreen(self) -> Self
[src]
Sets whether the program starts as fullscreen of in window mode.
pub const fn with_fullscreen_is(self, fullscreen: bool) -> Self
[src]
Sets whether the program starts as fullscreen of in window mode.
pub const fn with_name_author(
self,
name: &'static str,
author: &'static str
) -> Self
[src]
self,
name: &'static str,
author: &'static str
) -> Self
Sets the program name and program author (also known as publisher). These values are used for multiple purposes, including locating configuration files.
pub const fn with_resizable(self) -> Self
[src]
Sets whether the window is resizable or not.
pub const fn with_resizable_is(self, resizable: bool) -> Self
[src]
Sets whether the window is resizable or not.
pub const fn with_window(self) -> Self
[src]
Sets whether the program starts in window mode instead of as fullscreen.
pub const fn with_window_is(self, window: bool) -> Self
[src]
Sets whether the program starts in window mode instead of as fullscreen.
pub fn without_icon(self) -> Self
[src]
Clears the previously set window icon.
pub fn root(&self) -> Result<PathBuf, Error>
[src]
Gets the filesystem root for this program. The returned path is a good place to store program configuration and data on a per-user basis.
impl<'a> Program<'a, '_>
[src]
pub const fn with_title(self, title: &'a str) -> Self
[src]
Sets the window title, separately from the program name which is used internally to cache configuration changes.
impl<'b> Program<'_, 'b>
[src]
pub fn with_icon(self, icon: Icon<'b>) -> Self
[src]
Sets the window icon. The icon must be an rgba formatted pixel array, and must be square.
pub fn with_icon_is(self, icon: Option<Icon<'b>>) -> Self
[src]
Sets the window icon. The icon must be an rgba formatted pixel array, and must be square.
Trait Implementations
impl<'a, 'b> AsRef<Program<'a, 'b>> for Program<'a, 'b>
[src]
impl<'a, 'b> Debug for Program<'a, 'b>
[src]
impl Default for Program<'_, '_>
[src]
impl<'a, 'b> Deserialize<'static> for Program<'a, 'b>
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'static>,
[src]
__D: Deserializer<'static>,
impl From<&'_ Program<'_, '_>> for Engine
[src]
impl From<Program<'_, '_>> for Engine
[src]
impl<'a, 'b> Serialize for Program<'a, 'b>
[src]
Auto Trait Implementations
impl<'a, 'b> RefUnwindSafe for Program<'a, 'b>
[src]
impl<'a, 'b> Send for Program<'a, 'b>
[src]
impl<'a, 'b> Sync for Program<'a, 'b>
[src]
impl<'a, 'b> Unpin for Program<'a, 'b>
[src]
impl<'a, 'b> UnwindSafe for Program<'a, 'b>
[src]
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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
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>,