[−][src]Trait gio::AppLaunchContextExt
Required methods
fn get_display<P: IsA<AppInfo>>(
&self,
info: &P,
files: &[File]
) -> Option<GString>
&self,
info: &P,
files: &[File]
) -> Option<GString>
Gets the display string for the self. This is used to ensure new
applications are started on the same display as the launching
application, by setting the DISPLAY environment variable.
info
a AppInfo
files
a glib::List of File objects
Returns
a display string for the display.
fn get_environment(&self) -> Vec<OsString>
Gets the complete environment variable list to be passed to
the child process when self is used to launch an application.
This is a None-terminated array of strings, where each string has
the form KEY=VALUE.
Returns
the child's environment
fn get_startup_notify_id<P: IsA<AppInfo>>(
&self,
info: &P,
files: &[File]
) -> Option<GString>
&self,
info: &P,
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 glib::List of of File objects
Returns
a startup notification ID for the application, or None if
not supported.
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 AppLaunchContextExt::get_startup_notify_id.
startup_notify_id
the startup notification id that was returned by AppLaunchContextExt::get_startup_notify_id.
fn setenv<P: AsRef<OsStr>, Q: AsRef<OsStr>>(&self, variable: P, value: Q)
Arranges for variable to be set to value in the child's
environment when self is used to launch an application.
variable
the environment variable to set
value
the value for to set the variable to.
fn unsetenv<P: AsRef<OsStr>>(&self, variable: P)
Arranges for variable to be unset in the child's environment
when self is used to launch an application.
variable
the environment variable to remove
fn connect_launch_failed<F: Fn(&Self, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::launch-failed signal is emitted when a AppInfo launch
fails. The startup notification id is provided, so that the launcher
can cancel the startup notification.
startup_notify_id
the startup notification id for the failed launch
fn connect_launched<F: Fn(&Self, &AppInfo, &Variant) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::launched signal is emitted when a AppInfo is successfully
launched. The platform_data is an GVariant dictionary mapping
strings to variants (ie a{sv}), which contains additional,
platform-specific data about this launch. On UNIX, at least the
"pid" and "startup-notification-id" keys will be present.
info
the AppInfo that was just launched
platform_data
additional platform-specific data for this launch
Implementors
impl<O: IsA<AppLaunchContext>> AppLaunchContextExt for O[src]
fn get_display<P: IsA<AppInfo>>(
&self,
info: &P,
files: &[File]
) -> Option<GString>[src]
&self,
info: &P,
files: &[File]
) -> Option<GString>
fn get_environment(&self) -> Vec<OsString>[src]
fn get_startup_notify_id<P: IsA<AppInfo>>(
&self,
info: &P,
files: &[File]
) -> Option<GString>[src]
&self,
info: &P,
files: &[File]
) -> Option<GString>
fn launch_failed(&self, startup_notify_id: &str)[src]
fn setenv<P: AsRef<OsStr>, Q: AsRef<OsStr>>(&self, variable: P, value: Q)[src]
fn unsetenv<P: AsRef<OsStr>>(&self, variable: P)[src]
fn connect_launch_failed<F: Fn(&Self, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_launched<F: Fn(&Self, &AppInfo, &Variant) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId