gtkmm: Gdk::AppLaunchContext Class Reference

gtkmm 3.4.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions
Gdk::AppLaunchContext Class Reference

This is an implementation of Gio::AppLaunchContext that handles launching an application in a graphical context. More...

Inheritance diagram for Gdk::AppLaunchContext:
[legend]

List of all members.

## Public Member Functions
virtual | ~AppLaunchContext ()
GdkAppLaunchContext* | gobj ()
| Provides access to the underlying C GObject.
const GdkAppLaunchContext* | gobj () const
| Provides access to the underlying C GObject.
GdkAppLaunchContext* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void | set_screen (const Glib::RefPtr< Gdk::Screen >& screen)
| Sets the screen on which applications will be launched when using this context.
void | set_desktop (int desktop)
| 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.
void | set_timestamp (guint32 timestamp)
| Sets the timestamp of context.
void | set_icon (const Glib::RefPtr< Gio::Icon >& icon)
| Sets the icon for applications that are launched with this context.
void | set_icon_name (const Glib::ustring& icon_name)
| Sets the icon for applications that are launched with this context.
## Static Public Member Functions
static Glib::RefPtr < AppLaunchContext > | create ()
## Protected Member Functions
| AppLaunchContext ()
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr < Gdk::AppLaunchContext > | wrap (GdkAppLaunchContext* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

This 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.

Since gtkmm 3.4:

## Constructor & Destructor Documentation

virtual Gdk::AppLaunchContext::~AppLaunchContext | ( |  | ) | `[virtual]`

Reimplemented from Gio::AppLaunchContext.

Gdk::AppLaunchContext::AppLaunchContext | ( |  | ) | `[protected]`

Reimplemented from Gio::AppLaunchContext.

## Member Function Documentation

static Glib::RefPtr<AppLaunchContext> Gdk::AppLaunchContext::create | ( |  | ) | `[static]`

Reimplemented from Gio::AppLaunchContext.

GdkAppLaunchContext* Gdk::AppLaunchContext::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gio::AppLaunchContext.

const GdkAppLaunchContext* Gdk::AppLaunchContext::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gio::AppLaunchContext.

GdkAppLaunchContext* Gdk::AppLaunchContext::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gio::AppLaunchContext.

void Gdk::AppLaunchContext::set_desktop | ( | int | desktop | ) |

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.

Since gtkmm 2.14:

Parameters:

  desktop | The number of a workspace, or -1.

void Gdk::AppLaunchContext::set_icon | ( | const Glib::RefPtr< Gio::Icon > & | icon | ) |

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

Window Managers can use this information when displaying startup notification.

See also gdk_app_launch_context_set_icon_name().

Since gtkmm 2.14:

Parameters:

  icon | A Icon, or `0`.

void Gdk::AppLaunchContext::set_icon_name | ( | const Glib::ustring & | icon_name | ) |

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 gdk_app_launch_context_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 AppInfo for the launched application itself.

Since gtkmm 2.14:

Parameters:

  icon_name | An icon name, or `0`.

void Gdk::AppLaunchContext::set_screen | ( | const Glib::RefPtr< Gdk::Screen >& | screen | ) |

Sets the screen on which applications will be launched when using this context.

See also gdk_app_launch_context_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.

Since gtkmm 2.14:

Parameters:

  screen | A Gdk::Screen.

void Gdk::AppLaunchContext::set_timestamp | ( | guint32 | timestamp | ) |

Sets the timestamp of context.

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'.

Since gtkmm 2.14:

Parameters:

  timestamp | A timestamp.

## Friends And Related Function Documentation

Glib::RefPtr< Gdk::AppLaunchContext > wrap | ( | GdkAppLaunchContext * | object,
|  | bool | take_copy = `false`
| ) |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gdkmm/applaunchcontext.h