pub struct AppIdentity { /* private fields */ }Expand description
Who the app is to the system, for finding its icon and its menu entry.
On Linux the id is what ties the window to the app’s .desktop file. Wayland
has no way for a window to carry an icon: GNOME shows the one in the
.desktop file whose name, without the extension, is the window’s id. On
X11 the id must match the file’s StartupWMClass.
use ravenrs_platform_native::AppIdentity;
// For a file named `notes.desktop`.
let identity = AppIdentity::new("notes");Implementations§
Source§impl AppIdentity
impl AppIdentity
Sourcepub fn new(id: impl Into<String>) -> AppIdentity
pub fn new(id: impl Into<String>) -> AppIdentity
The app known as id, which is the name of its .desktop file on Linux.
Sourcepub fn labels(self, labels: Labels) -> AppIdentity
pub fn labels(self, labels: Labels) -> AppIdentity
Sets the words of the whole UI, including the diagnostics panel.
Sourcepub fn diagnostics(self, diagnostics: Diagnostics) -> AppIdentity
pub fn diagnostics(self, diagnostics: Diagnostics) -> AppIdentity
Shares diagnostics with the app, for a button of its own that opens the
panel or starts a performance test.
Sourcepub fn new_issue_url(self, url: impl Into<String>) -> AppIdentity
pub fn new_issue_url(self, url: impl Into<String>) -> AppIdentity
Sets the page for new issues, so the diagnostics panel can start a bug report there. The person reviews it and sends it on that page.
Sourcepub fn icon(self, icon: ImageData) -> AppIdentity
pub fn icon(self, icon: ImageData) -> AppIdentity
An icon for the title bar and the task bar on Windows and on Linux with X11. macOS takes an app’s icon from its bundle instead.
Sourcepub fn close_to_tray(self, tray: SystemTray) -> AppIdentity
pub fn close_to_tray(self, tray: SystemTray) -> AppIdentity
Closing the window keeps the app running behind an icon beside the clock, which
shows Self::icon and needs it. Opening the app again, or clicking its icon in the
Dock on macOS, brings the same window back. See SystemTray for where the system has no such icon.
Trait Implementations§
Source§impl Clone for AppIdentity
impl Clone for AppIdentity
Source§fn clone(&self) -> AppIdentity
fn clone(&self) -> AppIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more