wayland: Add api to get wl_outputs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user