Trait gio::prelude::AppLaunchContextExt
source · pub trait AppLaunchContextExt: 'static {
// Required methods
fn display(
&self,
info: &impl IsA<AppInfo>,
files: &[File]
) -> Option<GString>;
fn environment(&self) -> Vec<OsString>;
fn startup_notify_id(
&self,
info: &impl IsA<AppInfo>,
files: &[File]
) -> Option<GString>;
fn launch_failed(&self, startup_notify_id: &str);
fn setenv(&self, variable: impl AsRef<OsStr>, value: impl AsRef<OsStr>);
fn unsetenv(&self, variable: impl AsRef<OsStr>);
fn connect_launch_failed<F: Fn(&Self, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_launch_started<F: Fn(&Self, &AppInfo, Option<&Variant>) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_launched<F: Fn(&Self, &AppInfo, &Variant) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Expand description
Required Methods§
sourcefn environment(&self) -> Vec<OsString>
fn environment(&self) -> Vec<OsString>
sourcefn startup_notify_id(
&self,
info: &impl IsA<AppInfo>,
files: &[File]
) -> Option<GString>
fn startup_notify_id( &self, info: &impl IsA<AppInfo>, files: &[File] ) -> Option<GString>
Initiates startup notification for the application and returns the
DESKTOP_STARTUP_ID
for the launched operation, if supported.
Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
info
a AppInfo
files
a GList
of of File
objects
Returns
a startup notification ID for the application, or None
if
not supported.
sourcefn launch_failed(&self, startup_notify_id: &str)
fn launch_failed(&self, startup_notify_id: &str)
Called when an application has failed to launch, so that it can cancel
the application startup notification started in startup_notify_id()
.
startup_notify_id
the startup notification id that was returned by startup_notify_id()
.
fn unsetenv(&self, variable: impl AsRef<OsStr>)
fn connect_launch_failed<F: Fn(&Self, &str) + 'static>( &self, f: F ) -> SignalHandlerId
sourcefn connect_launch_started<F: Fn(&Self, &AppInfo, Option<&Variant>) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_launch_started<F: Fn(&Self, &AppInfo, Option<&Variant>) + 'static>( &self, f: F ) -> SignalHandlerId
Available on crate feature
v2_72
only.