docs: Replace deprecated Virtual tag

Use the (virtual) symbol annotation.
This commit is contained in:
Emmanuele Bassi 2023-10-15 15:25:40 +01:00 committed by Philip Withnall
parent 47faa032cb
commit d026534753
8 changed files with 25 additions and 53 deletions

View File

@ -1304,7 +1304,7 @@ g_app_info_can_delete (GAppInfo *appinfo)
/** /**
* g_app_info_delete: * g_app_info_delete: (virtual do_delete)
* @appinfo: a #GAppInfo * @appinfo: a #GAppInfo
* *
* Tries to delete a #GAppInfo. * Tries to delete a #GAppInfo.
@ -1313,7 +1313,6 @@ g_app_info_can_delete (GAppInfo *appinfo)
* #GAppInfos which can be deleted, and system-wide ones which cannot. * #GAppInfos which can be deleted, and system-wide ones which cannot.
* See g_app_info_can_delete(). * See g_app_info_can_delete().
* *
* Virtual: do_delete
* Returns: %TRUE if @appinfo has been deleted * Returns: %TRUE if @appinfo has been deleted
* *
* Since: 2.20 * Since: 2.20

View File

@ -747,14 +747,13 @@ g_file_dup (GFile *file)
} }
/** /**
* g_file_hash: * g_file_hash: (virtual hash)
* @file: (type GFile): #gconstpointer to a #GFile * @file: (type GFile): #gconstpointer to a #GFile
* *
* Creates a hash value for a #GFile. * Creates a hash value for a #GFile.
* *
* This call does no blocking I/O. * This call does no blocking I/O.
* *
* Virtual: hash
* Returns: 0 if @file is not a valid #GFile, otherwise an * Returns: 0 if @file is not a valid #GFile, otherwise an
* integer that can be used as hash value for the #GFile. * integer that can be used as hash value for the #GFile.
* This function is intended for easily hashing a #GFile to * This function is intended for easily hashing a #GFile to
@ -939,7 +938,7 @@ g_file_get_child_for_display_name (GFile *file,
} }
/** /**
* g_file_has_prefix: * g_file_has_prefix: (virtual prefix_matches)
* @file: input #GFile * @file: input #GFile
* @prefix: input #GFile * @prefix: input #GFile
* *
@ -958,7 +957,6 @@ g_file_get_child_for_display_name (GFile *file,
* filesystem point of view), because the prefix of @file is an alias * filesystem point of view), because the prefix of @file is an alias
* of @prefix. * of @prefix.
* *
* Virtual: prefix_matches
* Returns: %TRUE if the @file's parent, grandparent, etc is @prefix, * Returns: %TRUE if the @file's parent, grandparent, etc is @prefix,
* %FALSE otherwise. * %FALSE otherwise.
*/ */
@ -1674,7 +1672,7 @@ g_file_find_enclosing_mount_finish (GFile *file,
/** /**
* g_file_read: * g_file_read: (virtual read_fn)
* @file: #GFile to read * @file: #GFile to read
* @cancellable: (nullable): a #GCancellable * @cancellable: (nullable): a #GCancellable
* @error: a #GError, or %NULL * @error: a #GError, or %NULL
@ -1691,7 +1689,6 @@ g_file_find_enclosing_mount_finish (GFile *file,
* error will be returned. Other errors are possible too, and depend * error will be returned. Other errors are possible too, and depend
* on what kind of filesystem the file is on. * on what kind of filesystem the file is on.
* *
* Virtual: read_fn
* Returns: (transfer full): #GFileInputStream or %NULL on error. * Returns: (transfer full): #GFileInputStream or %NULL on error.
* Free the returned object with g_object_unref(). * Free the returned object with g_object_unref().
*/ */
@ -4097,7 +4094,7 @@ g_file_make_directory (GFile *file,
} }
/** /**
* g_file_make_directory_async: * g_file_make_directory_async: (virtual make_directory_async)
* @file: input #GFile * @file: input #GFile
* @io_priority: the [I/O priority][io-priority] of the request * @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, * @cancellable: (nullable): optional #GCancellable object,
@ -4108,7 +4105,6 @@ g_file_make_directory (GFile *file,
* *
* Asynchronously creates a directory. * Asynchronously creates a directory.
* *
* Virtual: make_directory_async
* Since: 2.38 * Since: 2.38
*/ */
void void
@ -4131,7 +4127,7 @@ g_file_make_directory_async (GFile *file,
} }
/** /**
* g_file_make_directory_finish: * g_file_make_directory_finish: (virtual make_directory_finish)
* @file: input #GFile * @file: input #GFile
* @result: a #GAsyncResult * @result: a #GAsyncResult
* @error: a #GError, or %NULL * @error: a #GError, or %NULL
@ -4139,7 +4135,6 @@ g_file_make_directory_async (GFile *file,
* Finishes an asynchronous directory creation, started with * Finishes an asynchronous directory creation, started with
* g_file_make_directory_async(). * g_file_make_directory_async().
* *
* Virtual: make_directory_finish
* Returns: %TRUE on successful directory creation, %FALSE otherwise. * Returns: %TRUE on successful directory creation, %FALSE otherwise.
* Since: 2.38 * Since: 2.38
*/ */
@ -4371,7 +4366,7 @@ g_file_real_make_symbolic_link_async (GFile *file,
} }
/** /**
* g_file_make_symbolic_link_async: * g_file_make_symbolic_link_async: (virtual make_symbolic_link_async)
* @file: a #GFile with the name of the symlink to create * @file: a #GFile with the name of the symlink to create
* @symlink_value: (type filename): a string with the path for the target * @symlink_value: (type filename): a string with the path for the target
* of the new symlink * of the new symlink
@ -4385,7 +4380,6 @@ g_file_real_make_symbolic_link_async (GFile *file,
* Asynchronously creates a symbolic link named @file which contains the * Asynchronously creates a symbolic link named @file which contains the
* string @symlink_value. * string @symlink_value.
* *
* Virtual: make_symbolic_link_async
* Since: 2.74 * Since: 2.74
*/ */
void void
@ -4422,7 +4416,7 @@ g_file_real_make_symbolic_link_finish (GFile *file,
} }
/** /**
* g_file_make_symbolic_link_finish: * g_file_make_symbolic_link_finish: (virtual make_symbolic_link_finish)
* @file: input #GFile * @file: input #GFile
* @result: a #GAsyncResult * @result: a #GAsyncResult
* @error: a #GError, or %NULL * @error: a #GError, or %NULL
@ -4430,7 +4424,6 @@ g_file_real_make_symbolic_link_finish (GFile *file,
* Finishes an asynchronous symbolic link creation, started with * Finishes an asynchronous symbolic link creation, started with
* g_file_make_symbolic_link_async(). * g_file_make_symbolic_link_async().
* *
* Virtual: make_symbolic_link_finish
* Returns: %TRUE on successful directory creation, %FALSE otherwise. * Returns: %TRUE on successful directory creation, %FALSE otherwise.
* Since: 2.74 * Since: 2.74
*/ */
@ -4452,7 +4445,7 @@ g_file_make_symbolic_link_finish (GFile *file,
} }
/** /**
* g_file_delete: * g_file_delete: (virtual delete_file)
* @file: input #GFile * @file: input #GFile
* @cancellable: (nullable): optional #GCancellable object, * @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore * %NULL to ignore
@ -4480,7 +4473,6 @@ g_file_make_symbolic_link_finish (GFile *file,
* triggering the cancellable object from another thread. If the operation * triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
* *
* Virtual: delete_file
* Returns: %TRUE if the file was deleted. %FALSE otherwise. * Returns: %TRUE if the file was deleted. %FALSE otherwise.
*/ */
gboolean gboolean
@ -4509,7 +4501,7 @@ g_file_delete (GFile *file,
} }
/** /**
* g_file_delete_async: * g_file_delete_async: (virtual delete_file_async)
* @file: input #GFile * @file: input #GFile
* @io_priority: the [I/O priority][io-priority] of the request * @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, * @cancellable: (nullable): optional #GCancellable object,
@ -4522,7 +4514,6 @@ g_file_delete (GFile *file,
* only be deleted if it is empty. This has the same semantics as * only be deleted if it is empty. This has the same semantics as
* g_unlink(). * g_unlink().
* *
* Virtual: delete_file_async
* Since: 2.34 * Since: 2.34
*/ */
void void
@ -4545,14 +4536,13 @@ g_file_delete_async (GFile *file,
} }
/** /**
* g_file_delete_finish: * g_file_delete_finish: (virtual delete_file_finish)
* @file: input #GFile * @file: input #GFile
* @result: a #GAsyncResult * @result: a #GAsyncResult
* @error: a #GError, or %NULL * @error: a #GError, or %NULL
* *
* Finishes deleting a file started with g_file_delete_async(). * Finishes deleting a file started with g_file_delete_async().
* *
* Virtual: delete_file_finish
* Returns: %TRUE if the file was deleted. %FALSE otherwise. * Returns: %TRUE if the file was deleted. %FALSE otherwise.
* Since: 2.34 * Since: 2.34
**/ **/
@ -4574,7 +4564,7 @@ g_file_delete_finish (GFile *file,
} }
/** /**
* g_file_trash: * g_file_trash: (virtual trash)
* @file: #GFile to send to trash * @file: #GFile to send to trash
* @cancellable: (nullable): optional #GCancellable object, * @cancellable: (nullable): optional #GCancellable object,
* %NULL to ignore * %NULL to ignore
@ -4591,7 +4581,6 @@ g_file_delete_finish (GFile *file,
* triggering the cancellable object from another thread. If the operation * triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
* *
* Virtual: trash
* Returns: %TRUE on successful trash, %FALSE otherwise. * Returns: %TRUE on successful trash, %FALSE otherwise.
*/ */
gboolean gboolean
@ -4620,7 +4609,7 @@ g_file_trash (GFile *file,
} }
/** /**
* g_file_trash_async: * g_file_trash_async: (virtual trash_async)
* @file: input #GFile * @file: input #GFile
* @io_priority: the [I/O priority][io-priority] of the request * @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, * @cancellable: (nullable): optional #GCancellable object,
@ -4631,7 +4620,6 @@ g_file_trash (GFile *file,
* *
* Asynchronously sends @file to the Trash location, if possible. * Asynchronously sends @file to the Trash location, if possible.
* *
* Virtual: trash_async
* Since: 2.38 * Since: 2.38
*/ */
void void
@ -4654,7 +4642,7 @@ g_file_trash_async (GFile *file,
} }
/** /**
* g_file_trash_finish: * g_file_trash_finish: (virtual trash_finish)
* @file: input #GFile * @file: input #GFile
* @result: a #GAsyncResult * @result: a #GAsyncResult
* @error: a #GError, or %NULL * @error: a #GError, or %NULL
@ -4662,7 +4650,6 @@ g_file_trash_async (GFile *file,
* Finishes an asynchronous file trashing operation, started with * Finishes an asynchronous file trashing operation, started with
* g_file_trash_async(). * g_file_trash_async().
* *
* Virtual: trash_finish
* Returns: %TRUE on successful trash, %FALSE otherwise. * Returns: %TRUE on successful trash, %FALSE otherwise.
* Since: 2.38 * Since: 2.38
*/ */
@ -5798,7 +5785,7 @@ g_file_eject_mountable_with_operation_finish (GFile *file,
} }
/** /**
* g_file_monitor_directory: * g_file_monitor_directory: (virtual monitor_dir)
* @file: input #GFile * @file: input #GFile
* @flags: a set of #GFileMonitorFlags * @flags: a set of #GFileMonitorFlags
* @cancellable: (nullable): optional #GCancellable object, * @cancellable: (nullable): optional #GCancellable object,
@ -5818,10 +5805,8 @@ g_file_eject_mountable_with_operation_finish (GFile *file,
* directory for changes made via hard links; if you want to do this then * directory for changes made via hard links; if you want to do this then
* you must register individual watches with g_file_monitor(). * you must register individual watches with g_file_monitor().
* *
* Virtual: monitor_dir
* Returns: (transfer full): a #GFileMonitor for the given @file, * Returns: (transfer full): a #GFileMonitor for the given @file,
* or %NULL on error. * or %NULL on error. Free the returned object with g_object_unref().
* Free the returned object with g_object_unref().
*/ */
GFileMonitor * GFileMonitor *
g_file_monitor_directory (GFile *file, g_file_monitor_directory (GFile *file,

View File

@ -84,14 +84,13 @@ g_icon_default_init (GIconInterface *iface)
} }
/** /**
* g_icon_hash: * g_icon_hash: (hash)
* @icon: (not nullable) (type Gio.Icon): #gconstpointer to an icon object. * @icon: (not nullable) (type Gio.Icon): #gconstpointer to an icon object.
* *
* Gets a hash for an icon. * Gets a hash for an icon.
* *
* Virtual: hash
* Returns: a #guint containing a hash for the @icon, suitable for * Returns: a #guint containing a hash for the @icon, suitable for
* use in a #GHashTable or similar data structure. * use in a #GHashTable or similar data structure.
**/ **/
guint guint
g_icon_hash (gconstpointer icon) g_icon_hash (gconstpointer icon)

