gtkmm: Gdk::AppLaunchContext Class Reference
This is an implementation of Gio::AppLaunchContext that handles launching an application in a graphical context. More...
#include <gdkmm/applaunchcontext.h>
Public Member Functions | |
AppLaunchContext (AppLaunchContext&& src) noexcept | |
AppLaunchContext& | operator= (AppLaunchContext&& src) noexcept |
~AppLaunchContext () noexcept override | |
GdkAppLaunchContext* | gobj () |
Provides access to the underlying C GObject. More... | |
const GdkAppLaunchContext* | gobj () const |
Provides access to the underlying C GObject. More... | |
GdkAppLaunchContext* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
Glib::RefPtr< Display > | get_display () |
Gets the Gdk::Display that context is for. More... | |
Glib::RefPtr< const Display > | get_display () const |
Gets the Gdk::Display that context is for. More... | |
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. More... | |
void | set_timestamp (guint32 timestamp) |
Sets the timestamp of context. More... | |
void | set_icon (const Glib::RefPtr< Gio::Icon >& icon) |
Sets the icon for applications that are launched with this context. More... | |
void | set_icon_name (const Glib::ustring& icon_name) |
Sets the icon for applications that are launched with this context. More... | |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Display > > | property_display () const |
Display. More... | |
Public Member Functions inherited from Gio::AppLaunchContext | |
AppLaunchContext (AppLaunchContext &&src) noexcept | |
AppLaunchContext & | operator= (AppLaunchContext &&src) noexcept |
~AppLaunchContext () noexcept override | |
GAppLaunchContext * | gobj () |
const GAppLaunchContext * | gobj () const |
GAppLaunchContext * | gobj_copy () |
void | setenv (const Glib::ustring &variable, const Glib::ustring &value) |
void | unsetenv (const Glib::ustring &variable) |
std::vector< Glib::ustring > | get_environment () const |
std::string | get_display (const Glib::RefPtr< AppInfo > &info, const std::vector< Glib::RefPtr< Gio::File >> &files) |
std::string | get_startup_notify_id (const Glib::RefPtr< AppInfo > &info, const std::vector< Glib::RefPtr< Gio::File >> &files) |
void | launch_failed (const std::string &startup_notify_id) |
Glib::RefPtr< Gio::AppLaunchContext > | wrap (GAppLaunchContext *object, bool take_copy=false) |
Public Member Functions inherited from Glib::Object | |
Object (const Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&src) noexcept | |
Object & | operator= (Object &&src) noexcept |
void * | get_data (const QueryQuark &key) |
void | set_data (const Quark &key, void *data) |
void | set_data (const Quark &key, void *data, DestroyNotify notify) |
void | remove_data (const QueryQuark &quark) |
void * | steal_data (const QueryQuark &quark) |
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
Public Member Functions inherited from Glib::ObjectBase | |
ObjectBase (const ObjectBase &)=delete | |
ObjectBase & | operator= (const ObjectBase &)=delete |
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
PropertyType | get_property (const Glib::ustring &property_name) const |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
void | freeze_notify () |
void | thaw_notify () |
virtual void | reference () const |
virtual void | unreference () const |
GObject * | gobj () |
const GObject * | gobj () const |
GObject * | gobj_copy () const |
Public Member Functions inherited from sigc::trackable | |
trackable () noexcept | |
trackable (const trackable &src) noexcept | |
trackable (trackable &&src) noexcept | |
~trackable () | |
void | add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const |
void | notify_callbacks () |
trackable & | operator= (const trackable &src) |
trackable & | operator= (trackable &&src) noexcept |
void | remove_destroy_notify_callback (notifiable *data) const |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
static Glib::RefPtr< AppLaunchContext > | create () |
Static Public Member Functions inherited from Gio::AppLaunchContext | |
static GType | get_type () |
static Glib::RefPtr< AppLaunchContext > | create () |
Protected Member Functions | |
AppLaunchContext () | |
Protected Member Functions inherited from Gio::AppLaunchContext | |
AppLaunchContext () | |
Protected Member Functions inherited from Glib::Object | |
Object () | |
Object (const Glib::ConstructParams &construct_params) | |
Object (GObject *castitem) | |
~Object () noexcept override | |
Protected Member Functions inherited from Glib::ObjectBase | |
ObjectBase () | |
ObjectBase (const char *custom_type_name) | |
ObjectBase (const std::type_info &custom_type_info) | |
ObjectBase (ObjectBase &&src) noexcept | |
ObjectBase & | operator= (ObjectBase &&src) noexcept |
virtual | ~ObjectBase () noexcept=0 |
void | initialize (GObject *castitem) |
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
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. More... | |
Additional Inherited Members | |
Public Types inherited from Glib::Object | |
typedef void(*)(gpointer data | DestroyNotify) |
Public Types inherited from sigc::trackable | |
typedef internal::func_destroy_notify | func_destroy_notify |
Public Types inherited from sigc::notifiable | |
typedef internal::func_destroy_notify | func_destroy_notify |
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.
Constructor & Destructor Documentation
|
noexcept |
|
overridenoexcept |
|
protected |
Member Function Documentation
|
static |
Glib::RefPtr<Display> Gdk::AppLaunchContext::get_display | ( | ) |
Gets the Gdk::Display that context is for.
- Returns
- The display of context.
Glib::RefPtr<const Display> Gdk::AppLaunchContext::get_display | ( | ) | const |
Gets the Gdk::Display that context is for.
- Returns
- The display of context.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
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.
|
noexcept |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > Gdk::AppLaunchContext::property_display | ( | ) | const |
- Returns
- A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
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.
- 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 set_icon_name().
- Parameters
-
icon A Gio::Icon, or nullptr
.
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 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.
- Parameters
-
icon_name An icon name, or nullptr
.
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'.
- Parameters
-
timestamp A timestamp.
Friends And Related Function Documentation
|
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.