[mutter] monitor: Add getter for vendor and serial
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor: Add getter for vendor and serial
- Date: Wed, 25 Jan 2017 08:37:00 +0000 (UTC)
commit e1849ccbfa5d9465c40974a9f4f62cd609f76b28
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Dec 22 15:20:57 2016 +0800
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(+), 0 deletions(-)
---
diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c
index 1c5e60a..e7b2805 100644
--- a/src/backends/meta-monitor.c
+++ b/src/backends/meta-monitor.c
@@ -212,6 +212,15 @@ meta_monitor_get_subpixel_order (MetaMonitor *monitor)
}
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)
{
MetaOutput *output;
@@ -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 f4a583d..fceae1b 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]