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
This commit is contained in:
Jonas Ådahl 2020-04-30 17:58:17 +02:00 committed by Georges Basile Stavracas Neto
parent 4434a17d08
commit 9bf6faf639
2 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,12 @@ meta_output_get_gpu (MetaOutput *output)
return output->gpu; return output->gpu;
} }
const char *
meta_output_get_name (MetaOutput *output)
{
return output->name;
}
void void
meta_output_assign_crtc (MetaOutput *output, meta_output_assign_crtc (MetaOutput *output,
MetaCrtc *crtc) MetaCrtc *crtc)

View File

@ -122,6 +122,8 @@ META_EXPORT_TEST G_DECLARE_FINAL_TYPE (MetaOutput, meta_output, META, OUTPUT, GO
META_EXPORT_TEST META_EXPORT_TEST
MetaGpu * meta_output_get_gpu (MetaOutput *output); MetaGpu * meta_output_get_gpu (MetaOutput *output);
const char * meta_output_get_name (MetaOutput *output);
META_EXPORT_TEST META_EXPORT_TEST
void meta_output_assign_crtc (MetaOutput *output, void meta_output_assign_crtc (MetaOutput *output,
MetaCrtc *crtc); MetaCrtc *crtc);