pub struct Display { /* private fields */ }Implementations§
Source§impl Display
impl Display
pub fn is_connected(&self) -> bool
pub fn get_properties(&self) -> Result<Properties, PropertiesError>
Sourcepub fn get_name(&self) -> Result<String, Error>
pub fn get_name(&self) -> Result<String, Error>
Get the name of the display at the index display_name.
Will return an error if the index is out of bounds or if SDL experienced a failure; inspect the returned string for further info.
pub fn get_bounds(&self) -> Result<Rect, Error>
pub fn get_usable_bounds(&self) -> Result<Rect, Error>
pub fn get_fullscreen_modes(&self) -> Result<Vec<DisplayMode>, Error>
pub fn get_mode(&self) -> Result<DisplayMode, Error>
pub fn get_closest_display_mode( &self, mode: &DisplayMode, include_high_density_modes: bool, ) -> Result<DisplayMode, Error>
Sourcepub fn get_orientation(&self) -> SDL_DisplayOrientation
pub fn get_orientation(&self) -> SDL_DisplayOrientation
Return orientation of a display or Unknown if orientation could not be determined.
Sourcepub fn get_natural_orientation(&self) -> SDL_DisplayOrientation
pub fn get_natural_orientation(&self) -> SDL_DisplayOrientation
Return orientation of a display or Unknown if orientation could not be determined.
pub fn get_content_scale(&self) -> Result<f32, Error>
Trait Implementations§
impl Copy for Display
impl Eq for Display
impl StructuralPartialEq for Display
Auto Trait Implementations§
impl Freeze for Display
impl RefUnwindSafe for Display
impl Send for Display
impl Sync for Display
impl Unpin for Display
impl UnwindSafe for Display
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