Expand description
Represents the surroundings of your app.
It provides methods to inspect the surroundings (are we on the web?), allocate textures, and change settings (e.g. window size).
Frame
is cheap to clone and is safe to pass to other threads.
Tuple Fields
0: Arc<Mutex<FrameData>>
Implementations
sourceimpl Frame
impl Frame
sourcepub fn info(&self) -> IntegrationInfo
pub fn info(&self) -> IntegrationInfo
Information about the integration.
sourcepub fn quit(&self)
pub fn quit(&self)
Signal the app to stop/exit/quit the app (only works for native apps, not web apps). The framework will not quit immediately, but at the end of the this frame.
sourcepub fn set_window_size(&self, size: Vec2)
pub fn set_window_size(&self, size: Vec2)
Set the desired inner size of the window (in egui points).
sourcepub fn set_window_title(&self, title: &str)
pub fn set_window_title(&self, title: &str)
Set the desired title of the window.
sourcepub fn set_decorations(&self, decorated: bool)
pub fn set_decorations(&self, decorated: bool)
Set whether to show window decorations (i.e. a frame around you app). If false it will be difficult to move and resize the app.
sourcepub fn drag_window(&self)
pub fn drag_window(&self)
When called, the native window will follow the movement of the cursor while the primary mouse button is down.
Does not work on the web.
sourcepub fn request_repaint(&self)
pub fn request_repaint(&self)
This signals the egui
integration that a repaint is required.
Call this e.g. when a background process finishes in an async context and/or background thread.
sourcepub fn take_app_output(&self) -> AppOutput
pub fn take_app_output(&self) -> AppOutput
for integrations only: call once per frame
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more