[gtk+/wip/matthiasc/monitor] wayland: Add api to get wl_outputs



commit 05b023980a120008fb326a696eb7e2087295bafa
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Apr 4 23:23:42 2016 -0400

    wayland: Add api to get wl_outputs

 gdk/wayland/gdkmonitor-wayland.c |   17 +++++++++++++++++
 gdk/wayland/gdkwaylandmonitor.h  |    3 +++
 2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkmonitor-wayland.c b/gdk/wayland/gdkmonitor-wayland.c
index 53f23db..517d75a 100644
--- a/gdk/wayland/gdkmonitor-wayland.c
+++ b/gdk/wayland/gdkmonitor-wayland.c
@@ -47,3 +47,20 @@ gdk_wayland_monitor_class_init (GdkWaylandMonitorClass *class)
 {
   G_OBJECT_CLASS (class)->finalize = gdk_wayland_monitor_finalize;
 }
+
+/**
+ * gdk_wayland_monitor_get_wl_output:
+ * @monitor: (type GdkWaylandMonitor): a #GdkMonitor
+ *
+ * Returns the Wayland wl_output of a #GdkMonitor.
+ *
+ * Returns: (transfer none): a Wayland wl_output
+ * Since: 3.22
+ */
+struct wl_output *
+gdk_wayland_monitor_get_wl_output (GdkMonitor *monitor)
+{
+  g_return_val_if_fail (GDK_IS_WAYLAND_MONITOR (monitor), NULL);
+
+  return GDK_WAYLAND_MONITOR (monitor)->output;
+}
diff --git a/gdk/wayland/gdkwaylandmonitor.h b/gdk/wayland/gdkwaylandmonitor.h
index 3e7bc38..860d45b 100644
--- a/gdk/wayland/gdkwaylandmonitor.h
+++ b/gdk/wayland/gdkwaylandmonitor.h
@@ -40,6 +40,9 @@ typedef struct _GdkWaylandMonitorClass GdkWaylandMonitorClass;
 GDK_AVAILABLE_IN_3_22
 GType             gdk_wayland_monitor_get_type            (void) G_GNUC_CONST;
 
+GDK_AVAILABLE_IN_3_22
+struct wl_output *gdk_wayland_monitor_get_wl_output       (GdkMonitor *monitor);
+
 G_END_DECLS
 
 #endif  /* __GDK_WAYLAND_MONITOR_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]