summaryrefslogtreecommitdiff
path: root/src/meta
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2017-06-07 18:38:10 +0200
committerRui Matos <tiagomatos@gmail.com>2017-07-19 11:18:53 +0200
commit3f9c5823cbb976e4cc1c56f39cea7f81469c8349 (patch)
treee2888959c707db106e478c2af7115e9d9725ba5b /src/meta
parent2bdd97e067cb8dca4b4c45ef9d407cca8b54d063 (diff)
downloadmutter-3f9c5823cbb976e4cc1c56f39cea7f81469c8349.tar.gz
backends: Add API to switch to predetermined monitor configurations
This will allows us to support the XF86Display key present on some laptops, directly in mutter. This is also known, in evdev, as KEY_SWITCHVIDEOMODE. The common usage for this key is to alternate between a few well known multi-monitor configurations though these aren't officially standardized. As an example, Lenovo documents it as: "Switches the display output location between the computer display and an external monitor." On this patch, we're just introducing the configurations that have been implemented in g-s-d until now, which go a bit beyond the above description. https://bugzilla.gnome.org/show_bug.cgi?id=781906
Diffstat (limited to 'src/meta')
-rw-r--r--src/meta/meta-monitor-manager.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/meta/meta-monitor-manager.h b/src/meta/meta-monitor-manager.h
index da1e32922..22f734906 100644
--- a/src/meta/meta-monitor-manager.h
+++ b/src/meta/meta-monitor-manager.h
@@ -24,6 +24,15 @@
#include <glib-object.h>
+typedef enum
+{
+ META_MONITOR_SWITCH_CONFIG_ALL_MIRROR,
+ META_MONITOR_SWITCH_CONFIG_ALL_LINEAR,
+ META_MONITOR_SWITCH_CONFIG_EXTERNAL,
+ META_MONITOR_SWITCH_CONFIG_BUILTIN,
+ META_MONITOR_SWITCH_CONFIG_UNKNOWN,
+} MetaMonitorSwitchConfigType;
+
typedef struct _MetaMonitorManagerClass MetaMonitorManagerClass;
typedef struct _MetaMonitorManager MetaMonitorManager;
@@ -39,4 +48,11 @@ gint meta_monitor_manager_get_monitor_for_connector (MetaMonitorManager *manager
gboolean meta_monitor_manager_get_is_builtin_display_on (MetaMonitorManager *manager);
+void meta_monitor_manager_switch_config (MetaMonitorManager *manager,
+ MetaMonitorSwitchConfigType config_type);
+
+gboolean meta_monitor_manager_can_switch_config (MetaMonitorManager *manager);
+
+MetaMonitorSwitchConfigType meta_monitor_manager_get_switch_config (MetaMonitorManager *manager);
+
#endif /* META_MONITOR_MANAGER_H */