wayland: Add api to get wl_outputs

This commit is contained in:
Matthias Clasen
2016-04-04 23:23:42 -04:00
parent b348de178e
commit 05b023980a
2 changed files with 20 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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__ */