Glib.App_Info.Gapp_Info and Glib.App_Launch_Context.Gapp_Launch_Context are used for describing and launching applications installed on the system.
As of GLib 2.20, URIs will always be converted to POSIX paths (using Glib.GFile.Get_Path) when using Glib.App_Info.Launch even if the application requested an URI and not a POSIX path. For example for a desktop-file based application with Exec key totem %U and a single URI, sftp://foo/file.avi, then /home/user/.gvfs/sftp on foo/file.avi will be passed. This will only work if a set of suitable GIO extensions (such as gvfs 2.26 compiled with FUSE support), is available and operational; if this is not the case, the URI will be passed unmodified to the application. Some URIs, such as mailto:, of course cannot be mapped to a POSIX path (in gvfs there's no FUSE mount for it); such URIs will be passed unmodified to the application.
Specifically for gvfs 2.26 and later, the POSIX URI will be mapped back to the GIO URI in the Glib.GFile.Gfile constructors (since gvfs implements the Gvfs.Gvfs extension point). As such, if the application needs to examine the URI, it needs to use Glib.GFile.Get_Uri or similar on Glib.GFile.Gfile. In other words, an application cannot assume that the URI passed to e.g. Glib.GFile.New_For_Commandline_Arg is equal to the result of Glib.GFile.Get_Uri. The following snippet illustrates this:
GFile *f;
char *uri;
file = g_file_new_for_commandline_arg (uri_from_commandline);
uri = g_file_get_uri (file);
strcmp (uri, uri_from_commandline) == 0;
g_free (uri);
if (g_file_has_uri_scheme (file, "cdda"))
{
// do something special with uri
}
g_object_unref (file);
This code will work when both cdda://sr0/Track 1.wav and /home/user/.gvfs/cdda on sr0/Track 1.wav is passed to the application. It should be noted that it's generally not safe for applications to rely on the format of a particular URIs. Different launcher applications (e.g. file managers) may have different ideas of what a given URI means.
function "+" (W : Gapp_Info) return Gapp_Info
function Add_Supports_Type
(Self : Gapp_Info;
Content_Type : UTF8_String;
Error : out Glib.Error.GError) return Boolean
Adds a content type to the application information to indicate the application is capable of opening files with the given content type.
a string.
the return location for a recoverable error
True on success, False on error.
subtype App_Info_Interface_Descr is Glib.Object.Interface_Description;
package App_Info_List is new Generic_List (Glib.App_Info.Gapp_Info);
function Can_Delete (Self : Gapp_Info) return Boolean
Obtains the information whether the Glib.App_Info.Gapp_Info can be deleted. See Glib.App_Info.Delete. Since: gtk+ 2.20
True if Appinfo can be deleted
function Can_Remove_Supports_Type (Self : Gapp_Info) return Boolean
Checks if a supported content type can be removed from an application.
True if it is possible to remove supported content types from a given Appinfo, False if not.
function Convert (R : Glib.App_Info.Gapp_Info) return System.Address
function Convert (R : System.Address) return Glib.App_Info.Gapp_Info
type Create_Flags is mod 2 ** Integer'Size;
Flags used when creating a Glib.App_Info.Gapp_Info.
package Create_Flags_Properties is
new Generic_Internal_Flags_Property (Create_Flags);
function Create_From_Commandline
(Commandline : UTF8_String;
Application_Name : UTF8_String := "";
Flags : Create_Flags;
Error : out Glib.Error.GError) return Gapp_Info
Creates a new Glib.App_Info.Gapp_Info from the given information. Note that for Commandline, the quoting rules of the Exec key of the freedesktop.org Desktop Entry Specification are applied. For example, if the Commandline contains percent-encoded URIs, the percent-character must be doubled in order to prevent it from being swallowed by Exec key unquoting. See the specification for exact quoting rules.
the commandline to use
the application name, or null to use Commandline
flags that can specify details of the created Glib.App_Info.Gapp_Info
the return location for a recoverable error
new Glib.App_Info.Gapp_Info for given command.
function Delete (Self : Gapp_Info) return Boolean
Tries to delete a Glib.App_Info.Gapp_Info. On some platforms, there may be a difference between user-defined GApp_Infos which can be deleted, and system-wide ones which cannot. See Glib.App_Info.Can_Delete. Since: gtk+ 2.20
True if Appinfo has been deleted
function Dup (Self : Gapp_Info) return Gapp_Info
Creates a duplicate of a Glib.App_Info.Gapp_Info.
a duplicate of Appinfo.
function Equal (Self : Gapp_Info; Appinfo2 : Gapp_Info) return Boolean
Checks if two GApp_Infos 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.
the second Glib.App_Info.Gapp_Info.
True if Appinfo1 is equal to Appinfo2. False otherwise.
G_App_Info_Create_Needs_Terminal : constant Create_Flags := 1;
G_App_Info_Create_None : constant Create_Flags := 0;
G_App_Info_Create_Supports_Startup_Notification : constant Create_Flags := 4;
G_App_Info_Create_Supports_Uris : constant Create_Flags := 2;
type Gapp_Info is new Glib.Types.GType_Interface;
type Gasync_Ready_Callback is access procedure
(Source_Object : access Glib.Object.GObject_Record'Class;
Res : Glib.G_Async_Result);
Type definition for a function that will be called back when an asynchronous operation within GIO has been completed. Gasync_Ready_Callback callbacks from Gtask.Gtask are guaranteed to be invoked in a later iteration of the thread-default main context (see [methodGlib.MainContext.push_thread_default]) where the Gtask.Gtask was created. All other users of Gasync_Ready_Callback must likewise call it asynchronously in a later iteration of the main context. The asynchronous operation is guaranteed to have held a reference to Source_Object from the time when the *_async function was called, until after this callback returns.
the object the asynchronous operation was started with.
a Glib.G_Async_Result.
function Get_All return App_Info_List.Glist
Gets a list of all of the applications currently registered on this system. For desktop files, this includes applications that have NoDisplay=true set or are excluded from display by means of OnlyShowIn or NotShowIn. See Glib.App_Info.Should_Show. The returned list does not include applications which have the Hidden key set.
a newly allocated GList of references to GApp_Infos.
function Get_All_For_Type
(Content_Type : UTF8_String) return App_Info_List.Glist
Gets a list of all GApp_Infos for a given content type, including the recommended and fallback GApp_Infos. See Glib.App_Info.Get_Recommended_For_Type and Glib.App_Info.Get_Fallback_For_Type.
the content type to find a Glib.App_Info.Gapp_Info for
GList of GApp_Infos for given Content_Type or null on error.
function Get_Commandline (Self : Gapp_Info) return UTF8_String
Gets the commandline with which the application will be started. Since: gtk+ 2.20
a string containing the Appinfo's commandline, or null if this information is not available
function Get_Default_For_Type
(Content_Type : UTF8_String;
Must_Support_Uris : Boolean) return Gapp_Info
Gets the default Glib.App_Info.Gapp_Info for a given content type.
the content type to find a Glib.App_Info.Gapp_Info for
if True, the Glib.App_Info.Gapp_Info is expected to support URIs
Glib.App_Info.Gapp_Info for given Content_Type or null on error.
procedure Get_Default_For_Type_Async
(Content_Type : UTF8_String;
Must_Support_Uris : Boolean;
Cancellable : access Glib.Cancellable.Gcancellable_Record'Class;
Callback : Gasync_Ready_Callback)
Asynchronously gets the default Glib.App_Info.Gapp_Info for a given content type. Since: gtk+ 2.74
the content type to find a Glib.App_Info.Gapp_Info for
if True, the Glib.App_Info.Gapp_Info is expected to support URIs
optional Glib.Cancellable.Gcancellable object, null to ignore
a Gasync_Ready_Callback to call when the request is done
function Get_Default_For_Type_Finish
(Result : Glib.G_Async_Result;
Error : out Glib.Error.GError) return Gapp_Info
Finishes a default Glib.App_Info.Gapp_Info lookup started by Glib.App_Info.Get_Default_For_Type_Async. If no Glib.App_Info.Gapp_Info is found, then Error will be set to G_IO_ERROR_NOT_FOUND. Since: gtk+ 2.74
a Glib.G_Async_Result
the return location for a recoverable error
Glib.App_Info.Gapp_Info for given Content_Type or null on error.
function Get_Default_For_Uri_Scheme
(Uri_Scheme : UTF8_String) return Gapp_Info
Gets the default application for handling URIs with the given URI scheme. A URI scheme is the initial part of the URI, up to but not including the ':', e.g. "http", "ftp" or "sip".
a string containing a URI scheme.
Glib.App_Info.Gapp_Info for given Uri_Scheme or null on error.
procedure Get_Default_For_Uri_Scheme_Async
(Uri_Scheme : UTF8_String;
Cancellable : access Glib.Cancellable.Gcancellable_Record'Class;
Callback : Gasync_Ready_Callback)
Asynchronously gets the default application for handling URIs with the given URI scheme. A URI scheme is the initial part of the URI, up to but not including the ':', e.g. "http", "ftp" or "sip". Since: gtk+ 2.74
a string containing a URI scheme.
optional Glib.Cancellable.Gcancellable object, null to ignore
a Gasync_Ready_Callback to call when the request is done
function Get_Default_For_Uri_Scheme_Finish
(Result : Glib.G_Async_Result;
Error : out Glib.Error.GError) return Gapp_Info
Finishes a default Glib.App_Info.Gapp_Info lookup started by Glib.App_Info.Get_Default_For_Uri_Scheme_Async. If no Glib.App_Info.Gapp_Info is found, then Error will be set to G_IO_ERROR_NOT_FOUND. Since: gtk+ 2.74
a Glib.G_Async_Result
the return location for a recoverable error
Glib.App_Info.Gapp_Info for given Uri_Scheme or null on error.
function Get_Description (Self : Gapp_Info) return UTF8_String
Gets a human-readable description of an installed application.
a string containing a description of the application Appinfo, or null if none.
function Get_Display_Name (Self : Gapp_Info) return UTF8_String
Gets the display name of the application. The display name is often more descriptive to the user than the name itself. Since: gtk+ 2.24
the display name of the application for Appinfo, or the name if no display name is available.
function Get_Executable (Self : Gapp_Info) return UTF8_String
Gets 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 Glib.App_Info.Launch and related functions, rather than spawning the return value from this function.
a string containing the Appinfo's application binaries name
function Get_Fallback_For_Type
(Content_Type : UTF8_String) return App_Info_List.Glist
Gets a list of fallback GApp_Infos for a given content type, i.e. those applications which claim to support the given content type by MIME type subclassing and not directly. Since: gtk+ 2.28
the content type to find a Glib.App_Info.Gapp_Info for
GList of GApp_Infos for given Content_Type or null on error.
function Get_Icon (Self : Gapp_Info) return Glib.G_Icon.G_Icon
Gets the icon for the application.
the default Glib.G_Icon.G_Icon for Appinfo or null if there is no default icon.
function Get_Id (Self : Gapp_Info) return UTF8_String
Gets 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.
a string containing the application's ID.
function Get_Name (Self : Gapp_Info) return UTF8_String
Gets the installed name of the application.
the name of the application for Appinfo.
function Get_Recommended_For_Type
(Content_Type : UTF8_String) return App_Info_List.Glist
Gets a list of recommended GApp_Infos for a given content type, i.e. those applications which claim to support the given content type exactly, and not by MIME type subclassing. Note that the first application of the list is the last used one, i.e. the last one for which Glib.App_Info.Set_As_Last_Used_For_Type has been called. Since: gtk+ 2.28
the content type to find a Glib.App_Info.Gapp_Info for
GList of GApp_Infos for given Content_Type or null on error.
function Get_Supported_Types
(Self : Gapp_Info) return GNAT.Strings.String_List
Retrieves 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 Glib.App_Info.Add_Supports_Type, but only those exported directly by the application. Since: gtk+ 2.34
a list of content types.
function Get_Type return Glib.GType
function Launch
(Self : Gapp_Info;
Files : Glib.GFile.Gfile_List.Glist;
Context : access Glib.App_Launch_Context.Gapp_Launch_Context_Record'Class;
Error : out Glib.Error.GError) return Boolean
Launches 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 Glib.App_Info.Launch_Uris instead. The launched application inherits the environment of the launching process, but it can be modified with Glib.App_Launch_Context.Setenv and Glib.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.
a GList of Glib.GFile.Gfile objects
a Glib.App_Launch_Context.Gapp_Launch_Context or null
the return location for a recoverable error
True on successful launch, False otherwise.
function Launch_Default_For_Uri
(URI : UTF8_String;
Context : access Glib.App_Launch_Context.Gapp_Launch_Context_Record'Class;
Error : out Glib.Error.GError) return Boolean
Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if required. The D-Busâactivated applications don't have to be started if your application terminates too soon after this function. To prevent this, use Glib.App_Info.Launch_Default_For_Uri_Async instead.
the uri to show
an optional Glib.App_Launch_Context.Gapp_Launch_Context
the return location for a recoverable error
True on success, False on error.
procedure Launch_Default_For_Uri_Async
(URI : UTF8_String;
Context : access Glib.App_Launch_Context.Gapp_Launch_Context_Record'Class;
Cancellable : access Glib.Cancellable.Gcancellable_Record'Class;
Callback : Gasync_Ready_Callback)
Async version of Glib.App_Info.Launch_Default_For_Uri. This version is useful if you are interested in receiving error information in the case where the application is sandboxed and the portal may present an application chooser dialog to the user. This is also useful if you want to be sure that the D-Busâactivated applications are really started before termination and if you are interested in receiving error information from their activation. Since: gtk+ 2.50
the uri to show
an optional Glib.App_Launch_Context.Gapp_Launch_Context
a Glib.Cancellable.Gcancellable
a Gasync_Ready_Callback to call when the request is done
function Launch_Default_For_Uri_Finish
(Result : Glib.G_Async_Result;
Error : out Glib.Error.GError) return Boolean
Finishes an asynchronous launch-default-for-uri operation. Since: gtk+ 2.50
a Glib.G_Async_Result
the return location for a recoverable error
True if the launch was successful, False if Error is set
function Launch_Uris
(Self : Gapp_Info;
Uris : Gtk.Enums.String_List.Glist;
Context : access Glib.App_Launch_Context.Gapp_Launch_Context_Record'Class;
Error : out Glib.Error.GError) return Boolean
Launches 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.
a GList containing URIs to launch.
a Glib.App_Launch_Context.Gapp_Launch_Context or null
the return location for a recoverable error
True on successful launch, False otherwise.
procedure Launch_Uris_Async
(Self : Gapp_Info;
Uris : Gtk.Enums.String_List.Glist;
Context : access Glib.App_Launch_Context.Gapp_Launch_Context_Record'Class;
Cancellable : access Glib.Cancellable.Gcancellable_Record'Class;
Callback : Gasync_Ready_Callback)
Async version of Glib.App_Info.Launch_Uris. The Callback is invoked immediately after the application launch, but it waits for activation in case of D-Busâactivated applications and also provides extended error information for sandboxed applications, see notes for Glib.App_Info.Launch_Default_For_Uri_Async. Since: gtk+ 2.60
a GList containing URIs to launch.
a Glib.App_Launch_Context.Gapp_Launch_Context or null
a Glib.Cancellable.Gcancellable
a Gasync_Ready_Callback to call when the request is done
function Launch_Uris_Finish
(Self : Gapp_Info;
Result : Glib.G_Async_Result;
Error : out Glib.Error.GError) return Boolean
Finishes a Glib.App_Info.Launch_Uris_Async operation. Since: gtk+ 2.60
a Glib.G_Async_Result
the return location for a recoverable error
True on successful launch, False otherwise.
Null_Gapp_Info : constant Gapp_Info;
type Property_Create_Flags is new Create_Flags_Properties.Property;
function Remove_Supports_Type
(Self : Gapp_Info;
Content_Type : UTF8_String;
Error : out Glib.Error.GError) return Boolean
Removes a supported type from an application, if possible.
a string.
the return location for a recoverable error
True on success, False on error.
procedure Reset_Type_Associations (Content_Type : UTF8_String)
Removes all changes to the type associations done by Glib.App_Info.Set_As_Default_For_Type, Glib.App_Info.Set_As_Default_For_Extension, Glib.App_Info.Add_Supports_Type or Glib.App_Info.Remove_Supports_Type. Since: gtk+ 2.20
a content type
procedure Set_Add_Supports_Type
(Self : App_Info_Interface_Descr;
Handler : Virtual_Add_Supports_Type)
function Set_As_Default_For_Extension
(Self : Gapp_Info;
Extension : UTF8_String;
Error : out Glib.Error.GError) return Boolean
Sets the application as the default handler for the given file extension.
a string containing the file extension (without the dot).
the return location for a recoverable error
True on success, False on error.
function Set_As_Default_For_Type
(Self : Gapp_Info;
Content_Type : UTF8_String;
Error : out Glib.Error.GError) return Boolean
Sets the application as the default handler for a given type.
the content type.
the return location for a recoverable error
True on success, False on error.
function Set_As_Last_Used_For_Type
(Self : Gapp_Info;
Content_Type : UTF8_String;
Error : out Glib.Error.GError) return Boolean
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 Glib.App_Info.Get_Recommended_For_Type, regardless of the default application for that content type.
the content type.
the return location for a recoverable error
True on success, False on error.
procedure Set_Can_Delete
(Self : App_Info_Interface_Descr;
Handler : Virtual_Can_Delete)
procedure Set_Can_Remove_Supports_Type
(Self : App_Info_Interface_Descr;
Handler : Virtual_Can_Remove_Supports_Type)
procedure Set_Do_Delete
(Self : App_Info_Interface_Descr;
Handler : Virtual_Do_Delete)
procedure Set_Dup
(Self : App_Info_Interface_Descr;
Handler : Virtual_Dup)
procedure Set_Equal
(Self : App_Info_Interface_Descr;
Handler : Virtual_Equal)
procedure Set_Get_Commandline
(Self : App_Info_Interface_Descr;
Handler : Virtual_Get_Commandline)
procedure Set_Get_Description
(Self : App_Info_Interface_Descr;
Handler : Virtual_Get_Description)
procedure Set_Get_Display_Name
(Self : App_Info_Interface_Descr;
Handler : Virtual_Get_Display_Name)
procedure Set_Get_Executable
(Self : App_Info_Interface_Descr;
Handler : Virtual_Get_Executable)
procedure Set_Get_Icon
(Self : App_Info_Interface_Descr;
Handler : Virtual_Get_Icon)
procedure Set_Get_Id
(Self : App_Info_Interface_Descr;
Handler : Virtual_Get_Id)
procedure Set_Get_Name
(Self : App_Info_Interface_Descr;
Handler : Virtual_Get_Name)
procedure Set_Get_Supported_Types
(Self : App_Info_Interface_Descr;
Handler : Virtual_Get_Supported_Types)
procedure Set_Launch
(Self : App_Info_Interface_Descr;
Handler : Virtual_Launch)
procedure Set_Launch_Uris
(Self : App_Info_Interface_Descr;
Handler : Virtual_Launch_Uris)
procedure Set_Launch_Uris_Async
(Self : App_Info_Interface_Descr;
Handler : Virtual_Launch_Uris_Async)
procedure Set_Launch_Uris_Finish
(Self : App_Info_Interface_Descr;
Handler : Virtual_Launch_Uris_Finish)
procedure Set_Remove_Supports_Type
(Self : App_Info_Interface_Descr;
Handler : Virtual_Remove_Supports_Type)
procedure Set_Set_As_Default_For_Extension
(Self : App_Info_Interface_Descr;
Handler : Virtual_Set_As_Default_For_Extension)
procedure Set_Set_As_Default_For_Type
(Self : App_Info_Interface_Descr;
Handler : Virtual_Set_As_Default_For_Type)
procedure Set_Set_As_Last_Used_For_Type
(Self : App_Info_Interface_Descr;
Handler : Virtual_Set_As_Last_Used_For_Type)
procedure Set_Should_Show
(Self : App_Info_Interface_Descr;
Handler : Virtual_Should_Show)
procedure Set_Supports_Files
(Self : App_Info_Interface_Descr;
Handler : Virtual_Supports_Files)
procedure Set_Supports_Uris
(Self : App_Info_Interface_Descr;
Handler : Virtual_Supports_Uris)
See Glib.Object.Add_Interface
See Glib.Object.Add_Interface
function Should_Show (Self : Gapp_Info) return Boolean
Checks if the application info should be shown in menus that list available applications.
True if the Appinfo should be shown, False otherwise.
function Supports_Files (Self : Gapp_Info) return Boolean
Checks if the application accepts files as arguments.
True if the Appinfo supports files.
function Supports_Uris (Self : Gapp_Info) return Boolean
Checks if the application supports reading files and directories from URIs.
True if the Appinfo supports URIs.
type Virtual_Add_Supports_Type is access function
(Self : Gapp_Info;
Content_Type : Gtkada.Types.Chars_Ptr;
Error : out Glib.Error.GError) return Glib.Gboolean;
Adds a content type to the application information to indicate the application is capable of opening files with the given content type.
a string.
the return location for a recoverable error
True on success, False on error.
type Virtual_Can_Delete is access function (Self : Gapp_Info) return Glib.Gboolean;
Obtains the information whether the Glib.App_Info.Gapp_Info can be deleted. See Glib.App_Info.Delete. Since: gtk+ 2.20
True if Appinfo can be deleted
type Virtual_Can_Remove_Supports_Type is access function (Self : Gapp_Info) return Glib.Gboolean;
Checks if a supported content type can be removed from an application.
True if it is possible to remove supported content types from a given Appinfo, False if not.
type Virtual_Do_Delete is access function (Self : Gapp_Info) return Glib.Gboolean;
Tries to delete a Glib.App_Info.Gapp_Info. On some platforms, there may be a difference between user-defined GApp_Infos which can be deleted, and system-wide ones which cannot. See Glib.App_Info.Can_Delete. Since: gtk+ 2.20
True if Appinfo has been deleted
type Virtual_Dup is access function (Self : Gapp_Info) return Gapp_Info;
Creates a duplicate of a Glib.App_Info.Gapp_Info.
a duplicate of Appinfo.
type Virtual_Equal is access function
(Self : Gapp_Info;
Appinfo2 : Gapp_Info) return Glib.Gboolean;
Checks if two GApp_Infos 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.
the second Glib.App_Info.Gapp_Info.
True if Appinfo1 is equal to Appinfo2. False otherwise.
type Virtual_Get_Commandline is access function (Self : Gapp_Info) return Gtkada.Types.Chars_Ptr;
Gets the commandline with which the application will be started. Since: gtk+ 2.20
a string containing the Appinfo's commandline, or null if this information is not available
type Virtual_Get_Description is access function (Self : Gapp_Info) return Gtkada.Types.Chars_Ptr;
Gets a human-readable description of an installed application.
a string containing a description of the application Appinfo, or null if none.
type Virtual_Get_Display_Name is access function (Self : Gapp_Info) return Gtkada.Types.Chars_Ptr;
Gets the display name of the application. The display name is often more descriptive to the user than the name itself. Since: gtk+ 2.24
the display name of the application for Appinfo, or the name if no display name is available.
type Virtual_Get_Executable is access function (Self : Gapp_Info) return Gtkada.Types.Chars_Ptr;
Gets 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 Glib.App_Info.Launch and related functions, rather than spawning the return value from this function.
a string containing the Appinfo's application binaries name
type Virtual_Get_Icon is access function (Self : Gapp_Info) return Glib.G_Icon.G_Icon;
Gets the icon for the application.
the default Glib.G_Icon.G_Icon for Appinfo or null if there is no default icon.
type Virtual_Get_Id is access function (Self : Gapp_Info) return Gtkada.Types.Chars_Ptr;
Gets 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.
a string containing the application's ID.
type Virtual_Get_Name is access function (Self : Gapp_Info) return Gtkada.Types.Chars_Ptr;
Gets the installed name of the application.
the name of the application for Appinfo.
type Virtual_Get_Supported_Types is access function (Self : Gapp_Info) return chars_ptr_array_access;
Retrieves 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 Glib.App_Info.Add_Supports_Type, but only those exported directly by the application. Since: gtk+ 2.34
a list of content types.
type Virtual_Launch is access function
(Self : Gapp_Info;
Files : System.Address;
Context : System.Address;
Error : out Glib.Error.GError) return Glib.Gboolean;
Launches 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 Glib.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.
a GList of Glib.GFile.Gfile objects
a Glib.App_Launch_Context.Gapp_Launch_Context or null
the return location for a recoverable error
True on successful launch, False otherwise.
type Virtual_Launch_Uris is access function
(Self : Gapp_Info;
Uris : System.Address;
Context : System.Address;
Error : out Glib.Error.GError) return Glib.Gboolean;
Launches 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.
a GList containing URIs to launch.
a Glib.App_Launch_Context.Gapp_Launch_Context or null
the return location for a recoverable error
True on successful launch, False otherwise.
type Virtual_Launch_Uris_Async is access procedure
(Self : Gapp_Info;
Uris : System.Address;
Context : System.Address;
Cancellable : System.Address;
Callback : System.Address;
User_Data : System.Address);
Async version of Glib.App_Info.Launch_Uris. The Callback is invoked immediately after the application launch, but it waits for activation in case of D-Busâactivated applications and also provides extended error information for sandboxed applications, see notes for Glib.App_Info.Launch_Default_For_Uri_Async. Since: gtk+ 2.60
a GList containing URIs to launch.
a Glib.App_Launch_Context.Gapp_Launch_Context or null
a Glib.Cancellable.Gcancellable
a Gasync_Ready_Callback to call when the request is done
data to pass to Callback
type Virtual_Launch_Uris_Finish is access function
(Self : Gapp_Info;
Result : Glib.G_Async_Result;
Error : out Glib.Error.GError) return Glib.Gboolean;
Finishes a Glib.App_Info.Launch_Uris_Async operation. Since: gtk+ 2.60
a Glib.G_Async_Result
the return location for a recoverable error
True on successful launch, False otherwise.
type Virtual_Remove_Supports_Type is access function
(Self : Gapp_Info;
Content_Type : Gtkada.Types.Chars_Ptr;
Error : out Glib.Error.GError) return Glib.Gboolean;
Removes a supported type from an application, if possible.
a string.
the return location for a recoverable error
True on success, False on error.
type Virtual_Set_As_Default_For_Extension is access function
(Self : Gapp_Info;
Extension : Gtkada.Types.Chars_Ptr;
Error : out Glib.Error.GError) return Glib.Gboolean;
Sets the application as the default handler for the given file extension.
a string containing the file extension (without the dot).
the return location for a recoverable error
True on success, False on error.
type Virtual_Set_As_Default_For_Type is access function
(Self : Gapp_Info;
Content_Type : Gtkada.Types.Chars_Ptr;
Error : out Glib.Error.GError) return Glib.Gboolean;
Sets the application as the default handler for a given type.
the content type.
the return location for a recoverable error
True on success, False on error.
type Virtual_Set_As_Last_Used_For_Type is access function
(Self : Gapp_Info;
Content_Type : Gtkada.Types.Chars_Ptr;
Error : out Glib.Error.GError) return Glib.Gboolean;
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 Glib.App_Info.Get_Recommended_For_Type, regardless of the default application for that content type.
the content type.
the return location for a recoverable error
True on success, False on error.
type Virtual_Should_Show is access function (Self : Gapp_Info) return Glib.Gboolean;
Checks if the application info should be shown in menus that list available applications.
True if the Appinfo should be shown, False otherwise.
type Virtual_Supports_Files is access function (Self : Gapp_Info) return Glib.Gboolean;
Checks if the application accepts files as arguments.
True if the Appinfo supports files.
type Virtual_Supports_Uris is access function (Self : Gapp_Info) return Glib.Gboolean;
Checks if the application supports reading files and directories from URIs.
True if the Appinfo supports URIs.