docs: Move the GAppInfo SECTION

Move the contents to the struct docs.

Helps: #3037
This commit is contained in:
Matthias Clasen 2023-09-25 20:52:47 -04:00 committed by Philip Withnall
parent 5ab04d05dc
commit 61d869467f
2 changed files with 19 additions and 26 deletions

View File

@ -45,37 +45,37 @@
#endif #endif
/** /**
* SECTION:gappinfo * GAppInfo:
* @short_description: Application information and launch contexts *
* @include: gio/gio.h * Information about an installed application and methods to launch
* @see_also: #GAppInfoMonitor * it (with file arguments).
*
* #GAppInfo and #GAppLaunchContext are used for describing and launching * `GAppInfo` and `GAppLaunchContext` are used for describing and launching
* applications installed on the system. * applications installed on the system.
* *
* As of GLib 2.20, URIs will always be converted to POSIX paths * As of GLib 2.20, URIs will always be converted to POSIX paths
* (using g_file_get_path()) when using g_app_info_launch() even if * (using [method@Gio.File.get_path]) when using [method@Gio.AppInfo.launch]
* the application requested an URI and not a POSIX path. For example * even if the application requested an URI and not a POSIX path. For example
* for a desktop-file based application with Exec key `totem * for a desktop-file based application with Exec key `totem
* %U` and a single URI, `sftp://foo/file.avi`, then * %U` and a single URI, `sftp://foo/file.avi`, then
* `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will * `/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 * only work if a set of suitable GIO extensions (such as GVfs 2.26
* compiled with FUSE support), is available and operational; if this * compiled with FUSE support), is available and operational; if this
* is not the case, the URI will be passed unmodified to the application. * 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 * 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 * path (in GVfs there's no FUSE mount for it); such URIs will be
* passed unmodified to the application. * passed unmodified to the application.
* *
* Specifically for gvfs 2.26 and later, the POSIX URI will be mapped * Specifically for GVfs 2.26 and later, the POSIX URI will be mapped
* back to the GIO URI in the #GFile constructors (since gvfs * back to the GIO URI in the [struct@Gio.File] constructors (since GVfs
* implements the #GVfs extension point). As such, if the application * implements the GVfs extension point). As such, if the application
* needs to examine the URI, it needs to use g_file_get_uri() or * needs to examine the URI, it needs to use [method@Gio.File.get_uri]
* similar on #GFile. In other words, an application cannot assume * or similar on [struct@Gio.File]. In other words, an application cannot
* that the URI passed to e.g. g_file_new_for_commandline_arg() is * assume that the URI passed to e.g. [func@Gio.File.new_for_commandline_arg]
* equal to the result of g_file_get_uri(). The following snippet * is equal to the result of [method@Gio.File.get_uri]. The following snippet
* illustrates this: * illustrates this:
* *
* |[ * ```c
* GFile *f; * GFile *f;
* char *uri; * char *uri;
* *
@ -90,7 +90,7 @@
* // do something special with uri * // do something special with uri
* } * }
* g_object_unref (file); * g_object_unref (file);
* ]| * ```
* *
* This code will work when both `cdda://sr0/Track 1.wav` and * 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 * `/home/user/.gvfs/cdda on sr0/Track 1.wav` is passed to the

View File

@ -46,13 +46,6 @@ G_BEGIN_DECLS
typedef struct _GAppLaunchContextClass GAppLaunchContextClass; typedef struct _GAppLaunchContextClass GAppLaunchContextClass;
typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate; typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate;
/**
* GAppInfo:
*
* Information about an installed application and methods to launch
* it (with file arguments).
*/
/** /**
* GAppInfoIface: * GAppInfoIface:
* @g_iface: The parent interface. * @g_iface: The parent interface.