gipropertyinfo: Port documentation to gi-docgen and update

Review and update the documentation, making sure it’s complete,
formatted in gi-docgen format, and has all appropriate GIR annotations
and `Since:` lines.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
This commit is contained in:
Philip Withnall 2023-12-13 13:24:10 +00:00
parent 5422788455
commit 2805823269
2 changed files with 33 additions and 22 deletions

View File

@ -33,23 +33,27 @@
#include "gipropertyinfo.h"
/**
* SECTION:gipropertyinfo
* @title: GIPropertyInfo
* @short_description: Struct representing a property
* GIPropertyInfo:
*
* GIPropertyInfo represents a property in a #GObject.
* `GIPropertyInfo` represents a property in a [class@GObject.Object].
*
* A property belongs to either a #GIObjectInfo or a #GIInterfaceInfo.
* A property belongs to either a [class@GIRepository.ObjectInfo] or a
* [class@GIRepository.InterfaceInfo].
*
* Since: 2.80
*/
/**
* gi_property_info_get_flags:
* @info: a #GIPropertyInfo
*
* Obtain the flags for this property info. See #GParamFlags for
* more information about possible flag values.
* Obtain the flags for this property info.
*
* See [type@GObject.ParamFlags] for more information about possible flag
* values.
*
* Returns: the flags
* Since: 2.80
*/
GParamFlags
gi_property_info_get_flags (GIPropertyInfo *info)
@ -86,8 +90,9 @@ gi_property_info_get_flags (GIPropertyInfo *info)
*
* Obtain the type information for the property @info.
*
* Returns: (transfer full): the #GITypeInfo, free it with
* gi_base_info_unref() when done.
* Returns: (transfer full): The [class@GIRepository.TypeInfo]. Free it with
* [method@GIRepository.BaseInfo.unref] when done.
* Since: 2.80
*/
GITypeInfo *
gi_property_info_get_type_info (GIPropertyInfo *info)
@ -106,10 +111,12 @@ gi_property_info_get_type_info (GIPropertyInfo *info)
* gi_property_info_get_ownership_transfer:
* @info: a #GIPropertyInfo
*
* Obtain the ownership transfer for this property. See #GITransfer for more
* information about transfer values.
* Obtain the ownership transfer for this property.
*
* See [type@GIRepository.Transfer] for more information about transfer values.
*
* Returns: the transfer
* Since: 2.80
*/
GITransfer
gi_property_info_get_ownership_transfer (GIPropertyInfo *info)
@ -134,13 +141,14 @@ gi_property_info_get_ownership_transfer (GIPropertyInfo *info)
* gi_property_info_get_setter:
* @info: a #GIPropertyInfo
*
* Obtains the setter function associated with this #GIPropertyInfo.
* Obtains the setter function associated with this `GIPropertyInfo`.
*
* The setter is only available for %G_PARAM_WRITABLE properties that
* are also not %G_PARAM_CONSTRUCT_ONLY.
* The setter is only available for `G_PARAM_WRITABLE` properties that
* are also not `G_PARAM_CONSTRUCT_ONLY`.
*
* Returns: (transfer full) (nullable): the function info or %NULL if not set.
* Free it with gi_base_info_unref() when done.
* Returns: (transfer full) (nullable): The function info, or `NULL` if not set.
* Free it with [method@GIRepository.BaseInfo.unref] when done.
* Since: 2.80
*/
GIFunctionInfo *
gi_property_info_get_setter (GIPropertyInfo *info)
@ -174,12 +182,13 @@ gi_property_info_get_setter (GIPropertyInfo *info)
* gi_property_info_get_getter:
* @info: a #GIPropertyInfo
*
* Obtains the getter function associated with this #GIPropertyInfo.
* Obtains the getter function associated with this `GIPropertyInfo`.
*
* The setter is only available for %G_PARAM_READABLE properties.
* The setter is only available for `G_PARAM_READABLE` properties.
*
* Returns: (transfer full) (nullable): the function info or %NULL if not set.
* Free it with gi_base_info_unref() when done.
* Returns: (transfer full) (nullable): The function info, or `NULL` if not set.
* Free it with [method@GIRepository.BaseInfo.unref] when done.
* Since: 2.80
*/
GIFunctionInfo *
gi_property_info_get_getter (GIPropertyInfo *info)

View File

@ -33,10 +33,12 @@
G_BEGIN_DECLS
/**
* GI_IS_PROPERTY_INFO
* GI_IS_PROPERTY_INFO:
* @info: an info structure
*
* Checks if @info is a #GIPropertyInfo.
* Checks if @info is a [class@GIRepository.PropertyInfo].
*
* Since: 2.80
*/
#define GI_IS_PROPERTY_INFO(info) \
(gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_PROPERTY)