mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
monitor-manager: Add get_vendor_name
API
The monitor manager keeps the list of PnP Ids, add a new API to get the vendor name from a given PnP ID. https://gitlab.gnome.org/GNOME/mutter/issues/645
This commit is contained in:
parent
70de90ebce
commit
c3c6668343
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user