Skip to main content

AndroidWindow

Struct AndroidWindow 

Source
pub struct AndroidWindow { /* private fields */ }
Expand description

Placeholder for non-Android builds

Implementations§

Source§

impl AndroidWindow

Source

pub fn new() -> Self

Create a placeholder window (panics on non-Android)

Trait Implementations§

Source§

impl Default for AndroidWindow

Source§

fn default() -> AndroidWindow

Returns the “default value” for a type. Read more
Source§

impl Window for AndroidWindow

Available on non-Android only.
Source§

fn id(&self) -> WindowId

Get the platform-agnostic window ID
Source§

fn size(&self) -> (u32, u32)

Get window size in physical pixels
Source§

fn logical_size(&self) -> (f32, f32)

Get window size in logical pixels
Source§

fn scale_factor(&self) -> f64

Get the display scale factor (DPI scaling)
Source§

fn set_title(&self, _title: &str)

Set the window title
Source§

fn set_cursor(&self, _cursor: Cursor)

Set the cursor icon
Source§

fn request_redraw(&self)

Request a redraw
Source§

fn is_focused(&self) -> bool

Check if the window is focused
Source§

fn is_visible(&self) -> bool

Check if the window is visible
Source§

fn set_position(&self, _x: i32, _y: i32)

Set window position in logical pixels
Source§

fn center_on_screen(&self)

Center the window on its current monitor
Source§

fn set_size(&self, _width: u32, _height: u32)

Set the window size in logical pixels
Source§

fn drag_window(&self)

Start a window drag operation (for custom title bars). Read more
Source§

fn minimize(&self)

Minimize the window
Source§

fn maximize(&self)

Maximize or restore the window
Source§

fn close(&self)

Close the window
Source§

fn safe_area_insets(&self) -> (f32, f32, f32, f32)

Get safe area insets (top, right, bottom, left) in logical pixels. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.