diff --git a/src/backends/meta-monitor-manager-private.h b/src/backends/meta-monitor-manager-private.h index f34c01ae1..20bb6b679 100644 --- a/src/backends/meta-monitor-manager-private.h +++ b/src/backends/meta-monitor-manager-private.h @@ -385,4 +385,7 @@ void meta_monitor_manager_clear_crtc (MetaCrtc *crtc); gboolean meta_monitor_has_aspect_as_size (MetaMonitor *monitor); +char * meta_monitor_manager_get_vendor_name (MetaMonitorManager *manager, + const char *vendor); + #endif /* META_MONITOR_MANAGER_PRIVATE_H */ diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index 35ae2c736..6ac7544c0 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -3189,3 +3189,23 @@ meta_monitor_manager_get_config_manager (MetaMonitorManager *manager) { return manager->config_manager; } + +/** + * meta_monitor_manager_get_vendor_name: + * @manager: A #MetaMonitorManager object + * @vendor: the PNP ID of the monitor + * + * Find the full vendor name from the given monitor PNP ID. + * + * Returns: (transfer full): A string containing the vendor name, + * or NULL when not found. + */ +char * +meta_monitor_manager_get_vendor_name (MetaMonitorManager *manager, + const char *vendor) +{ + if (!manager->pnp_ids) + manager->pnp_ids = gnome_pnp_ids_new (); + + return gnome_pnp_ids_get_pnp_id (manager->pnp_ids, vendor); +}