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" #include "gipropertyinfo.h"
/** /**
* SECTION:gipropertyinfo * GIPropertyInfo:
* @title: GIPropertyInfo
* @short_description: Struct representing a property
* *
* 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: * gi_property_info_get_flags:
* @info: a #GIPropertyInfo * @info: a #GIPropertyInfo
* *
* Obtain the flags for this property info. See #GParamFlags for * Obtain the flags for this property info.
* more information about possible flag values. *
* See [type@GObject.ParamFlags] for more information about possible flag
* values.
* *
* Returns: the flags * Returns: the flags
* Since: 2.80
*/ */
GParamFlags GParamFlags
gi_property_info_get_flags (GIPropertyInfo *info) 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. * Obtain the type information for the property @info.
* *
* Returns: (transfer full): the #GITypeInfo, free it with * Returns: (transfer full): The [class@GIRepository.TypeInfo]. Free it with
* gi_base_info_unref() when done. * [method@GIRepository.BaseInfo.unref] when done.
* Since: 2.80
*/ */
GITypeInfo * GITypeInfo *
gi_property_info_get_type_info (GIPropertyInfo *info) 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: * gi_property_info_get_ownership_transfer:
* @info: a #GIPropertyInfo * @info: a #GIPropertyInfo
* *
* Obtain the ownership transfer for this property. See #GITransfer for more * Obtain the ownership transfer for this property.
* information about transfer values. *
* See [type@GIRepository.Transfer] for more information about transfer values.
* *
* Returns: the transfer * Returns: the transfer
* Since: 2.80
*/ */
GITransfer GITransfer
gi_property_info_get_ownership_transfer (GIPropertyInfo *info) 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: * gi_property_info_get_setter:
* @info: a #GIPropertyInfo * @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 * The setter is only available for `G_PARAM_WRITABLE` properties that
* are also not %G_PARAM_CONSTRUCT_ONLY. * are also not `G_PARAM_CONSTRUCT_ONLY`.
* *
* Returns: (transfer full) (nullable): the function info or %NULL if not set. * Returns: (transfer full) (nullable): The function info, or `NULL` if not set.
* Free it with gi_base_info_unref() when done. * Free it with [method@GIRepository.BaseInfo.unref] when done.
* Since: 2.80
*/ */
GIFunctionInfo * GIFunctionInfo *
gi_property_info_get_setter (GIPropertyInfo *info) gi_property_info_get_setter (GIPropertyInfo *info)
@ -174,12 +182,13 @@ gi_property_info_get_setter (GIPropertyInfo *info)
* gi_property_info_get_getter: * gi_property_info_get_getter:
* @info: a #GIPropertyInfo * @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. * Returns: (transfer full) (nullable): The function info, or `NULL` if not set.
* Free it with gi_base_info_unref() when done. * Free it with [method@GIRepository.BaseInfo.unref] when done.
* Since: 2.80
*/ */
GIFunctionInfo * GIFunctionInfo *
gi_property_info_get_getter (GIPropertyInfo *info) gi_property_info_get_getter (GIPropertyInfo *info)

View File

@ -33,10 +33,12 @@
G_BEGIN_DECLS G_BEGIN_DECLS
/** /**
* GI_IS_PROPERTY_INFO * GI_IS_PROPERTY_INFO:
* @info: an info structure * @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) \ #define GI_IS_PROPERTY_INFO(info) \
(gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_PROPERTY) (gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_PROPERTY)