package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/App_info/index.html
Module Wrappers.App_info
type t = [ `app_info ] Gobject.objval from_gobject : 'a Gobject.obj -> tval supports_uris : t -> boolChecks if the application supports reading files and directories from URIs.
val supports_files : t -> boolChecks if the application accepts files as arguments.
val should_show : t -> boolChecks if the application info should be shown in menus that list available applications.
Sets the application as the last used application for a given type. This will make the application appear as first in the list returned by g_app_info_get_recommended_for_type(), regardless of the default application for that content type.
Sets the application as the default handler for a given type.
Sets the application as the default handler for the given file extension.
Removes a supported type from an application, if possible.
val launch_uris_finish :
t ->
[ `async_result ] Gobject.obj ->
(bool, GError.t) resultFinishes a g_app_info_launch_uris_async() operation.
val launch_uris :
t ->
string list option ->
[ `app_launch_context | `object_ ] Gobject.obj option ->
(bool, GError.t) resultLaunches the application. This passes the @uris to the launched application as arguments, using the optional @context to get information about the details of the launcher (like what screen it is on). On error, @error will be set accordingly. If the application only supports one URI per invocation as part of their command-line, multiple instances of the application will be spawned.
To launch the application without arguments pass a %NULL @uris list.
Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this.
val launch :
t ->
[ `file ] Gobject.obj list option ->
[ `app_launch_context | `object_ ] Gobject.obj option ->
(bool, GError.t) resultLaunches the application. Passes @files to the launched application as arguments, using the optional @context to get information about the details of the launcher (like what screen it is on). On error, @error will be set accordingly.
To launch the application without arguments pass a %NULL @files list.
Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this.
Some URIs can be changed when passed through a GFile (for instance unsupported URIs with strange formats like mailto:), so if you have a textual URI you want to pass in as argument, consider using g_app_info_launch_uris() instead.
The launched application inherits the environment of the launching process, but it can be modified with g_app_launch_context_setenv() and g_app_launch_context_unsetenv().
On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE` environment variable with the path of the launched desktop file and `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`, should it be inherited by further processes. The `DISPLAY`, `XDG_ACTIVATION_TOKEN` and `DESKTOP_STARTUP_ID` environment variables are also set, based on information provided in @context.
val get_supported_types : t -> string arrayRetrieves the list of content types that @app_info claims to support. If this information is not provided by the environment, this function will return %NULL. This function does not take in consideration associations added with g_app_info_add_supports_type(), but only those exported directly by the application.
val get_name : t -> stringGets the installed name of the application.
val get_id : t -> string optionGets the ID of an application. An id is a string that identifies the application. The exact format of the id is platform dependent. For instance, on Unix this is the desktop file id from the xdg menu specification.
Note that the returned ID may be %NULL, depending on how the @appinfo has been constructed.
val get_icon : t -> [ `icon ] Gobject.obj optionGets the icon for the application.
val get_executable : t -> stringGets the executable's name for the installed application.
This is intended to be used for debugging or labelling what program is going to be run. To launch the executable, use g_app_info_launch() and related functions, rather than spawning the return value from this function.
val get_display_name : t -> stringGets the display name of the application. The display name is often more descriptive to the user than the name itself.
val get_description : t -> string optionGets a human-readable description of an installed application.
val get_commandline : t -> string optionGets the commandline with which the application will be started.
Checks if two #GAppInfos are equal.
Note that the check *may not* compare each individual field, and only does an identity check. In case detecting changes in the contents is needed, program code must additionally compare relevant fields.
val delete : t -> boolTries to delete a #GAppInfo.
On some platforms, there may be a difference between user-defined #GAppInfos which can be deleted, and system-wide ones which cannot. See g_app_info_can_delete().
val can_remove_supports_type : t -> boolChecks if a supported content type can be removed from an application.
val can_delete : t -> boolObtains the information whether the #GAppInfo can be deleted. See g_app_info_delete().