From 9bf6faf6392528c60b35cac2ca9ff84f2af5cb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 30 Apr 2020 17:58:17 +0200 Subject: [PATCH] output: Add name getter This will return the name of the connector, e.g. DP-2. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1237 --- src/backends/meta-output.c | 6 ++++++ src/backends/meta-output.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/backends/meta-output.c b/src/backends/meta-output.c index 6a1e7c803..5c13c3503 100644 --- a/src/backends/meta-output.c +++ b/src/backends/meta-output.c @@ -35,6 +35,12 @@ meta_output_get_gpu (MetaOutput *output) return output->gpu; } +const char * +meta_output_get_name (MetaOutput *output) +{ + return output->name; +} + void meta_output_assign_crtc (MetaOutput *output, MetaCrtc *crtc) diff --git a/src/backends/meta-output.h b/src/backends/meta-output.h index 1c62fc1d4..24a10cf04 100644 --- a/src/backends/meta-output.h +++ b/src/backends/meta-output.h @@ -122,6 +122,8 @@ META_EXPORT_TEST G_DECLARE_FINAL_TYPE (MetaOutput, meta_output, META, OUTPUT, GO META_EXPORT_TEST MetaGpu * meta_output_get_gpu (MetaOutput *output); +const char * meta_output_get_name (MetaOutput *output); + META_EXPORT_TEST void meta_output_assign_crtc (MetaOutput *output, MetaCrtc *crtc);