pub struct ShowPolicy {
pub never_show: bool,
pub never_show_env: Vec<String>,
pub never_show_env_values: Vec<(String, String)>,
pub reveal_on_reopen: bool,
}Expand description
The host’s say over window visibility, evaluated by ShowPolicy::mode.
Fields§
§never_show: boolHost-declared: the shell never shows, unminimises or focuses a window, and on macOS the app is a Prohibited-activation app.
never_show_env: Vec<String>Extra environment variables that mean never-show when set to a truthy value (see env_means_never_show).
never_show_env_values: Vec<(String, String)>Environment variables that mean never-show only when set to exactly the paired value
(see env_equals), for a harness whose variable uses its own token.
reveal_on_reopen: boolWhether Reopen and Opened may reveal at all (also needs the module).
Implementations§
Source§impl ShowPolicy
impl ShowPolicy
Sourcepub fn is_never_show(&self, env: &dyn Fn(&str) -> Option<OsString>) -> bool
pub fn is_never_show(&self, env: &dyn Fn(&str) -> Option<OsString>) -> bool
True when never-show is declared by the host or by any registered environment variable.
Sourcepub fn never_show_now(&self) -> bool
pub fn never_show_now(&self) -> bool
ShowPolicy::is_never_show against the process environment.
Sourcepub fn mode(
&self,
source: RevealSource,
qa_background: bool,
env: &dyn Fn(&str) -> Option<OsString>,
) -> RevealMode
pub fn mode( &self, source: RevealSource, qa_background: bool, env: &dyn Fn(&str) -> Option<OsString>, ) -> RevealMode
The one decision. Never-show beats everything; the reopen opt-out beats QA mode.
Sourcepub fn mode_now(&self, source: RevealSource) -> RevealMode
pub fn mode_now(&self, source: RevealSource) -> RevealMode
ShowPolicy::mode against the process environment and RIGHTKIT_QA_BACKGROUND.