summaryrefslogtreecommitdiff
path: root/panels/display/cc-display-config.h
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2022-06-23 12:59:50 +0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2022-06-27 14:06:16 +0000
commit9e4f15353c9601dd7a57f49abacb115f3592c2bb (patch)
tree7da5778696088ca0f8612beb370245b6897b47a6 /panels/display/cc-display-config.h
parent6087c0397b9133d09830fa4aca20498df154a480 (diff)
downloadgnome-control-center-9e4f15353c9601dd7a57f49abacb115f3592c2bb.tar.gz
display: Use virtual clone modes when mirroring
These are not real modes, but just as place holders when generating 'mirror' configurations. The clone modes will be just to match the flag/dimension, while the actual mode applied will be individual for each monitor. This allows monitors to have their own refresh rates, which is possible since a few mutter versions back. This also matches how mutter itself generates mirror modes when doing so via the key binding.
Diffstat (limited to 'panels/display/cc-display-config.h')
-rw-r--r--panels/display/cc-display-config.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/panels/display/cc-display-config.h b/panels/display/cc-display-config.h
index dbaaa5cc5..852efa109 100644
--- a/panels/display/cc-display-config.h
+++ b/panels/display/cc-display-config.h
@@ -77,6 +77,7 @@ struct _CcDisplayModeClass
{
GObjectClass parent_class;
+ gboolean (*is_clone_mode) (CcDisplayMode *self);
void (*get_resolution) (CcDisplayMode *self, int *w, int *h);
GArray* (*get_supported_scales) (CcDisplayMode *self);
double (*get_preferred_scale) (CcDisplayMode *self);
@@ -125,6 +126,8 @@ struct _CcDisplayMonitorClass
CcDisplayMode* (*get_mode) (CcDisplayMonitor *self);
CcDisplayMode* (*get_preferred_mode) (CcDisplayMonitor *self);
GList* (*get_modes) (CcDisplayMonitor *self);
+ void (*set_compatible_clone_mode) (CcDisplayMonitor *self,
+ CcDisplayMode *m);
void (*set_mode) (CcDisplayMonitor *self,
CcDisplayMode *m);
void (*set_position) (CcDisplayMonitor *self,
@@ -153,7 +156,7 @@ struct _CcDisplayConfigClass
gboolean (*is_cloning) (CcDisplayConfig *self);
void (*set_cloning) (CcDisplayConfig *self,
gboolean clone);
- GList* (*get_cloning_modes) (CcDisplayConfig *self);
+ GList* (*generate_cloning_modes) (CcDisplayConfig *self);
gboolean (*is_layout_logical) (CcDisplayConfig *self);
void (*set_minimum_size) (CcDisplayConfig *self,
int width,
@@ -176,7 +179,7 @@ gboolean cc_display_config_apply (CcDisplayConfig
gboolean cc_display_config_is_cloning (CcDisplayConfig *config);
void cc_display_config_set_cloning (CcDisplayConfig *config,
gboolean clone);
-GList* cc_display_config_get_cloning_modes (CcDisplayConfig *config);
+GList* cc_display_config_generate_cloning_modes (CcDisplayConfig *config);
void cc_display_config_set_mode_on_all_outputs (CcDisplayConfig *config,
CcDisplayMode *mode);
@@ -227,6 +230,8 @@ double cc_display_monitor_get_scale (CcDisplayMonitor *
void cc_display_monitor_set_scale (CcDisplayMonitor *monitor,
double s);
+void cc_display_monitor_set_compatible_clone_mode (CcDisplayMonitor *monitor,
+ CcDisplayMode *mode);
void cc_display_monitor_set_mode (CcDisplayMonitor *monitor,
CcDisplayMode *mode);
void cc_display_monitor_set_position (CcDisplayMonitor *monitor,
@@ -242,6 +247,7 @@ const char* cc_display_monitor_get_ui_name (CcDisplayMonitor *
const char* cc_display_monitor_get_ui_number_name (CcDisplayMonitor *monitor);
char* cc_display_monitor_dup_ui_number_name (CcDisplayMonitor *monitor);
+gboolean cc_display_mode_is_clone_mode (CcDisplayMode *mode);
void cc_display_mode_get_resolution (CcDisplayMode *mode,
int *width,
int *height);