monitor: Add API to get connector

The connector returned is the one of the main output. In other words,
for tiled monitors, it is the connector of the (0, 0) tile, and for
non-tiled, it is simply the connector of the output.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2017-04-06 13:14:43 +08:00
parent 15dd23a323
commit 5b4a96e3a3
2 changed files with 11 additions and 0 deletions

View File

@ -271,6 +271,15 @@ meta_monitor_get_subpixel_order (MetaMonitor *monitor)
return output->subpixel_order;
}
const char *
meta_monitor_get_connector (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->name;
}
const char *
meta_monitor_get_vendor (MetaMonitor *monitor)
{

View File

@ -117,6 +117,8 @@ void meta_monitor_get_physical_dimensions (MetaMonitor *monitor,
CoglSubpixelOrder meta_monitor_get_subpixel_order (MetaMonitor *monitor);
const char * meta_monitor_get_connector (MetaMonitor *monitor);
const char * meta_monitor_get_vendor (MetaMonitor *monitor);
const char * meta_monitor_get_product (MetaMonitor *monitor);