gio-sharp
GLib.IWrapper
This interface provides application information. See and for concretes implementations and usage.
The following code sample lists all the application installed on your system:
public class TestAppInfo
{
static void Main (string[] args)
{
GLib.GType.Init ();
foreach (AppInfo appinfo in AppInfoAdapter.All)
Console.WriteLine ("\t{0}: {1}, {2} ", appinfo.Name, appinfo.Descritpion, appinfo.Executable);
}
}
Method
System.Boolean
To be added.
Adds a content type to the application.
Always returns True. Throw a if something went wrong.
Adds a content type to the application information to indicate the application is capable of opening files with the given content type.
This method always returns True, or throw a if something went wrong.
Method
System.Boolean
To be added.
To be added.
To be added.
Property
System.Boolean
If a supported content type can be removed from an application.
True if it is possible to remove supported content types from the application, False if not.
To be added.
Property
System.String
To be added.
To be added.
To be added.
Method
System.Boolean
To be added.
To be added.
To be added.
Property
System.String
An human-readable description of an installed application.
A string containing a description of the application, or null if none.
The following code snippet:
AppInfo app_info = AppInfoAdapter.GetDefaultForType ("image/jpeg", false);
Console.WriteLine ("{0}:\t{1}", app_info.Name, app_info.Description);
produces the following output (depending on your installation):
Eye of Gnome: Browse and rotate images
Property
System.String
To be added.
To be added.
To be added.
Method
GLib.AppInfo
To be added.
To be added.
To be added.
Method
System.Boolean
To be added.
To be added.
To be added.
To be added.
Property
System.String
The executable's name for the installed application.
A string containing the AppInfo's application binary's name.
To be added.
Property
GLib.Icon
The for the application.
The default for the application.
To be added.
Property
System.String
The ID of an application.
A string containing the application's ID.
An id si s a string that identifies the application. The exact format of the id is platform depenedent. For instance, on Unix, this is the desktop file id from the xdg menu specification.
Method
System.Boolean
A of objects, or null to launch the application without arguments.
An , or null.
Launches the application.
Always returns True. Throws a if something went wrong.
Launches the application. Passes files to the launched application as arguments, using the optional launch_context to get information about the details of the launcher (like what screen it is on). Throws a on error.
To lauch 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 instead.
Method
System.Boolean
A of containing URIs to launch, or null.
A , or null.
Launches the application.
Always returns True. Throws a if something went wrong.
Launches the application. Passes uris to the launched application as arguments, using the optional launch_context to get information about the details of the launcher (like what screen it is on). On error, throws a
To lauch 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.
Property
System.String
The name of the installed application.
A containing the name of the application.
To be added.
Method
System.Boolean
A containing a content type. On Unix, content types are mimetypes, so "image/jpeg" is a valid content type.
Removes a supported type from an application, if possible.
Always returns True. Throws a if something went wrong.
This method always returns True, but throws on any error. Checking first will avoid some exceptions, but that doesn't mean it won't throw at all.
Method
System.Boolean
A containing the file extension (without the dot).
Sets the application as the default handler for the given file extension.
Always returns True. Throws a if something went wrong.
This method always returns True, or throw a if something went wrong.
Method
System.Boolean
A containing the content type.
Sets the application as the default handler for a given type.
Always returns True. Throws a if something went wrong.
This method always returns True, or throw a if something went wrong.
Method
System.Boolean
To be added.
To be added.
To be added.
To be added.
Property
System.Boolean
If the application info should be shown in menus that list available applications.
True if the application should be shown, False otherwise.
To be added.
Property
System.Boolean
If the application accepts files as arguments.
True if the application supports files.
To be added.
Property
System.Boolean
If the application supports reading files and directories from URIs.
True if the application supports URIs.
To be added.