clutter/content: Mark optional parameters as such in annotation

The width and height parameters of clutter_content_get_preferred_size()
are optional, but were not marked as such. With a current gjs this will
result in a warning if a caller does not use them.

Found by Evan Welsh

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1945
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2079>
This commit is contained in:
Sebastian Keller 2021-11-08 04:50:14 +01:00 committed by Marge Bot
parent 078ead6802
commit e25df6675a

View File

@ -322,8 +322,8 @@ _clutter_content_paint_content (ClutterContent *content,
/**
* clutter_content_get_preferred_size:
* @content: a #ClutterContent
* @width: (out): return location for the natural width of the content
* @height: (out): return location for the natural height of the content
* @width: (out) (optional): return location for the natural width of the content
* @height: (out) (optional): return location for the natural height of the content
*
* Retrieves the natural size of the @content, if any.
*