View File

@ -171,7 +171,7 @@ g_output_stream_init (GOutputStream *stream)
} }
/** /**
* g_output_stream_write: * g_output_stream_write: (virtual write_fn)
* @stream: a #GOutputStream. * @stream: a #GOutputStream.
* @buffer: (array length=count) (element-type guint8): the buffer containing the data to write. * @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
* @count: the number of bytes to write * @count: the number of bytes to write
@ -199,8 +199,6 @@ g_output_stream_init (GOutputStream *stream)
* *
* On error -1 is returned and @error is set accordingly. * On error -1 is returned and @error is set accordingly.
* *
* Virtual: write_fn
*
* Returns: Number of bytes written, or -1 on error * Returns: Number of bytes written, or -1 on error
**/ **/
gssize gssize
@ -320,7 +318,7 @@ g_output_stream_write_all (GOutputStream *stream,
} }
/** /**
* g_output_stream_writev: * g_output_stream_writev: (virtual writev_fn)
* @stream: a #GOutputStream. * @stream: a #GOutputStream.
* @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write. * @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write.
* @n_vectors: the number of vectors to write * @n_vectors: the number of vectors to write
@ -353,8 +351,6 @@ g_output_stream_write_all (GOutputStream *stream,
* are exceeded. For example, when writing to a local file on UNIX platforms, * are exceeded. For example, when writing to a local file on UNIX platforms,
* the aggregate buffer size must not exceed %G_MAXSSIZE bytes. * the aggregate buffer size must not exceed %G_MAXSSIZE bytes.
* *
* Virtual: writev_fn
*
* Returns: %TRUE on success, %FALSE if there was an error * Returns: %TRUE on success, %FALSE if there was an error
* *
* Since: 2.60 * Since: 2.60

View File

@ -170,7 +170,7 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream *stream,
} }
/** /**
* g_pollable_input_stream_read_nonblocking: * g_pollable_input_stream_read_nonblocking: (virtual read_nonblocking)
* @stream: a #GPollableInputStream * @stream: a #GPollableInputStream
* @buffer: (array length=count) (element-type guint8) (out caller-allocates): a * @buffer: (array length=count) (element-type guint8) (out caller-allocates): a
* buffer to read data into (which should be at least @count bytes long). * buffer to read data into (which should be at least @count bytes long).
@ -193,7 +193,6 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream *stream,
* The behaviour of this method is undefined if * The behaviour of this method is undefined if
* g_pollable_input_stream_can_poll() returns %FALSE for @stream. * g_pollable_input_stream_can_poll() returns %FALSE for @stream.
* *
* Virtual: read_nonblocking
* Returns: the number of bytes read, or -1 on error (including * Returns: the number of bytes read, or -1 on error (including
* %G_IO_ERROR_WOULD_BLOCK). * %G_IO_ERROR_WOULD_BLOCK).
*/ */

