Package ch.bailu.gtk.gio
Klasse DesktopAppInfo
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gio.DesktopAppInfo
- Alle implementierten Schnittstellen:
PointerInterface
`GDesktopAppInfo` is an implementation of [iface@Gio.AppInfo] based on
desktop files.
Note that `<gio/gdesktopappinfo.h>` belongs to the UNIX-specific
GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
file or the `GioUnix-2.0` GIR namespace when using it.
desktop files.
Note that `<gio/gdesktopappinfo.h>` belongs to the UNIX-specific
GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config
file or the `GioUnix-2.0` GIR namespace when using it.
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDesktopAppInfo
(PointerContainer pointer) DesktopAppInfo
(Str desktop_id) Creates a new [class@Gio.DesktopAppInfo] based on a desktop file ID.DesktopAppInfo
(String desktop_id) Creates a new [class@Gio.DesktopAppInfo] based on a desktop file ID. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungImplements interfaceAppInfo
.getActionName
(Str action_name) Gets the user-visible display name of the
[‘additional application actions’](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html)
specified by @action_name.getActionName
(String action_name) Gets the user-visible display name of the
[‘additional application actions’](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html)
specified by @action_name.boolean
getBoolean
(Str key) Looks up a boolean value in the keyfile backing @info.boolean
getBoolean
(String key) Looks up a boolean value in the keyfile backing @info.Gets the categories from the desktop file.static ClassHandler
When @info was created from a known filename, return it.Gets the generic name from the desktop file.static List
getImplementations
(Str _interface) Gets all applications that implement @interface.static int
boolean
A desktop file is hidden if the
[`Hidden` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-hidden)
in it is set to `True`.Gets the keywords from the desktop file.getLocaleString
(Str key) Looks up a localized string value in the keyfile backing @info
translated to the current locale.getLocaleString
(String key) Looks up a localized string value in the keyfile backing @info
translated to the current locale.boolean
Gets the value of the
[`NoDisplay` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-nodisplay)
which helps determine if the application info should be shown in menus.static long
static TypeSystem.TypeSize
boolean
Checks if the application info should be shown in menus that list available
applications for a specific name of the desktop, based on the
[`OnlyShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-onlyshowin)
and [`NotShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-notshowin)
keys.boolean
Checks if the application info should be shown in menus that list available
applications for a specific name of the desktop, based on the
[`OnlyShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-onlyshowin)
and [`NotShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-notshowin)
keys.Retrieves the `StartupWMClass` field from @info.Looks up a string value in the keyfile backing @info.Looks up a string value in the keyfile backing @info.static long
static TypeSystem.TypeSize
boolean
Returns whether @key exists in the `Desktop Entry` group
of the keyfile backing @info.boolean
Returns whether @key exists in the `Desktop Entry` group
of the keyfile backing @info.void
launchAction
(Str action_name, AppLaunchContext launch_context) Activates the named application action.void
launchAction
(String action_name, AppLaunchContext launch_context) Activates the named application action.static DesktopAppInfo
newFromFilenameDesktopAppInfo
(Str filename) Creates a new [class@Gio.DesktopAppInfo].static DesktopAppInfo
newFromFilenameDesktopAppInfo
(String filename) Creates a new [class@Gio.DesktopAppInfo].static DesktopAppInfo
newFromKeyfileDesktopAppInfo
(KeyFile key_file) Creates a new [class@Gio.DesktopAppInfo].static void
setDesktopEnv
(Str desktop_env) Veraltet.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
DesktopAppInfo
-
DesktopAppInfo
Creates a new [class@Gio.DesktopAppInfo] based on a desktop file ID.
A desktop file ID is the basename of the desktop file, including the
`.desktop` extension. GIO is looking for a desktop file with this name
in the `applications` subdirectories of the XDG
data directories (i.e. the directories specified in the `XDG_DATA_HOME`
and `XDG_DATA_DIRS` environment variables). GIO also supports the
prefix-to-subdirectory mapping that is described in the
[Menu Spec](http://standards.freedesktop.org/menu-spec/latest/)
(i.e. a desktop ID of `kde-foo.desktop` will match
`/usr/share/applications/kde/foo.desktop`).- Parameter:
desktop_id
- the desktop file ID
-
DesktopAppInfo
Creates a new [class@Gio.DesktopAppInfo] based on a desktop file ID.
A desktop file ID is the basename of the desktop file, including the
`.desktop` extension. GIO is looking for a desktop file with this name
in the `applications` subdirectories of the XDG
data directories (i.e. the directories specified in the `XDG_DATA_HOME`
and `XDG_DATA_DIRS` environment variables). GIO also supports the
prefix-to-subdirectory mapping that is described in the
[Menu Spec](http://standards.freedesktop.org/menu-spec/latest/)
(i.e. a desktop ID of `kde-foo.desktop` will match
`/usr/share/applications/kde/foo.desktop`).- Parameter:
desktop_id
- the desktop file ID
-
-
Methodendetails
-
getClassHandler
-
newFromFilenameDesktopAppInfo
Creates a new [class@Gio.DesktopAppInfo].- Parameter:
filename
- the path of a desktop file, in the GLib filename encoding- Gibt zurück:
- a new [class@Gio.DesktopAppInfo] or `NULL` on error.
-
newFromFilenameDesktopAppInfo
Creates a new [class@Gio.DesktopAppInfo].- Parameter:
filename
- the path of a desktop file, in the GLib filename encoding- Gibt zurück:
- a new [class@Gio.DesktopAppInfo] or `NULL` on error.
-
newFromKeyfileDesktopAppInfo
Creates a new [class@Gio.DesktopAppInfo].- Parameter:
key_file
- an opened [type@GLib.KeyFile]- Gibt zurück:
- a new [class@Gio.DesktopAppInfo] or `NULL` on error.
-
getActionName
Gets the user-visible display name of the
[‘additional application actions’](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html)
specified by @action_name.
This corresponds to the `Name` key within the keyfile group for the
action.- Parameter:
action_name
- the name of the action as from [method@Gio.DesktopAppInfo.list_actions]- Gibt zurück:
- the locale-specific action name
-
getActionName
Gets the user-visible display name of the
[‘additional application actions’](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html)
specified by @action_name.
This corresponds to the `Name` key within the keyfile group for the
action.- Parameter:
action_name
- the name of the action as from [method@Gio.DesktopAppInfo.list_actions]- Gibt zurück:
- the locale-specific action name
-
getBoolean
Looks up a boolean value in the keyfile backing @info.
The @key is looked up in the `Desktop Entry` group.- Parameter:
key
- the key to look up- Gibt zurück:
- the boolean value, or `FALSE` if the key is not found
-
getBoolean
Looks up a boolean value in the keyfile backing @info.
The @key is looked up in the `Desktop Entry` group.- Parameter:
key
- the key to look up- Gibt zurück:
- the boolean value, or `FALSE` if the key is not found
-
getCategories
Gets the categories from the desktop file.- Gibt zurück:
- The unparsed [`Categories` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-categories) from the desktop file; i.e. no attempt is made to split it by `;` or validate it.
-
getFilename
When @info was created from a known filename, return it. In some
situations such as a [class@Gio.DesktopAppInfo] returned from
[ctor@Gio.DesktopAppInfo.new_from_keyfile], this function will return `NULL`.- Gibt zurück:
- The full path to the file for @info, or `NULL` if not known.
-
getGenericName
Gets the generic name from the desktop file.- Gibt zurück:
- The value of the [`GenericName` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-genericname)
-
getIsHidden
public boolean getIsHidden()A desktop file is hidden if the
[`Hidden` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-hidden)
in it is set to `True`.- Gibt zurück:
- `TRUE` if hidden, `FALSE` otherwise.
-
getKeywords
Gets the keywords from the desktop file.- Gibt zurück:
- The value of the [`Keywords` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-keywords)
-
getLocaleString
Looks up a localized string value in the keyfile backing @info
translated to the current locale.
The @key is looked up in the `Desktop Entry` group.- Parameter:
key
- the key to look up- Gibt zurück:
- a newly allocated string, or `NULL` if the key is not found
-
getLocaleString
Looks up a localized string value in the keyfile backing @info
translated to the current locale.
The @key is looked up in the `Desktop Entry` group.- Parameter:
key
- the key to look up- Gibt zurück:
- a newly allocated string, or `NULL` if the key is not found
-
getNodisplay
public boolean getNodisplay()Gets the value of the
[`NoDisplay` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-nodisplay)
which helps determine if the application info should be shown in menus. See
`G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY` and [method@Gio.AppInfo.should_show].- Gibt zurück:
- The value of the `NoDisplay` key
-
getShowIn
Checks if the application info should be shown in menus that list available
applications for a specific name of the desktop, based on the
[`OnlyShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-onlyshowin)
and [`NotShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-notshowin)
keys.
@desktop_env should typically be given as `NULL`, in which case the
`XDG_CURRENT_DESKTOP` environment variable is consulted. If you want
to override the default mechanism then you may specify @desktop_env,
but this is not recommended.
Note that [method@Gio.AppInfo.should_show] for @info will include this check
(with `NULL` for @desktop_env) as well as additional checks.- Parameter:
desktop_env
- a string specifying a desktop name- Gibt zurück:
- `TRUE` if the @info should be shown in @desktop_env according to the `OnlyShowIn` and `NotShowIn` keys, `FALSE` otherwise.
-
getShowIn
Checks if the application info should be shown in menus that list available
applications for a specific name of the desktop, based on the
[`OnlyShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-onlyshowin)
and [`NotShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-notshowin)
keys.
@desktop_env should typically be given as `NULL`, in which case the
`XDG_CURRENT_DESKTOP` environment variable is consulted. If you want
to override the default mechanism then you may specify @desktop_env,
but this is not recommended.
Note that [method@Gio.AppInfo.should_show] for @info will include this check
(with `NULL` for @desktop_env) as well as additional checks.- Parameter:
desktop_env
- a string specifying a desktop name- Gibt zurück:
- `TRUE` if the @info should be shown in @desktop_env according to the `OnlyShowIn` and `NotShowIn` keys, `FALSE` otherwise.
-
getStartupWmClass
Retrieves the `StartupWMClass` field from @info. This represents the
`WM_CLASS` property of the main window of the application, if launched
through @info.- Gibt zurück:
- the startup WM class, or `NULL` if none is set in the desktop file.
-
getString
Looks up a string value in the keyfile backing @info.
The @key is looked up in the `Desktop Entry` group.- Parameter:
key
- the key to look up- Gibt zurück:
- a newly allocated string, or `NULL` if the key is not found
-
getString
Looks up a string value in the keyfile backing @info.
The @key is looked up in the `Desktop Entry` group.- Parameter:
key
- the key to look up- Gibt zurück:
- a newly allocated string, or `NULL` if the key is not found
-
hasKey
Returns whether @key exists in the `Desktop Entry` group
of the keyfile backing @info.- Parameter:
key
- the key to look up- Gibt zurück:
- `TRUE` if the @key exists
-
hasKey
Returns whether @key exists in the `Desktop Entry` group
of the keyfile backing @info.- Parameter:
key
- the key to look up- Gibt zurück:
- `TRUE` if the @key exists
-
launchAction
Activates the named application action.
You may only call this function on action names that were
returned from [method@Gio.DesktopAppInfo.list_actions].
Note that if the main entry of the desktop file indicates that the
application supports startup notification, and @launch_context is
non-`NULL`, then startup notification will be used when activating the
action (and as such, invocation of the action on the receiving side
must signal the end of startup notification when it is completed).
This is the expected behaviour of applications declaring additional
actions, as per the
[desktop file specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html).
As with [method@Gio.AppInfo.launch] there is no way to detect failures that
occur while using this function.- Parameter:
action_name
- the name of the action as from [method@Gio.DesktopAppInfo.list_actions]launch_context
- a [class@Gio.AppLaunchContext]
-
launchAction
Activates the named application action.
You may only call this function on action names that were
returned from [method@Gio.DesktopAppInfo.list_actions].
Note that if the main entry of the desktop file indicates that the
application supports startup notification, and @launch_context is
non-`NULL`, then startup notification will be used when activating the
action (and as such, invocation of the action on the receiving side
must signal the end of startup notification when it is completed).
This is the expected behaviour of applications declaring additional
actions, as per the
[desktop file specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html).
As with [method@Gio.AppInfo.launch] there is no way to detect failures that
occur while using this function.- Parameter:
action_name
- the name of the action as from [method@Gio.DesktopAppInfo.list_actions]launch_context
- a [class@Gio.AppLaunchContext]
-
getImplementations
Gets all applications that implement @interface.
An application implements an interface if that interface is listed in
the `Implements` line of the desktop file of the application.- Parameter:
_interface
- the name of the interface- Gibt zurück:
- a list of [class@Gio.DesktopAppInfo] objects.
-
setDesktopEnv
Veraltet.Sets the name of the desktop that the application is running in.
This is used by [method@Gio.AppInfo.should_show] and
[method@Gio.DesktopAppInfo.get_show_in] to evaluate the
[`OnlyShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-onlyshowin)
and [`NotShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-notshowin)
keys.
Should be called only once; subsequent calls are ignored.- Parameter:
desktop_env
- a string specifying what desktop this is
-
asAppInfo
Implements interfaceAppInfo
. Call this to get access to interface functions.- Gibt zurück:
AppInfo
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-