[virt-tools-list] [PATCH virt-viewer 2/4] VirtViewerDisplay: add convenience API for getting nth
Jonathon Jongsma
jjongsma at redhat.com
Fri Aug 22 14:59:25 UTC 2014
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
--
1.9.3
More information about the virt-tools-list
mailing list