monitor: Add meta_monitor_get_gpu()

Add API to get what GPU drives this monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=785381
This commit is contained in:
Jonas Ådahl 2017-07-24 17:16:38 +08:00
parent e62cfd9043
commit 802f7dcd30
2 changed files with 10 additions and 0 deletions

View File

@ -180,6 +180,14 @@ meta_monitor_generate_spec (MetaMonitor *monitor)
priv->spec = monitor_spec;
}
MetaGpu *
meta_monitor_get_gpu (MetaMonitor *monitor)
{
MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor);
return priv->gpu;
}
GList *
meta_monitor_get_outputs (MetaMonitor *monitor)
{

View File

@ -101,6 +101,8 @@ MetaMonitorNormal * meta_monitor_normal_new (MetaGpu *gpu,
MetaMonitorSpec * meta_monitor_get_spec (MetaMonitor *monitor);
MetaGpu * meta_monitor_get_gpu (MetaMonitor *monitor);
gboolean meta_monitor_is_active (MetaMonitor *monitor);
MetaOutput * meta_monitor_get_main_output (MetaMonitor *monitor);