From e1849ccbfa5d9465c40974a9f4f62cd609f76b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 22 Dec 2016 15:20:57 +0800 Subject: [PATCH] monitor: Add getter for vendor and serial https://bugzilla.gnome.org/show_bug.cgi?id=777732 --- src/backends/meta-monitor.c | 18 ++++++++++++++++++ src/backends/meta-monitor.h | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c index 1c5e60aed..e7b280512 100644 --- a/src/backends/meta-monitor.c +++ b/src/backends/meta-monitor.c @@ -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) { diff --git a/src/backends/meta-monitor.h b/src/backends/meta-monitor.h index f4a583da3..fceae1b7c 100644 --- a/src/backends/meta-monitor.h +++ b/src/backends/meta-monitor.h @@ -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,