[virt-tools-list] [PATCH virt-viewer 2/4] VirtViewerDisplay: add convenience API for getting nth

Fabiano Fidêncio fidencio at redhat.com
Wed Sep 3 22:02:12 UTC 2014


On Fri, 2014-08-22 at 09:59 -0500, Jonathon Jongsma wrote:
> g_object_get(...) can be cumbersome, so add convenience API for getting
> the display ID ("nth-display") property:
> 
>     virt_viewer_display_get_nth()
> ---
>  src/virt-viewer-display.c | 6 ++++++
>  src/virt-viewer-display.h | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
> index e91450f..e6bc108 100644
> --- a/src/virt-viewer-display.c
> +++ b/src/virt-viewer-display.c
> @@ -838,6 +838,12 @@ void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay* self,
>      }
>  }
>  
> +gint
> +virt_viewer_display_get_nth(VirtViewerDisplay *self)
> +{
> +    return self->priv->nth_display;
> +}
> +
>  /*
>   * Local variables:
>   *  c-indent-level: 4
> diff --git a/src/virt-viewer-display.h b/src/virt-viewer-display.h
> index 70ce772..b1133e8 100644
> --- a/src/virt-viewer-display.h
> +++ b/src/virt-viewer-display.h
> @@ -127,6 +127,7 @@ gboolean virt_viewer_display_get_selectable(VirtViewerDisplay *display);
>  void virt_viewer_display_queue_resize(VirtViewerDisplay *display);
>  void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay *self, GdkRectangle* preferred);
>  void virt_viewer_display_get_preferred_size(VirtViewerDisplay *self, GtkRequisition* requisistion);
> +gint virt_viewer_display_get_nth(VirtViewerDisplay *self);
>  
>  G_END_DECLS
>  

ACK!




More information about the virt-tools-list mailing list