[]Struct gdk::AppLaunchContext

pub struct AppLaunchContext(_, _);

AppLaunchContext is an implementation of gio::AppLaunchContext that handles launching an application in a graphical context. It provides startup notification and allows to launch applications on a specific screen or workspace.

Launching an application

GdkAppLaunchContext *context;

context = gdk_display_get_app_launch_context (display);

gdk_app_launch_context_set_screen (screen);
gdk_app_launch_context_set_timestamp (event->time);

if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error))
  g_warning ("Launching failed: %s\n", error->message);

g_object_unref (context);

Implements

gio::AppLaunchContextExt

Implementations

impl AppLaunchContext[src]

pub fn set_desktop(&self, desktop: i32)[src]

Sets the workspace on which applications will be launched when using this context when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints.

When the workspace is not specified or desktop is set to -1, it is up to the window manager to pick one, typically it will be the current workspace.

desktop

the number of a workspace, or -1

pub fn set_icon<P: IsA<Icon>>(&self, icon: Option<&P>)[src]

Sets the icon for applications that are launched with this context.

Window Managers can use this information when displaying startup notification.

See also AppLaunchContext::set_icon_name.

icon

a gio::Icon, or None

pub fn set_icon_name(&self, icon_name: Option<&str>)[src]

Sets the icon for applications that are launched with this context. The icon_name will be interpreted in the same way as the Icon field in desktop files. See also AppLaunchContext::set_icon.

If both icon and icon_name are set, the icon_name takes priority. If neither icon or icon_name is set, the icon is taken from either the file that is passed to launched application or from the gio::AppInfo for the launched application itself.

icon_name

an icon name, or None

pub fn set_screen(&self, screen: &Screen)[src]

Sets the screen on which applications will be launched when using this context. See also AppLaunchContext::set_display.

If both screen and display are set, the screen takes priority. If neither screen or display are set, the default screen and display are used.

screen

a Screen

pub fn set_timestamp(&self, timestamp: u32)[src]

Sets the timestamp of self. The timestamp should ideally be taken from the event that triggered the launch.

Window managers can use this information to avoid moving the focus to the newly launched application when the user is busy typing in another window. This is also known as 'focus stealing prevention'.

timestamp

a timestamp

pub fn get_property_display(&self) -> Option<Display>[src]

Trait Implementations

impl Clone for AppLaunchContext

impl Debug for AppLaunchContext

impl Display for AppLaunchContext[src]

impl Eq for AppLaunchContext

impl Hash for AppLaunchContext

impl IsA<AppLaunchContext> for AppLaunchContext

impl Ord for AppLaunchContext

impl<T: ObjectType> PartialEq<T> for AppLaunchContext

impl<T: ObjectType> PartialOrd<T> for AppLaunchContext

impl StaticType for AppLaunchContext

Auto Trait Implementations

impl RefUnwindSafe for AppLaunchContext

impl !Send for AppLaunchContext

impl !Sync for AppLaunchContext

impl Unpin for AppLaunchContext

impl UnwindSafe for AppLaunchContext

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<O> AppLaunchContextExt for O where
    O: IsA<AppLaunchContext>, 

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.