Struct fake_dpi::FakeDpiWindow
source · pub struct FakeDpiWindow<W> {
pub inner: W,
pub dpi: f64,
}
Expand description
Wraps a window to simulate Hi-DPI screen.
Fields§
§inner: W
The inner window.
dpi: f64
Controls DPI factor.
This can be changed at run-time to test application logic.
By default, this is set to 2.0
.
Trait Implementations§
source§impl<W: AdvancedWindow> AdvancedWindow for FakeDpiWindow<W>
impl<W: AdvancedWindow> AdvancedWindow for FakeDpiWindow<W>
source§fn get_exit_on_esc(&self) -> bool
fn get_exit_on_esc(&self) -> bool
Gets whether to exit when pressing esc. Read more
source§fn set_exit_on_esc(&mut self, val: bool)
fn set_exit_on_esc(&mut self, val: bool)
Sets whether to exit when pressing esc. Read more
source§fn get_automatic_close(&self) -> bool
fn get_automatic_close(&self) -> bool
Gets whether the window will automatically close when attempting
to close it. Read more
source§fn set_automatic_close(&mut self, val: bool)
fn set_automatic_close(&mut self, val: bool)
Sets whether the window will automatically close when attempting
to close it. If this is disabled, attempts to close the window
can be detected via an
Input::Close(..)
event, and
Window::set_should_close()
can be called to actually close the window. Read moresource§fn set_capture_cursor(&mut self, val: bool)
fn set_capture_cursor(&mut self, val: bool)
Sets whether to capture/grab the cursor. Read more
source§fn get_position(&self) -> Option<Position>
fn get_position(&self) -> Option<Position>
Gets the position of window.
source§fn exit_on_esc(self, value: bool) -> Self
fn exit_on_esc(self, value: bool) -> Self
Sets whether to exit when pressing the Esc button. Read more
source§fn automatic_close(self, value: bool) -> Self
fn automatic_close(self, value: bool) -> Self
Sets whether the window will automatically close when attempting
to close it. If this is disabled, attempts to close the window
can be detected via an
Input::Close(..)
event, and
Window::set_should_close()
can be called to actually close the window. Read moresource§fn capture_cursor(self, value: bool) -> Self
fn capture_cursor(self, value: bool) -> Self
Sets whether to capture/grab the cursor. Read more
source§impl<W: BuildFromWindowSettings> BuildFromWindowSettings for FakeDpiWindow<W>
impl<W: BuildFromWindowSettings> BuildFromWindowSettings for FakeDpiWindow<W>
source§fn build_from_window_settings(
settings: &WindowSettings
) -> Result<Self, Box<dyn Error + 'static>>
fn build_from_window_settings( settings: &WindowSettings ) -> Result<Self, Box<dyn Error + 'static>>
Builds the window from a
WindowSettings
object. Read moresource§impl<W: Window> Window for FakeDpiWindow<W>
impl<W: Window> Window for FakeDpiWindow<W>
source§fn set_should_close(&mut self, val: bool)
fn set_should_close(&mut self, val: bool)
Tells the window to close or stay open.
source§fn should_close(&self) -> bool
fn should_close(&self) -> bool
Returns true if the window should close.
source§fn swap_buffers(&mut self)
fn swap_buffers(&mut self)
Swaps render buffers. Read more
source§fn wait_event(&mut self) -> Event
fn wait_event(&mut self) -> Event
Wait indefinitely for an input event to be available from the window.
Auto Trait Implementations§
impl<W> RefUnwindSafe for FakeDpiWindow<W>where W: RefUnwindSafe,
impl<W> Send for FakeDpiWindow<W>where W: Send,
impl<W> Sync for FakeDpiWindow<W>where W: Sync,
impl<W> Unpin for FakeDpiWindow<W>where W: Unpin,
impl<W> UnwindSafe for FakeDpiWindow<W>where W: UnwindSafe,
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