[Spice-devel] [PATCH spice-gtk] Fix annotations for GrabSequence class

Hans de Goede hdegoede at redhat.com
Fri Apr 27 03:32:43 PDT 2012


Looks good, ack.

On 04/27/2012 10:34 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange"<berrange at redhat.com>
>
> The default transfer mode is wrong for spice_display_get_grab_keys.
> The array parameter for spice_grab_sequence_new needs explicit
> annotation
>
> Signed-off-by: Daniel P. Berrange<berrange at redhat.com>
> ---
>   gtk/spice-grabsequence.c |   12 +++++++-----
>   gtk/spice-widget.c       |    8 ++++----
>   2 files changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/gtk/spice-grabsequence.c b/gtk/spice-grabsequence.c
> index a7ef603..dab438c 100644
> --- a/gtk/spice-grabsequence.c
> +++ b/gtk/spice-grabsequence.c
> @@ -42,11 +42,13 @@ GType spice_grab_sequence_get_type(void)
>
>   /**
>    * spice_grab_sequence_new:
> - * @nkeysyms: GDK_ key values
> - * @keysyms: number of key values in @nkeysyms
> + * @nkeysyms: length of @keysyms
> + * @keysyms: (array length=nkeysyms): the keysym values
>    *
> - * Returns: a new #SpiceGrabSequence.
> - **/
> + * Creates a new grab sequence from a list of keysym values
> + *
> + * Returns: (transfer full): a new grab sequence object
> + */
>   SpiceGrabSequence *spice_grab_sequence_new(guint nkeysyms, guint *keysyms)
>   {
>   	SpiceGrabSequence *sequence;
> @@ -131,7 +133,7 @@ void spice_grab_sequence_free(SpiceGrabSequence *sequence)
>    * spice_grab_sequence_as_string:
>    * @sequence:
>    *
> - * Returns: a newly allocated string representing the key sequence
> + * Returns: (transfer full): a newly allocated string representing the key sequence
>    **/
>   gchar *spice_grab_sequence_as_string(SpiceGrabSequence *sequence)
>   {
> diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
> index d355f09..e6c252d 100644
> --- a/gtk/spice-widget.c
> +++ b/gtk/spice-widget.c
> @@ -438,8 +438,8 @@ spice_display_constructor(GType                  gtype,
>
>   /**
>    * spice_display_set_grab_keys:
> - * @display:
> - * @seq: key sequence
> + * @display: the display widget
> + * @seq: (transfer none): key sequence
>    *
>    * Set the key combination to grab/ungrab the keyboard. The default is
>    * "Control L + Alt L".
> @@ -493,9 +493,9 @@ static LRESULT CALLBACK keyboard_hook_cb(int code, WPARAM wparam, LPARAM lparam)
>
>   /**
>    * spice_display_get_grab_keys:
> - * @display:
> + * @display: the display widget
>    *
> - * Returns: the current grab key combination.
> + * Returns: (transfer none): the current grab key combination.
>    **/
>   SpiceGrabSequence *spice_display_get_grab_keys(SpiceDisplay *display)
>   {


More information about the Spice-devel mailing list