1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Fix typos and expose Context::is_desktop

This commit is contained in:
Konkitoman
2023-09-30 10:22:17 +03:00
parent 424303650b
commit 287f7041f6
3 changed files with 7 additions and 2 deletions

View File

@@ -689,7 +689,7 @@ mod glow_integration {
viewports: windows, viewports: windows,
builders, builders,
viewports_maps: window_maps, viewports_maps: window_maps,
// This is initializate in init_run_state // This is initialize in init_run_state
max_texture_side: 0, max_texture_side: 0,
}) })
} }

View File

@@ -2571,6 +2571,11 @@ impl Context {
}); });
} }
/// This will tell you if is possible to open a native window
pub fn is_desktop(&self) -> bool {
self.read(|ctx| ctx.is_desktop)
}
/// If this is true no other native windows will be created /// If this is true no other native windows will be created
pub fn force_embedding(&self) -> bool { pub fn force_embedding(&self) -> bool {
self.read(|ctx| ctx.force_embedding) self.read(|ctx| ctx.force_embedding)

View File

@@ -331,7 +331,7 @@ impl ViewportBuilder {
/// Build window with the given name. /// Build window with the given name.
/// ///
/// The `general` name sets an application ID, which should match the `.desktop` /// The `general` name sets an application ID, which should match the `.desktop`
/// file destributed with your program. The `instance` is a `no-op`. /// file distributed with your program. The `instance` is a `no-op`.
/// ///
/// For details about application ID conventions, see the /// For details about application ID conventions, see the
/// [Desktop Entry Spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-file-id) /// [Desktop Entry Spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-file-id)