mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-30 10:56:37 +02:00
Merge branch 'gir-gio-unix-split' into 'main'
girepository: Remove backward compatibility introspection from Gio-2.0 Closes #3744 See merge request GNOME/glib!4761
This commit is contained in:
@@ -1795,7 +1795,7 @@ g_desktop_app_info_class_init (GDesktopAppInfoClass *klass)
|
|||||||
/**
|
/**
|
||||||
* GDesktopAppInfo:filename:
|
* GDesktopAppInfo:filename:
|
||||||
*
|
*
|
||||||
* The origin filename of this [class@Gio.DesktopAppInfo]
|
* The origin filename of this [class@GioUnix.DesktopAppInfo]
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_FILENAME,
|
PROP_FILENAME,
|
||||||
@@ -2084,9 +2084,9 @@ g_desktop_app_info_load_file (GDesktopAppInfo *self)
|
|||||||
* g_desktop_app_info_new_from_keyfile:
|
* g_desktop_app_info_new_from_keyfile:
|
||||||
* @key_file: an opened [type@GLib.KeyFile]
|
* @key_file: an opened [type@GLib.KeyFile]
|
||||||
*
|
*
|
||||||
* Creates a new [class@Gio.DesktopAppInfo].
|
* Creates a new [class@GioUnix.DesktopAppInfo].
|
||||||
*
|
*
|
||||||
* Returns: (nullable): a new [class@Gio.DesktopAppInfo] or `NULL` on error.
|
* Returns: (nullable): a new [class@GioUnix.DesktopAppInfo] or `NULL` on error.
|
||||||
*
|
*
|
||||||
* Since: 2.18
|
* Since: 2.18
|
||||||
**/
|
**/
|
||||||
@@ -2113,9 +2113,9 @@ g_desktop_app_info_new_from_keyfile (GKeyFile *key_file)
|
|||||||
* @filename: (type filename): the path of a desktop file, in the GLib
|
* @filename: (type filename): the path of a desktop file, in the GLib
|
||||||
* filename encoding
|
* filename encoding
|
||||||
*
|
*
|
||||||
* Creates a new [class@Gio.DesktopAppInfo].
|
* Creates a new [class@GioUnix.DesktopAppInfo].
|
||||||
*
|
*
|
||||||
* Returns: (nullable): a new [class@Gio.DesktopAppInfo] or `NULL` on error.
|
* Returns: (nullable): a new [class@GioUnix.DesktopAppInfo] or `NULL` on error.
|
||||||
**/
|
**/
|
||||||
GDesktopAppInfo *
|
GDesktopAppInfo *
|
||||||
g_desktop_app_info_new_from_filename (const char *filename)
|
g_desktop_app_info_new_from_filename (const char *filename)
|
||||||
@@ -2135,7 +2135,7 @@ g_desktop_app_info_new_from_filename (const char *filename)
|
|||||||
* g_desktop_app_info_new:
|
* g_desktop_app_info_new:
|
||||||
* @desktop_id: the desktop file ID
|
* @desktop_id: the desktop file ID
|
||||||
*
|
*
|
||||||
* Creates a new [class@Gio.DesktopAppInfo] based on a desktop file ID.
|
* Creates a new [class@GioUnix.DesktopAppInfo] based on a desktop file ID.
|
||||||
*
|
*
|
||||||
* A desktop file ID is the basename of the desktop file, including the
|
* 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
|
* `.desktop` extension. GIO is looking for a desktop file with this name
|
||||||
@@ -2147,7 +2147,7 @@ g_desktop_app_info_new_from_filename (const char *filename)
|
|||||||
* (i.e. a desktop ID of `kde-foo.desktop` will match
|
* (i.e. a desktop ID of `kde-foo.desktop` will match
|
||||||
* `/usr/share/applications/kde/foo.desktop`).
|
* `/usr/share/applications/kde/foo.desktop`).
|
||||||
*
|
*
|
||||||
* Returns: (nullable): a new [class@Gio.DesktopAppInfo], or `NULL` if no
|
* Returns: (nullable): a new [class@GioUnix.DesktopAppInfo], or `NULL` if no
|
||||||
* desktop file with that ID exists.
|
* desktop file with that ID exists.
|
||||||
*/
|
*/
|
||||||
GDesktopAppInfo *
|
GDesktopAppInfo *
|
||||||
@@ -2266,7 +2266,7 @@ g_desktop_app_info_get_display_name (GAppInfo *appinfo)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_is_hidden:
|
* g_desktop_app_info_get_is_hidden:
|
||||||
* @info: a [class@Gio.DesktopAppInfo].
|
* @info: a [class@GioUnix.DesktopAppInfo].
|
||||||
*
|
*
|
||||||
* A desktop file is hidden if the
|
* A desktop file is hidden if the
|
||||||
* [`Hidden` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-hidden)
|
* [`Hidden` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-hidden)
|
||||||
@@ -2282,11 +2282,13 @@ g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_filename:
|
* g_desktop_app_info_get_filename:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
*
|
*
|
||||||
* When @info was created from a known filename, return it. In some
|
* When @info was created from a known filename, return it.
|
||||||
* situations such as a [class@Gio.DesktopAppInfo] returned from
|
*
|
||||||
* [ctor@Gio.DesktopAppInfo.new_from_keyfile], this function will return `NULL`.
|
* In some situations such as a [class@GioUnix.DesktopAppInfo] returned
|
||||||
|
* from [ctor@GioUnix.DesktopAppInfo.new_from_keyfile], this function
|
||||||
|
* will return `NULL`.
|
||||||
*
|
*
|
||||||
* Returns: (nullable) (type filename): The full path to the file for @info,
|
* Returns: (nullable) (type filename): The full path to the file for @info,
|
||||||
* or `NULL` if not known.
|
* or `NULL` if not known.
|
||||||
@@ -2332,7 +2334,7 @@ g_desktop_app_info_get_icon (GAppInfo *appinfo)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_categories:
|
* g_desktop_app_info_get_categories:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
*
|
*
|
||||||
* Gets the categories from the desktop file.
|
* Gets the categories from the desktop file.
|
||||||
*
|
*
|
||||||
@@ -2349,7 +2351,7 @@ g_desktop_app_info_get_categories (GDesktopAppInfo *info)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_keywords:
|
* g_desktop_app_info_get_keywords:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
*
|
*
|
||||||
* Gets the keywords from the desktop file.
|
* Gets the keywords from the desktop file.
|
||||||
*
|
*
|
||||||
@@ -2366,7 +2368,7 @@ g_desktop_app_info_get_keywords (GDesktopAppInfo *info)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_generic_name:
|
* g_desktop_app_info_get_generic_name:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
*
|
*
|
||||||
* Gets the generic name from the desktop file.
|
* Gets the generic name from the desktop file.
|
||||||
*
|
*
|
||||||
@@ -2381,7 +2383,7 @@ g_desktop_app_info_get_generic_name (GDesktopAppInfo *info)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_nodisplay:
|
* g_desktop_app_info_get_nodisplay:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
*
|
*
|
||||||
* Gets the value of the
|
* Gets the value of the
|
||||||
* [`NoDisplay` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-nodisplay)
|
* [`NoDisplay` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-nodisplay)
|
||||||
@@ -2400,7 +2402,7 @@ g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_show_in:
|
* g_desktop_app_info_get_show_in:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @desktop_env: (nullable): a string specifying a desktop name
|
* @desktop_env: (nullable): a string specifying a desktop name
|
||||||
*
|
*
|
||||||
* Checks if the application info should be shown in menus that list available
|
* Checks if the application info should be shown in menus that list available
|
||||||
@@ -3569,7 +3571,7 @@ g_desktop_app_info_launch (GAppInfo *appinfo,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_launch_uris_as_manager_with_fds:
|
* g_desktop_app_info_launch_uris_as_manager_with_fds:
|
||||||
* @appinfo: a [class@Gio.DesktopAppInfo]
|
* @appinfo: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @uris: (element-type utf8): List of URIs
|
* @uris: (element-type utf8): List of URIs
|
||||||
* @launch_context: (nullable): a [class@Gio.AppLaunchContext]
|
* @launch_context: (nullable): a [class@Gio.AppLaunchContext]
|
||||||
* @spawn_flags: [flags@GLib.SpawnFlags], used for each process
|
* @spawn_flags: [flags@GLib.SpawnFlags], used for each process
|
||||||
@@ -3583,9 +3585,9 @@ g_desktop_app_info_launch (GAppInfo *appinfo,
|
|||||||
* @stderr_fd: file descriptor to use for child’s stderr, or `-1`
|
* @stderr_fd: file descriptor to use for child’s stderr, or `-1`
|
||||||
* @error: return location for a #GError, or `NULL`
|
* @error: return location for a #GError, or `NULL`
|
||||||
*
|
*
|
||||||
* Equivalent to [method@Gio.DesktopAppInfo.launch_uris_as_manager] but allows
|
* Equivalent to [method@GioUnix.DesktopAppInfo.launch_uris_as_manager] but
|
||||||
* you to pass in file descriptors for the stdin, stdout and stderr streams
|
* allows you to pass in file descriptors for the stdin, stdout and stderr
|
||||||
* of the launched process.
|
* streams of the launched process.
|
||||||
*
|
*
|
||||||
* If application launching occurs via some non-spawn mechanism (e.g. D-Bus
|
* If application launching occurs via some non-spawn mechanism (e.g. D-Bus
|
||||||
* activation) then @stdin_fd, @stdout_fd and @stderr_fd are ignored.
|
* activation) then @stdin_fd, @stdout_fd and @stderr_fd are ignored.
|
||||||
@@ -3624,7 +3626,7 @@ g_desktop_app_info_launch_uris_as_manager_with_fds (GDesktopAppInfo *
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_launch_uris_as_manager:
|
* g_desktop_app_info_launch_uris_as_manager:
|
||||||
* @appinfo: a [class@Gio.DesktopAppInfo]
|
* @appinfo: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @uris: (element-type utf8): List of URIs
|
* @uris: (element-type utf8): List of URIs
|
||||||
* @launch_context: (nullable): a [class@Gio.AppLaunchContext]
|
* @launch_context: (nullable): a [class@Gio.AppLaunchContext]
|
||||||
* @spawn_flags: [flags@GLib.SpawnFlags], used for each process
|
* @spawn_flags: [flags@GLib.SpawnFlags], used for each process
|
||||||
@@ -3686,7 +3688,7 @@ g_desktop_app_info_launch_uris_as_manager (GDesktopAppInfo *appinfo,
|
|||||||
* Sets the name of the desktop that the application is running in.
|
* Sets the name of the desktop that the application is running in.
|
||||||
*
|
*
|
||||||
* This is used by [method@Gio.AppInfo.should_show] and
|
* This is used by [method@Gio.AppInfo.should_show] and
|
||||||
* [method@Gio.DesktopAppInfo.get_show_in] to evaluate the
|
* [method@GioUnix.DesktopAppInfo.get_show_in] to evaluate the
|
||||||
* [`OnlyShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-onlyshowin)
|
* [`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)
|
* and [`NotShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-notshowin)
|
||||||
* keys.
|
* keys.
|
||||||
@@ -4699,7 +4701,7 @@ g_app_info_get_default_for_uri_scheme_impl (const char *uri_scheme)
|
|||||||
* the `Implements` line of the desktop file of the application.
|
* the `Implements` line of the desktop file of the application.
|
||||||
*
|
*
|
||||||
* Returns: (element-type GDesktopAppInfo) (transfer full): a list of
|
* Returns: (element-type GDesktopAppInfo) (transfer full): a list of
|
||||||
* [class@Gio.DesktopAppInfo] objects.
|
* [class@GioUnix.DesktopAppInfo] objects.
|
||||||
*
|
*
|
||||||
* Since: 2.42
|
* Since: 2.42
|
||||||
**/
|
**/
|
||||||
@@ -4752,11 +4754,12 @@ g_desktop_app_info_get_implementations (const gchar *interface)
|
|||||||
* any time.
|
* any time.
|
||||||
*
|
*
|
||||||
* None of the search results are subjected to the normal validation
|
* None of the search results are subjected to the normal validation
|
||||||
* checks performed by [ctor@Gio.DesktopAppInfo.new] (for example, checking that
|
* checks performed by [ctor@GioUnix.DesktopAppInfo.new] (for example,
|
||||||
* the executable referenced by a result exists), and so it is possible for
|
* checking that the executable referenced by a result exists), and so it is
|
||||||
* [ctor@Gio.DesktopAppInfo.new] to return `NULL` when passed an app ID returned
|
* possible for [ctor@GioUnix.DesktopAppInfo.new] to return `NULL` when passed
|
||||||
* by this function. It is expected that calling code will do this when
|
* an app ID returned by this function. It is expected that calling code will
|
||||||
* subsequently creating a [class@Gio.DesktopAppInfo] for each result.
|
* do this when subsequently creating a [class@GioUnix.DesktopAppInfo] for
|
||||||
|
* each result.
|
||||||
*
|
*
|
||||||
* Returns: (array zero-terminated=1) (element-type GStrv) (transfer full): a
|
* Returns: (array zero-terminated=1) (element-type GStrv) (transfer full): a
|
||||||
* list of strvs. Free each item with [func@GLib.strfreev] and free the outer
|
* list of strvs. Free each item with [func@GLib.strfreev] and free the outer
|
||||||
@@ -4882,7 +4885,7 @@ g_app_info_get_all_impl (void)
|
|||||||
* #GDesktopAppInfoLookup is an opaque data structure and can only be accessed
|
* #GDesktopAppInfoLookup is an opaque data structure and can only be accessed
|
||||||
* using the following functions.
|
* using the following functions.
|
||||||
*
|
*
|
||||||
* Deprecated: 2.28: The [iface@Gio.DesktopAppInfoLookup] interface is
|
* Deprecated: 2.28: The [iface@GioUnix.DesktopAppInfoLookup] interface is
|
||||||
* deprecated and unused by GIO.
|
* deprecated and unused by GIO.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@@ -4900,14 +4903,14 @@ g_desktop_app_info_lookup_default_init (GDesktopAppInfoLookupInterface *iface)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_lookup_get_default_for_uri_scheme:
|
* g_desktop_app_info_lookup_get_default_for_uri_scheme:
|
||||||
* @lookup: a [iface@Gio.DesktopAppInfoLookup]
|
* @lookup: a [iface@GioUnix.DesktopAppInfoLookup]
|
||||||
* @uri_scheme: a string containing a URI scheme.
|
* @uri_scheme: a string containing a URI scheme.
|
||||||
*
|
*
|
||||||
* Gets the default application for launching applications
|
* Gets the default application for launching applications
|
||||||
* using this URI scheme for a particular [iface@Gio.DesktopAppInfoLookup]
|
* using this URI scheme for a particular [iface@GioUnix.DesktopAppInfoLookup]
|
||||||
* implementation.
|
* implementation.
|
||||||
*
|
*
|
||||||
* The [iface@Gio.DesktopAppInfoLookup] interface and this function is used
|
* The [iface@GioUnix.DesktopAppInfoLookup] interface and this function is used
|
||||||
* to implement [func@Gio.AppInfo.get_default_for_uri_scheme] backends
|
* to implement [func@Gio.AppInfo.get_default_for_uri_scheme] backends
|
||||||
* in a GIO module. There is no reason for applications to use it
|
* in a GIO module. There is no reason for applications to use it
|
||||||
* directly. Applications should use
|
* directly. Applications should use
|
||||||
@@ -4916,7 +4919,7 @@ g_desktop_app_info_lookup_default_init (GDesktopAppInfoLookupInterface *iface)
|
|||||||
* Returns: (transfer full) (nullable): [iface@Gio.AppInfo] for given
|
* Returns: (transfer full) (nullable): [iface@Gio.AppInfo] for given
|
||||||
* @uri_scheme or `NULL` on error.
|
* @uri_scheme or `NULL` on error.
|
||||||
*
|
*
|
||||||
* Deprecated: 2.28: The [iface@Gio.DesktopAppInfoLookup] interface is
|
* Deprecated: 2.28: The [iface@GioUnix.DesktopAppInfoLookup] interface is
|
||||||
* deprecated and unused by GIO.
|
* deprecated and unused by GIO.
|
||||||
*/
|
*/
|
||||||
GAppInfo *
|
GAppInfo *
|
||||||
@@ -4938,7 +4941,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_startup_wm_class:
|
* g_desktop_app_info_get_startup_wm_class:
|
||||||
* @info: a [class@Gio.DesktopAppInfo] that supports startup notify
|
* @info: a [class@GioUnix.DesktopAppInfo] that supports startup notify
|
||||||
*
|
*
|
||||||
* Retrieves the `StartupWMClass` field from @info. This represents the
|
* Retrieves the `StartupWMClass` field from @info. This represents the
|
||||||
* `WM_CLASS` property of the main window of the application, if launched
|
* `WM_CLASS` property of the main window of the application, if launched
|
||||||
@@ -4959,7 +4962,7 @@ g_desktop_app_info_get_startup_wm_class (GDesktopAppInfo *info)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_string:
|
* g_desktop_app_info_get_string:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @key: the key to look up
|
* @key: the key to look up
|
||||||
*
|
*
|
||||||
* Looks up a string value in the keyfile backing @info.
|
* Looks up a string value in the keyfile backing @info.
|
||||||
@@ -4983,7 +4986,7 @@ g_desktop_app_info_get_string (GDesktopAppInfo *info,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_locale_string:
|
* g_desktop_app_info_get_locale_string:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @key: the key to look up
|
* @key: the key to look up
|
||||||
*
|
*
|
||||||
* Looks up a localized string value in the keyfile backing @info
|
* Looks up a localized string value in the keyfile backing @info
|
||||||
@@ -5010,7 +5013,7 @@ g_desktop_app_info_get_locale_string (GDesktopAppInfo *info,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_boolean:
|
* g_desktop_app_info_get_boolean:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @key: the key to look up
|
* @key: the key to look up
|
||||||
*
|
*
|
||||||
* Looks up a boolean value in the keyfile backing @info.
|
* Looks up a boolean value in the keyfile backing @info.
|
||||||
@@ -5033,7 +5036,7 @@ g_desktop_app_info_get_boolean (GDesktopAppInfo *info,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_string_list:
|
* g_desktop_app_info_get_string_list:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @key: the key to look up
|
* @key: the key to look up
|
||||||
* @length: (out) (optional): return location for the number of returned
|
* @length: (out) (optional): return location for the number of returned
|
||||||
* strings, or `NULL`
|
* strings, or `NULL`
|
||||||
@@ -5061,7 +5064,7 @@ g_desktop_app_info_get_string_list (GDesktopAppInfo *info,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_has_key:
|
* g_desktop_app_info_has_key:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @key: the key to look up
|
* @key: the key to look up
|
||||||
*
|
*
|
||||||
* Returns whether @key exists in the `Desktop Entry` group
|
* Returns whether @key exists in the `Desktop Entry` group
|
||||||
@@ -5085,7 +5088,7 @@ g_desktop_app_info_has_key (GDesktopAppInfo *info,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_list_actions:
|
* g_desktop_app_info_list_actions:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
*
|
*
|
||||||
* Returns the list of
|
* Returns the list of
|
||||||
* [‘additional application actions’](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html)
|
* [‘additional application actions’](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html)
|
||||||
@@ -5122,9 +5125,9 @@ app_info_has_action (GDesktopAppInfo *info,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_get_action_name:
|
* g_desktop_app_info_get_action_name:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @action_name: the name of the action as from
|
* @action_name: the name of the action as from
|
||||||
* [method@Gio.DesktopAppInfo.list_actions]
|
* [method@GioUnix.DesktopAppInfo.list_actions]
|
||||||
*
|
*
|
||||||
* Gets the user-visible display name of the
|
* Gets the user-visible display name of the
|
||||||
* [‘additional application actions’](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html)
|
* [‘additional application actions’](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s11.html)
|
||||||
@@ -5165,15 +5168,15 @@ g_desktop_app_info_get_action_name (GDesktopAppInfo *info,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* g_desktop_app_info_launch_action:
|
* g_desktop_app_info_launch_action:
|
||||||
* @info: a [class@Gio.DesktopAppInfo]
|
* @info: a [class@GioUnix.DesktopAppInfo]
|
||||||
* @action_name: the name of the action as from
|
* @action_name: the name of the action as from
|
||||||
* [method@Gio.DesktopAppInfo.list_actions]
|
* [method@GioUnix.DesktopAppInfo.list_actions]
|
||||||
* @launch_context: (nullable): a [class@Gio.AppLaunchContext]
|
* @launch_context: (nullable): a [class@Gio.AppLaunchContext]
|
||||||
*
|
*
|
||||||
* Activates the named application action.
|
* Activates the named application action.
|
||||||
*
|
*
|
||||||
* You may only call this function on action names that were
|
* You may only call this function on action names that were
|
||||||
* returned from [method@Gio.DesktopAppInfo.list_actions].
|
* returned from [method@GioUnix.DesktopAppInfo.list_actions].
|
||||||
*
|
*
|
||||||
* Note that if the main entry of the desktop file indicates that the
|
* Note that if the main entry of the desktop file indicates that the
|
||||||
* application supports startup notification, and @launch_context is
|
* application supports startup notification, and @launch_context is
|
||||||
|
@@ -1867,7 +1867,7 @@ g_unix_mount_entries_get (guint64 *time_read)
|
|||||||
* @n_entries_out: (optional) (out caller-allocates): return location for the
|
* @n_entries_out: (optional) (out caller-allocates): return location for the
|
||||||
* number of mount entries returned
|
* number of mount entries returned
|
||||||
*
|
*
|
||||||
* Gets an array of [struct@Gio.UnixMountEntry]s containing the Unix mounts
|
* Gets an array of [struct@GioUnix.MountEntry]s containing the Unix mounts
|
||||||
* listed in @table_path.
|
* listed in @table_path.
|
||||||
*
|
*
|
||||||
* This is a generalized version of [func@GioUnix.mount_entries_get], mainly
|
* This is a generalized version of [func@GioUnix.mount_entries_get], mainly
|
||||||
@@ -1899,7 +1899,7 @@ g_unix_mounts_get_from_file (const char *table_path,
|
|||||||
* @n_entries_out: (optional) (out caller-allocates): return location for the
|
* @n_entries_out: (optional) (out caller-allocates): return location for the
|
||||||
* number of mount entries returned
|
* number of mount entries returned
|
||||||
*
|
*
|
||||||
* Gets an array of [struct@Gio.UnixMountEntry]s containing the Unix mounts
|
* Gets an array of [struct@GioUnix.MountEntry]s containing the Unix mounts
|
||||||
* listed in @table_path.
|
* listed in @table_path.
|
||||||
*
|
*
|
||||||
* This is a generalized version of [func@GioUnix.mount_entries_get], mainly
|
* This is a generalized version of [func@GioUnix.mount_entries_get], mainly
|
||||||
@@ -2126,7 +2126,7 @@ g_unix_mount_points_get (guint64 *time_read)
|
|||||||
* @n_points_out: (optional) (out caller-allocates): return location for the
|
* @n_points_out: (optional) (out caller-allocates): return location for the
|
||||||
* number of mount points returned
|
* number of mount points returned
|
||||||
*
|
*
|
||||||
* Gets an array of [struct@Gio.UnixMountPoint]s containing the Unix mount
|
* Gets an array of [struct@GioUnix.MountPoint]s containing the Unix mount
|
||||||
* points listed in @table_path.
|
* points listed in @table_path.
|
||||||
*
|
*
|
||||||
* This is a generalized version of [func@GioUnix.mount_points_get], mainly
|
* This is a generalized version of [func@GioUnix.mount_points_get], mainly
|
||||||
@@ -2722,7 +2722,7 @@ g_unix_mount_monitor_new (void)
|
|||||||
*
|
*
|
||||||
* Frees a Unix mount.
|
* Frees a Unix mount.
|
||||||
*
|
*
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.free] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.free] instead.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
g_unix_mount_free (GUnixMountEntry *mount_entry)
|
g_unix_mount_free (GUnixMountEntry *mount_entry)
|
||||||
@@ -2759,7 +2759,7 @@ g_unix_mount_entry_free (GUnixMountEntry *mount_entry)
|
|||||||
*
|
*
|
||||||
* Returns: (transfer full): a new [struct@GioUnix.MountEntry]
|
* Returns: (transfer full): a new [struct@GioUnix.MountEntry]
|
||||||
* Since: 2.54
|
* Since: 2.54
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.copy] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.copy] instead.
|
||||||
*/
|
*/
|
||||||
GUnixMountEntry *
|
GUnixMountEntry *
|
||||||
g_unix_mount_copy (GUnixMountEntry *mount_entry)
|
g_unix_mount_copy (GUnixMountEntry *mount_entry)
|
||||||
@@ -2850,7 +2850,7 @@ g_unix_mount_point_copy (GUnixMountPoint *mount_point)
|
|||||||
*
|
*
|
||||||
* Returns: `1`, `0` or `-1` if @mount1 is greater than, equal to,
|
* Returns: `1`, `0` or `-1` if @mount1 is greater than, equal to,
|
||||||
* or less than @mount2, respectively
|
* or less than @mount2, respectively
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.compare] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.compare] instead.
|
||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
g_unix_mount_compare (GUnixMountEntry *mount1,
|
g_unix_mount_compare (GUnixMountEntry *mount1,
|
||||||
@@ -2912,7 +2912,7 @@ g_unix_mount_entry_compare (GUnixMountEntry *mount1,
|
|||||||
* Gets the mount path for a Unix mount.
|
* Gets the mount path for a Unix mount.
|
||||||
*
|
*
|
||||||
* Returns: (type filename): the mount path for @mount_entry
|
* Returns: (type filename): the mount path for @mount_entry
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.get_mount_path] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.get_mount_path] instead.
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const gchar *
|
||||||
g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry)
|
g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry)
|
||||||
@@ -2944,7 +2944,7 @@ g_unix_mount_entry_get_mount_path (GUnixMountEntry *mount_entry)
|
|||||||
* Gets the device path for a Unix mount.
|
* Gets the device path for a Unix mount.
|
||||||
*
|
*
|
||||||
* Returns: (type filename): a string containing the device path
|
* Returns: (type filename): a string containing the device path
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.get_device_path] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.get_device_path] instead.
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const gchar *
|
||||||
g_unix_mount_get_device_path (GUnixMountEntry *mount_entry)
|
g_unix_mount_get_device_path (GUnixMountEntry *mount_entry)
|
||||||
@@ -2973,8 +2973,9 @@ g_unix_mount_entry_get_device_path (GUnixMountEntry *mount_entry)
|
|||||||
* g_unix_mount_get_root_path:
|
* g_unix_mount_get_root_path:
|
||||||
* @mount_entry: a [struct@GioUnix.MountEntry]
|
* @mount_entry: a [struct@GioUnix.MountEntry]
|
||||||
*
|
*
|
||||||
* Gets the root of the mount within the filesystem. This is useful e.g. for
|
* Gets the root of the mount within the filesystem.
|
||||||
* mounts created by bind operation, or btrfs subvolumes.
|
*
|
||||||
|
* This is useful e.g. for mounts created by bind operation, or btrfs subvolumes.
|
||||||
*
|
*
|
||||||
* For example, the root path is equal to `/` for a mount created by
|
* For example, the root path is equal to `/` for a mount created by
|
||||||
* `mount /dev/sda1 /mnt/foo` and `/bar` for
|
* `mount /dev/sda1 /mnt/foo` and `/bar` for
|
||||||
@@ -2982,7 +2983,7 @@ g_unix_mount_entry_get_device_path (GUnixMountEntry *mount_entry)
|
|||||||
*
|
*
|
||||||
* Returns: (nullable): a string containing the root, or `NULL` if not supported
|
* Returns: (nullable): a string containing the root, or `NULL` if not supported
|
||||||
* Since: 2.60
|
* Since: 2.60
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.get_root_path] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.get_root_path] instead.
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const gchar *
|
||||||
g_unix_mount_get_root_path (GUnixMountEntry *mount_entry)
|
g_unix_mount_get_root_path (GUnixMountEntry *mount_entry)
|
||||||
@@ -3019,7 +3020,7 @@ g_unix_mount_entry_get_root_path (GUnixMountEntry *mount_entry)
|
|||||||
* Gets the filesystem type for the Unix mount.
|
* Gets the filesystem type for the Unix mount.
|
||||||
*
|
*
|
||||||
* Returns: a string containing the file system type
|
* Returns: a string containing the file system type
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.get_fs_type] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.get_fs_type] instead.
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const gchar *
|
||||||
g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry)
|
g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry)
|
||||||
@@ -3052,13 +3053,13 @@ g_unix_mount_entry_get_fs_type (GUnixMountEntry *mount_entry)
|
|||||||
*
|
*
|
||||||
* For example: `rw,relatime,seclabel,data=ordered`.
|
* For example: `rw,relatime,seclabel,data=ordered`.
|
||||||
*
|
*
|
||||||
* This is similar to [func@GioUnix.MountPoint.get_options], but it takes
|
* This is similar to [method@GioUnix.MountPoint.get_options], but it takes
|
||||||
* a [struct@GioUnix.MountEntry] as an argument.
|
* a [struct@GioUnix.MountEntry] as an argument.
|
||||||
*
|
*
|
||||||
* Returns: (nullable): a string containing the options, or `NULL` if not
|
* Returns: (nullable): a string containing the options, or `NULL` if not
|
||||||
* available.
|
* available.
|
||||||
* Since: 2.58
|
* Since: 2.58
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.get_options] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.get_options] instead.
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const gchar *
|
||||||
g_unix_mount_get_options (GUnixMountEntry *mount_entry)
|
g_unix_mount_get_options (GUnixMountEntry *mount_entry)
|
||||||
@@ -3074,7 +3075,7 @@ g_unix_mount_get_options (GUnixMountEntry *mount_entry)
|
|||||||
*
|
*
|
||||||
* For example: `rw,relatime,seclabel,data=ordered`.
|
* For example: `rw,relatime,seclabel,data=ordered`.
|
||||||
*
|
*
|
||||||
* This is similar to [func@GioUnix.MountPoint.get_options], but it takes
|
* This is similar to [method@GioUnix.MountPoint.get_options], but it takes
|
||||||
* a [struct@GioUnix.MountEntry] as an argument.
|
* a [struct@GioUnix.MountEntry] as an argument.
|
||||||
*
|
*
|
||||||
* Returns: (nullable): a string containing the options, or `NULL` if not
|
* Returns: (nullable): a string containing the options, or `NULL` if not
|
||||||
@@ -3096,7 +3097,7 @@ g_unix_mount_entry_get_options (GUnixMountEntry *mount_entry)
|
|||||||
* Checks if a Unix mount is mounted read only.
|
* Checks if a Unix mount is mounted read only.
|
||||||
*
|
*
|
||||||
* Returns: true if @mount_entry is read only; false otherwise
|
* Returns: true if @mount_entry is read only; false otherwise
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.is_readonly] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.is_readonly] instead.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
g_unix_mount_is_readonly (GUnixMountEntry *mount_entry)
|
g_unix_mount_is_readonly (GUnixMountEntry *mount_entry)
|
||||||
@@ -3135,7 +3136,7 @@ g_unix_mount_entry_is_readonly (GUnixMountEntry *mount_entry)
|
|||||||
* file system types and device paths are ignored.
|
* file system types and device paths are ignored.
|
||||||
*
|
*
|
||||||
* Returns: true if the Unix mount is for a system path; false otherwise
|
* Returns: true if the Unix mount is for a system path; false otherwise
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.is_system_internal] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.is_system_internal] instead.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
g_unix_mount_is_system_internal (GUnixMountEntry *mount_entry)
|
g_unix_mount_is_system_internal (GUnixMountEntry *mount_entry)
|
||||||
@@ -3527,7 +3528,7 @@ type_to_icon (GUnixMountType type, gboolean is_mount_point, gboolean use_symboli
|
|||||||
* The result is a translated string.
|
* The result is a translated string.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a newly allocated translated string
|
* Returns: (transfer full): a newly allocated translated string
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.guess_name] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.guess_name] instead.
|
||||||
*/
|
*/
|
||||||
gchar *
|
gchar *
|
||||||
g_unix_mount_guess_name (GUnixMountEntry *mount_entry)
|
g_unix_mount_guess_name (GUnixMountEntry *mount_entry)
|
||||||
@@ -3566,7 +3567,7 @@ g_unix_mount_entry_guess_name (GUnixMountEntry *mount_entry)
|
|||||||
* Guesses the icon of a Unix mount entry.
|
* Guesses the icon of a Unix mount entry.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a [iface@Gio.Icon]
|
* Returns: (transfer full): a [iface@Gio.Icon]
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.guess_icon] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.guess_icon] instead.
|
||||||
*/
|
*/
|
||||||
GIcon *
|
GIcon *
|
||||||
g_unix_mount_guess_icon (GUnixMountEntry *mount_entry)
|
g_unix_mount_guess_icon (GUnixMountEntry *mount_entry)
|
||||||
@@ -3597,7 +3598,7 @@ g_unix_mount_entry_guess_icon (GUnixMountEntry *mount_entry)
|
|||||||
*
|
*
|
||||||
* Returns: (transfer full): a [iface@Gio.Icon]
|
* Returns: (transfer full): a [iface@Gio.Icon]
|
||||||
* Since: 2.34
|
* Since: 2.34
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.guess_symbolic_icon] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.guess_symbolic_icon] instead.
|
||||||
*/
|
*/
|
||||||
GIcon *
|
GIcon *
|
||||||
g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry)
|
g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry)
|
||||||
@@ -3679,7 +3680,7 @@ g_unix_mount_point_guess_symbolic_icon (GUnixMountPoint *mount_point)
|
|||||||
* Guesses whether a Unix mount entry can be ejected.
|
* Guesses whether a Unix mount entry can be ejected.
|
||||||
*
|
*
|
||||||
* Returns: true if @mount_entry is deemed to be ejectable; false otherwise
|
* Returns: true if @mount_entry is deemed to be ejectable; false otherwise
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.guess_can_eject] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.guess_can_eject] instead.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
g_unix_mount_guess_can_eject (GUnixMountEntry *mount_entry)
|
g_unix_mount_guess_can_eject (GUnixMountEntry *mount_entry)
|
||||||
@@ -3716,7 +3717,7 @@ g_unix_mount_entry_guess_can_eject (GUnixMountEntry *mount_entry)
|
|||||||
* Guesses whether a Unix mount entry should be displayed in the UI.
|
* Guesses whether a Unix mount entry should be displayed in the UI.
|
||||||
*
|
*
|
||||||
* Returns: true if @mount_entry is deemed to be displayable; false otherwise
|
* Returns: true if @mount_entry is deemed to be displayable; false otherwise
|
||||||
* Deprecated: 2.84: Use [func@GioUnix.MountEntry.guess_should_display] instead.
|
* Deprecated: 2.84: Use [method@GioUnix.MountEntry.guess_should_display] instead.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry)
|
g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry)
|
||||||
|
@@ -135,6 +135,15 @@ struct _GIRepository
|
|||||||
|
|
||||||
G_DEFINE_TYPE (GIRepository, gi_repository, G_TYPE_OBJECT);
|
G_DEFINE_TYPE (GIRepository, gi_repository, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
static GITypelib *
|
||||||
|
require_internal (GIRepository *repository,
|
||||||
|
const char *namespace,
|
||||||
|
const char *version,
|
||||||
|
GIRepositoryLoadFlags flags,
|
||||||
|
const char * const *search_paths,
|
||||||
|
size_t n_search_paths,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
#ifdef G_PLATFORM_WIN32
|
#ifdef G_PLATFORM_WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
@@ -596,6 +605,10 @@ load_dependencies_recurse (GIRepository *repository,
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
const char * const *search_path =
|
||||||
|
(const char * const *) repository->typelib_search_path->pdata;
|
||||||
|
gsize search_path_len = repository->typelib_search_path->len;
|
||||||
|
|
||||||
for (i = 0; dependencies[i]; i++)
|
for (i = 0; dependencies[i]; i++)
|
||||||
{
|
{
|
||||||
char *dependency = dependencies[i];
|
char *dependency = dependencies[i];
|
||||||
@@ -608,8 +621,9 @@ load_dependencies_recurse (GIRepository *repository,
|
|||||||
dependency_namespace = g_strndup (dependency, (size_t) (last_dash - dependency));
|
dependency_namespace = g_strndup (dependency, (size_t) (last_dash - dependency));
|
||||||
dependency_version = last_dash+1;
|
dependency_version = last_dash+1;
|
||||||
|
|
||||||
if (!gi_repository_require (repository, dependency_namespace, dependency_version,
|
if (!require_internal (repository, dependency_namespace, dependency_version,
|
||||||
0, error))
|
0, search_path, search_path_len,
|
||||||
|
error))
|
||||||
{
|
{
|
||||||
g_free (dependency_namespace);
|
g_free (dependency_namespace);
|
||||||
g_strfreev (dependencies);
|
g_strfreev (dependencies);
|
||||||
@@ -649,7 +663,7 @@ static const char *
|
|||||||
register_internal (GIRepository *repository,
|
register_internal (GIRepository *repository,
|
||||||
const char *source,
|
const char *source,
|
||||||
gboolean lazy,
|
gboolean lazy,
|
||||||
GITypelib *typelib,
|
GITypelib *typelib,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
Header *header;
|
Header *header;
|
||||||
@@ -2009,6 +2023,54 @@ require_internal (GIRepository *repository,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GITypelib *
|
||||||
|
require_internal_with_platform_data (GIRepository *repository,
|
||||||
|
const char *namespace,
|
||||||
|
const char *version,
|
||||||
|
GIRepositoryLoadFlags flags,
|
||||||
|
const char * const *search_paths,
|
||||||
|
size_t search_paths_len,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
GITypelib *typelib;
|
||||||
|
|
||||||
|
typelib = require_internal (repository, namespace, version, flags,
|
||||||
|
search_paths, search_paths_len,
|
||||||
|
error);
|
||||||
|
if (!typelib)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
#if defined (G_OS_UNIX) || defined (G_OS_WIN32)
|
||||||
|
/* Backward compatibility hack: if we're loading Gio-2.0, we automatically
|
||||||
|
* load the platform specific introspection data that used to exist inside
|
||||||
|
* Gio-2.0
|
||||||
|
*/
|
||||||
|
if (g_str_equal (namespace, "Gio") &&
|
||||||
|
(!version || g_str_equal (version, "2.0")))
|
||||||
|
{
|
||||||
|
GError *local_error = NULL;
|
||||||
|
const char *platform_namespace;
|
||||||
|
|
||||||
|
# if defined (G_OS_UNIX)
|
||||||
|
platform_namespace = "GioUnix";
|
||||||
|
# elif defined (G_OS_WIN32)
|
||||||
|
platform_namespace = "GioWin32";
|
||||||
|
# endif /* defined (G_OS_LINUX) */
|
||||||
|
|
||||||
|
if (!require_internal (repository, platform_namespace, version, flags,
|
||||||
|
search_paths, search_paths_len,
|
||||||
|
&local_error))
|
||||||
|
{
|
||||||
|
g_critical ("Unable to load platform-specific GIO introspection data: %s",
|
||||||
|
local_error->message);
|
||||||
|
g_error_free (local_error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* defined(G_OS_UNIX) || defined(G_OS_WIN32) */
|
||||||
|
|
||||||
|
return typelib;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gi_repository_require:
|
* gi_repository_require:
|
||||||
* @repository: A #GIRepository
|
* @repository: A #GIRepository
|
||||||
@@ -2029,19 +2091,24 @@ require_internal (GIRepository *repository,
|
|||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
GITypelib *
|
GITypelib *
|
||||||
gi_repository_require (GIRepository *repository,
|
gi_repository_require (GIRepository *repository,
|
||||||
const char *namespace,
|
const char *namespace,
|
||||||
const char *version,
|
const char *version,
|
||||||
GIRepositoryLoadFlags flags,
|
GIRepositoryLoadFlags flags,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GITypelib *typelib;
|
const char * const *search_paths;
|
||||||
|
size_t search_paths_len;
|
||||||
|
|
||||||
typelib = require_internal (repository, namespace, version, flags,
|
g_return_val_if_fail (GI_IS_REPOSITORY (repository), NULL);
|
||||||
(const char * const *) repository->typelib_search_path->pdata,
|
g_return_val_if_fail (namespace != NULL, NULL);
|
||||||
repository->typelib_search_path->len, error);
|
|
||||||
|
|
||||||
return typelib;
|
search_paths = (const char * const *) repository->typelib_search_path->pdata;
|
||||||
|
search_paths_len = repository->typelib_search_path->len;
|
||||||
|
|
||||||
|
return require_internal_with_platform_data (repository, namespace, version, flags,
|
||||||
|
search_paths, search_paths_len,
|
||||||
|
error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2075,8 +2142,12 @@ gi_repository_require_private (GIRepository *repository,
|
|||||||
{
|
{
|
||||||
const char * const search_path[] = { typelib_dir, NULL };
|
const char * const search_path[] = { typelib_dir, NULL };
|
||||||
|
|
||||||
return require_internal (repository, namespace, version, flags,
|
g_return_val_if_fail (GI_IS_REPOSITORY (repository), NULL);
|
||||||
search_path, 1, error);
|
g_return_val_if_fail (namespace != NULL, NULL);
|
||||||
|
|
||||||
|
return require_internal_with_platform_data (repository, namespace, version, flags,
|
||||||
|
search_path, 1,
|
||||||
|
error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@@ -234,27 +234,6 @@ gio_gir_args = [
|
|||||||
'--symbol-prefix=gio',
|
'--symbol-prefix=gio',
|
||||||
]
|
]
|
||||||
|
|
||||||
# For API compatibility reasons, Gio-2.0.gir needs to contain the platform
|
|
||||||
# specific APIs which are also present in the (newer) GioUnix-2.0.gir and
|
|
||||||
# GioWin32-2.0.gir repositories.
|
|
||||||
# See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3892#note_2001361
|
|
||||||
# These can be dropped when GIO next breaks API (i.e. with Gio-3.0.gir).
|
|
||||||
if host_system == 'windows'
|
|
||||||
gio_gir_sources += [ gio_win32_include_headers, win32_sources ]
|
|
||||||
foreach h: gio_win32_include_headers
|
|
||||||
gio_gir_args += '--c-include=gio/' + fs.name(h)
|
|
||||||
endforeach
|
|
||||||
gio_gir_packages += 'gio-windows-2.0'
|
|
||||||
gio_gir_args += '--pkg=gio-windows-2.0'
|
|
||||||
else
|
|
||||||
gio_gir_sources += [ gio_unix_include_headers, unix_sources ]
|
|
||||||
foreach h: gio_unix_include_headers
|
|
||||||
gio_gir_args += '--c-include=gio/' + fs.name(h)
|
|
||||||
endforeach
|
|
||||||
gio_gir_packages += 'gio-unix-2.0'
|
|
||||||
gio_gir_args += '--pkg=gio-unix-2.0'
|
|
||||||
endif
|
|
||||||
|
|
||||||
gio_gir = gnome.generate_gir(libgio,
|
gio_gir = gnome.generate_gir(libgio,
|
||||||
sources: gio_gir_sources,
|
sources: gio_gir_sources,
|
||||||
namespace: 'Gio',
|
namespace: 'Gio',
|
||||||
|
@@ -210,6 +210,32 @@ test_callable_info_static_vfunc (RepositoryFixture *fx,
|
|||||||
gi_base_info_unref ((GIBaseInfo *) vfunc_info);
|
gi_base_info_unref ((GIBaseInfo *) vfunc_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef G_OS_UNIX
|
||||||
|
static void
|
||||||
|
test_callable_info_platform_unix_is_method (RepositoryFixture *fx,
|
||||||
|
const void *unused)
|
||||||
|
{
|
||||||
|
GIBaseInfo *info;
|
||||||
|
GIFunctionInfo *func_info;
|
||||||
|
|
||||||
|
g_test_message ("Checking DesktopAppInfo in Gio");
|
||||||
|
info = gi_repository_find_by_name (fx->repository, "Gio", "DesktopAppInfo");
|
||||||
|
g_assert_null (info);
|
||||||
|
|
||||||
|
g_test_message ("Checking DesktopAppInfo in GioUnix");
|
||||||
|
info = gi_repository_find_by_name (fx->repository, "GioUnix", "DesktopAppInfo");
|
||||||
|
g_assert_nonnull (info);
|
||||||
|
|
||||||
|
/* Must provide Gio.DesktopAppInfo methods */
|
||||||
|
func_info = gi_object_info_find_method (GI_OBJECT_INFO (info), "has_key");
|
||||||
|
g_assert_true (gi_callable_info_is_method (GI_CALLABLE_INFO (func_info)));
|
||||||
|
g_assert_nonnull (func_info);
|
||||||
|
g_clear_pointer (&func_info, gi_base_info_unref);
|
||||||
|
|
||||||
|
gi_base_info_unref (info);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -221,5 +247,9 @@ main (int argc, char **argv)
|
|||||||
ADD_REPOSITORY_TEST ("/callable-info/static-method", test_callable_info_static_method, &typelib_load_spec_gio);
|
ADD_REPOSITORY_TEST ("/callable-info/static-method", test_callable_info_static_method, &typelib_load_spec_gio);
|
||||||
ADD_REPOSITORY_TEST ("/callable-info/static-vfunc", test_callable_info_static_vfunc, &typelib_load_spec_gio);
|
ADD_REPOSITORY_TEST ("/callable-info/static-vfunc", test_callable_info_static_vfunc, &typelib_load_spec_gio);
|
||||||
|
|
||||||
|
#ifdef G_OS_UNIX
|
||||||
|
ADD_REPOSITORY_TEST ("/callable-info/platform/unix/is-method", test_callable_info_platform_unix_is_method, &typelib_load_spec_gio);
|
||||||
|
#endif
|
||||||
|
|
||||||
return g_test_run ();
|
return g_test_run ();
|
||||||
}
|
}
|
||||||
|
@@ -926,7 +926,7 @@ main (int argc,
|
|||||||
ADD_REPOSITORY_TEST ("/repository/constructor-return-type", test_repository_constructor_return_type, &typelib_load_spec_gobject);
|
ADD_REPOSITORY_TEST ("/repository/constructor-return-type", test_repository_constructor_return_type, &typelib_load_spec_gobject);
|
||||||
ADD_REPOSITORY_TEST ("/repository/enum-info-c-identifier", test_repository_enum_info_c_identifier, &typelib_load_spec_glib);
|
ADD_REPOSITORY_TEST ("/repository/enum-info-c-identifier", test_repository_enum_info_c_identifier, &typelib_load_spec_glib);
|
||||||
ADD_REPOSITORY_TEST ("/repository/enum-info-static-methods", test_repository_enum_info_static_methods, &typelib_load_spec_glib);
|
ADD_REPOSITORY_TEST ("/repository/enum-info-static-methods", test_repository_enum_info_static_methods, &typelib_load_spec_glib);
|
||||||
ADD_REPOSITORY_TEST ("/repository/error-quark", test_repository_error_quark, &typelib_load_spec_gio_platform);
|
ADD_REPOSITORY_TEST ("/repository/error-quark", test_repository_error_quark, &typelib_load_spec_gio);
|
||||||
ADD_REPOSITORY_TEST ("/repository/flags-info-c-identifier", test_repository_flags_info_c_identifier, &typelib_load_spec_gobject);
|
ADD_REPOSITORY_TEST ("/repository/flags-info-c-identifier", test_repository_flags_info_c_identifier, &typelib_load_spec_gobject);
|
||||||
ADD_REPOSITORY_TEST ("/repository/fundamental-ref-func", test_repository_fundamental_ref_func, &typelib_load_spec_gobject);
|
ADD_REPOSITORY_TEST ("/repository/fundamental-ref-func", test_repository_fundamental_ref_func, &typelib_load_spec_gobject);
|
||||||
ADD_REPOSITORY_TEST ("/repository/instance-method-ownership-transfer", test_repository_instance_method_ownership_transfer, &typelib_load_spec_gio);
|
ADD_REPOSITORY_TEST ("/repository/instance-method-ownership-transfer", test_repository_instance_method_ownership_transfer, &typelib_load_spec_gio);
|
||||||
@@ -936,8 +936,8 @@ main (int argc,
|
|||||||
ADD_REPOSITORY_TEST ("/repository/vfunc-info-with-no-invoker", test_repository_vfunc_info_with_no_invoker, &typelib_load_spec_gobject);
|
ADD_REPOSITORY_TEST ("/repository/vfunc-info-with-no-invoker", test_repository_vfunc_info_with_no_invoker, &typelib_load_spec_gobject);
|
||||||
ADD_REPOSITORY_TEST ("/repository/vfunc-info-with-invoker-on-interface", test_repository_vfunc_info_with_invoker_on_interface, &typelib_load_spec_gio);
|
ADD_REPOSITORY_TEST ("/repository/vfunc-info-with-invoker-on-interface", test_repository_vfunc_info_with_invoker_on_interface, &typelib_load_spec_gio);
|
||||||
ADD_REPOSITORY_TEST ("/repository/vfunc-info-with-invoker-on-object", test_repository_vfunc_info_with_invoker_on_object, &typelib_load_spec_gio);
|
ADD_REPOSITORY_TEST ("/repository/vfunc-info-with-invoker-on-object", test_repository_vfunc_info_with_invoker_on_object, &typelib_load_spec_gio);
|
||||||
ADD_REPOSITORY_TEST ("/repository/find-by-gtype", test_repository_find_by_gtype, &typelib_load_spec_gio_platform);
|
ADD_REPOSITORY_TEST ("/repository/find-by-gtype", test_repository_find_by_gtype, &typelib_load_spec_gio);
|
||||||
ADD_REPOSITORY_TEST ("/repository/loaded-namespaces", test_repository_loaded_namespaces, &typelib_load_spec_gio_platform);
|
ADD_REPOSITORY_TEST ("/repository/loaded-namespaces", test_repository_loaded_namespaces, &typelib_load_spec_gio);
|
||||||
g_test_add_func ("/repository/dup_default", test_repository_dup_default);
|
g_test_add_func ("/repository/dup_default", test_repository_dup_default);
|
||||||
|
|
||||||
return g_test_run ();
|
return g_test_run ();
|
||||||
|
@@ -36,11 +36,6 @@ typedef struct
|
|||||||
static const TypelibLoadSpec typelib_load_spec_glib = { "GLib", "2.0" };
|
static const TypelibLoadSpec typelib_load_spec_glib = { "GLib", "2.0" };
|
||||||
static const TypelibLoadSpec typelib_load_spec_gobject = { "GObject", "2.0" };
|
static const TypelibLoadSpec typelib_load_spec_gobject = { "GObject", "2.0" };
|
||||||
static const TypelibLoadSpec typelib_load_spec_gio = { "Gio", "2.0" };
|
static const TypelibLoadSpec typelib_load_spec_gio = { "Gio", "2.0" };
|
||||||
#if defined(G_OS_UNIX)
|
|
||||||
static const TypelibLoadSpec typelib_load_spec_gio_platform = { "GioUnix", "2.0" };
|
|
||||||
#elif defined(G_OS_WIN32)
|
|
||||||
static const TypelibLoadSpec typelib_load_spec_gio_platform = { "GioWin32", "2.0" };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void repository_init (int *argc,
|
void repository_init (int *argc,
|
||||||
char **argv[]);
|
char **argv[]);
|
||||||
|
Reference in New Issue
Block a user