View File

@ -238,7 +238,7 @@ g_pollable_output_stream_default_writev_nonblocking (GPollableOutputStream *str
} }
/** /**
* g_pollable_output_stream_write_nonblocking: * g_pollable_output_stream_write_nonblocking: (virtual write_nonblocking)
* @stream: a #GPollableOutputStream * @stream: a #GPollableOutputStream
* @buffer: (array length=count) (element-type guint8): a buffer to write * @buffer: (array length=count) (element-type guint8): a buffer to write
* data from * data from
@ -265,7 +265,6 @@ g_pollable_output_stream_default_writev_nonblocking (GPollableOutputStream *str
* The behaviour of this method is undefined if * The behaviour of this method is undefined if
* g_pollable_output_stream_can_poll() returns %FALSE for @stream. * g_pollable_output_stream_can_poll() returns %FALSE for @stream.
* *
* Virtual: write_nonblocking
* Returns: the number of bytes written, or -1 on error (including * Returns: the number of bytes written, or -1 on error (including
* %G_IO_ERROR_WOULD_BLOCK). * %G_IO_ERROR_WOULD_BLOCK).
*/ */
@ -307,7 +306,7 @@ g_pollable_output_stream_write_nonblocking (GPollableOutputStream *stream,
} }
/** /**
* g_pollable_output_stream_writev_nonblocking: * g_pollable_output_stream_writev_nonblocking: (virtual writev_nonblocking)
* @stream: a #GPollableOutputStream * @stream: a #GPollableOutputStream
* @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write. * @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write.
* @n_vectors: the number of vectors to write * @n_vectors: the number of vectors to write
@ -336,8 +335,6 @@ g_pollable_output_stream_write_nonblocking (GPollableOutputStream *stream,
* The behaviour of this method is undefined if * The behaviour of this method is undefined if
* g_pollable_output_stream_can_poll() returns %FALSE for @stream. * g_pollable_output_stream_can_poll() returns %FALSE for @stream.
* *
* Virtual: writev_nonblocking
*
* Returns: %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK * Returns: %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK
* if the stream is not currently writable (and @error is *not* set), or * if the stream is not currently writable (and @error is *not* set), or
* %G_POLLABLE_RETURN_FAILED if there was an error in which case @error will * %G_POLLABLE_RETURN_FAILED if there was an error in which case @error will

View File

@ -300,7 +300,7 @@ g_tls_password_set_value (GTlsPassword *password,
} }
/** /**
* g_tls_password_set_value_full: * g_tls_password_set_value_full: (virtual set_value)
* @password: a #GTlsPassword object * @password: a #GTlsPassword object
* @value: (array length=length): the value for the password * @value: (array length=length): the value for the password
* @length: the length of the password, or -1 * @length: the length of the password, or -1
@ -316,7 +316,6 @@ g_tls_password_set_value (GTlsPassword *password,
* calculated automatically. (Note that the terminating nul is not * calculated automatically. (Note that the terminating nul is not
* considered part of the password in this case.) * considered part of the password in this case.)
* *
* Virtual: set_value
* Since: 2.30 * Since: 2.30
*/ */
void void

View File

@ -330,7 +330,7 @@ g_volume_should_automount (GVolume *volume)
/** /**
* g_volume_mount: * g_volume_mount: (virtual mount_fn)
* @volume: a #GVolume * @volume: a #GVolume
* @flags: flags affecting the operation * @flags: flags affecting the operation
* @mount_operation: (nullable): a #GMountOperation or %NULL to avoid user interaction * @mount_operation: (nullable): a #GMountOperation or %NULL to avoid user interaction
@ -341,8 +341,6 @@ g_volume_should_automount (GVolume *volume)
* Mounts a volume. This is an asynchronous operation, and is * Mounts a volume. This is an asynchronous operation, and is
* finished by calling g_volume_mount_finish() with the @volume * finished by calling g_volume_mount_finish() with the @volume
* and #GAsyncResult returned in the @callback. * and #GAsyncResult returned in the @callback.
*
* Virtual: mount_fn
*/ */
void void
g_volume_mount (GVolume *volume, g_volume_mount (GVolume *volume,