monitor: Add getter for vendor and serial

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2016-12-22 15:20:57 +08:00
parent 6262b46928
commit e1849ccbfa
2 changed files with 22 additions and 0 deletions

View File

@ -211,6 +211,15 @@ meta_monitor_get_subpixel_order (MetaMonitor *monitor)
return output->subpixel_order;
}
const char *
meta_monitor_get_vendor (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->vendor;
}
const char *
meta_monitor_get_product (MetaMonitor *monitor)
{
@ -220,6 +229,15 @@ meta_monitor_get_product (MetaMonitor *monitor)
return output->product;
}
const char *
meta_monitor_get_serial (MetaMonitor *monitor)
{
MetaOutput *output;
output = meta_monitor_get_main_output (monitor);
return output->serial;
}
static void
meta_monitor_finalize (GObject *object)
{

View File

@ -107,8 +107,12 @@ void meta_monitor_get_physical_dimensions (MetaMonitor *monitor,
CoglSubpixelOrder meta_monitor_get_subpixel_order (MetaMonitor *monitor);
const char * meta_monitor_get_vendor (MetaMonitor *monitor);
const char * meta_monitor_get_product (MetaMonitor *monitor);
const char * meta_monitor_get_serial (MetaMonitor *monitor);
uint32_t meta_monitor_tiled_get_tile_group_id (MetaMonitorTiled *monitor_tiled);
MetaMonitorMode * meta_monitor_get_mode_from_spec (MetaMonitor *monitor,