2013-07-18 07:09:16 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
2014-05-02 09:34:02 -04:00
|
|
|
/*
|
2013-07-18 07:09:16 -04:00
|
|
|
* Copyright (C) 2001 Havoc Pennington
|
|
|
|
* Copyright (C) 2003 Rob Adams
|
|
|
|
* Copyright (C) 2004-2006 Elijah Newren
|
|
|
|
* Copyright (C) 2013 Red Hat Inc.
|
2014-05-02 09:34:02 -04:00
|
|
|
*
|
2013-07-18 07:09:16 -04:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
2014-05-02 09:34:02 -04:00
|
|
|
*
|
2013-07-18 07:09:16 -04:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-11 20:42:06 -05:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2013-07-18 07:09:16 -04:00
|
|
|
*/
|
|
|
|
|
2016-12-07 23:17:20 -05:00
|
|
|
#ifndef META_MONITOR_MANAGER_PRIVATE_H
|
|
|
|
#define META_MONITOR_MANAGER_PRIVATE_H
|
2013-07-18 07:09:16 -04:00
|
|
|
|
2013-07-19 08:39:28 -04:00
|
|
|
#include <cogl/cogl.h>
|
2020-01-14 16:34:44 -05:00
|
|
|
#include <graphene.h>
|
2013-08-16 11:32:50 -04:00
|
|
|
#include <libgnome-desktop/gnome-pnp-ids.h>
|
2013-07-19 08:39:28 -04:00
|
|
|
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "backends/meta-backend-private.h"
|
|
|
|
#include "backends/meta-cursor.h"
|
|
|
|
#include "backends/meta-display-config-shared.h"
|
2019-01-05 08:15:23 -05:00
|
|
|
#include "backends/meta-monitor-transform.h"
|
2019-01-22 21:25:35 -05:00
|
|
|
#include "core/util-private.h"
|
2018-07-10 04:36:24 -04:00
|
|
|
#include "meta/display.h"
|
|
|
|
#include "meta/meta-monitor-manager.h"
|
2013-07-24 04:01:57 -04:00
|
|
|
|
2014-03-31 23:33:01 -04:00
|
|
|
#include "meta-dbus-display-config.h"
|
2013-07-18 07:09:16 -04:00
|
|
|
|
2017-04-12 02:15:33 -04:00
|
|
|
#define META_MONITOR_MANAGER_MIN_SCREEN_WIDTH 640
|
|
|
|
#define META_MONITOR_MANAGER_MIN_SCREEN_HEIGHT 480
|
|
|
|
|
2017-02-07 03:01:40 -05:00
|
|
|
typedef enum _MetaMonitorManagerCapability
|
|
|
|
{
|
|
|
|
META_MONITOR_MANAGER_CAPABILITY_NONE = 0,
|
2020-02-28 05:09:46 -05:00
|
|
|
META_MONITOR_MANAGER_CAPABILITY_LAYOUT_MODE = (1 << 0),
|
|
|
|
META_MONITOR_MANAGER_CAPABILITY_GLOBAL_SCALE_REQUIRED = (1 << 1)
|
2017-02-07 03:01:40 -05:00
|
|
|
} MetaMonitorManagerCapability;
|
|
|
|
|
2017-02-14 06:54:04 -05:00
|
|
|
/* Equivalent to the 'method' enum in org.gnome.Mutter.DisplayConfig */
|
|
|
|
typedef enum _MetaMonitorsConfigMethod
|
|
|
|
{
|
|
|
|
META_MONITORS_CONFIG_METHOD_VERIFY = 0,
|
|
|
|
META_MONITORS_CONFIG_METHOD_TEMPORARY = 1,
|
|
|
|
META_MONITORS_CONFIG_METHOD_PERSISTENT = 2
|
|
|
|
} MetaMonitorsConfigMethod;
|
|
|
|
|
2017-02-24 05:10:52 -05:00
|
|
|
/* Equivalent to the 'layout-mode' enum in org.gnome.Mutter.DisplayConfig */
|
|
|
|
typedef enum _MetaLogicalMonitorLayoutMode
|
|
|
|
{
|
|
|
|
META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL = 1,
|
|
|
|
META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL = 2
|
|
|
|
} MetaLogicalMonitorLayoutMode;
|
|
|
|
|
2013-07-24 12:01:31 -04:00
|
|
|
/*
|
2020-02-25 14:30:46 -05:00
|
|
|
* MetaCrtcAssignment:
|
2013-07-24 12:01:31 -04:00
|
|
|
*
|
2017-03-24 03:36:12 -04:00
|
|
|
* A representation of a CRTC configuration, generated by
|
|
|
|
* MetaMonitorConfigManager.
|
2013-07-24 12:01:31 -04:00
|
|
|
*/
|
2020-02-25 14:30:46 -05:00
|
|
|
struct _MetaCrtcAssignment
|
2016-12-20 22:17:27 -05:00
|
|
|
{
|
2016-12-07 23:15:28 -05:00
|
|
|
MetaCrtc *crtc;
|
2016-12-09 02:49:54 -05:00
|
|
|
MetaCrtcMode *mode;
|
2020-01-14 16:34:44 -05:00
|
|
|
graphene_rect_t layout;
|
2014-07-10 17:39:47 -04:00
|
|
|
MetaMonitorTransform transform;
|
2013-07-24 12:01:31 -04:00
|
|
|
GPtrArray *outputs;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
2020-02-25 14:30:46 -05:00
|
|
|
* MetaOutputAssignment:
|
2017-03-24 03:36:12 -04:00
|
|
|
*
|
|
|
|
* A representation of a connector configuration, generated by
|
|
|
|
* MetaMonitorConfigManager.
|
2013-07-24 12:01:31 -04:00
|
|
|
*/
|
2020-02-25 14:30:46 -05:00
|
|
|
struct _MetaOutputAssignment
|
2016-12-20 22:17:27 -05:00
|
|
|
{
|
2013-07-24 12:01:31 -04:00
|
|
|
MetaOutput *output;
|
|
|
|
gboolean is_primary;
|
|
|
|
gboolean is_presentation;
|
2014-04-16 04:20:55 -04:00
|
|
|
gboolean is_underscanning;
|
2013-07-24 12:01:31 -04:00
|
|
|
};
|
|
|
|
|
2013-07-18 07:09:16 -04:00
|
|
|
#define META_TYPE_MONITOR_MANAGER (meta_monitor_manager_get_type ())
|
|
|
|
#define META_MONITOR_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MONITOR_MANAGER, MetaMonitorManager))
|
|
|
|
#define META_MONITOR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_MONITOR_MANAGER, MetaMonitorManagerClass))
|
|
|
|
#define META_IS_MONITOR_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_MONITOR_MANAGER))
|
|
|
|
#define META_IS_MONITOR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_MONITOR_MANAGER))
|
|
|
|
#define META_MONITOR_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_MONITOR_MANAGER, MetaMonitorManagerClass))
|
|
|
|
|
2016-12-05 05:33:19 -05:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorManager, g_object_unref)
|
|
|
|
|
2013-07-29 07:00:15 -04:00
|
|
|
struct _MetaMonitorManager
|
|
|
|
{
|
2019-01-22 20:49:26 -05:00
|
|
|
GObject parent_instance;
|
|
|
|
|
|
|
|
MetaDBusDisplayConfig *display_config;
|
2013-07-29 07:00:15 -04:00
|
|
|
|
2017-07-10 05:39:07 -04:00
|
|
|
MetaBackend *backend;
|
|
|
|
|
2013-07-29 07:00:15 -04:00
|
|
|
/* XXX: this structure is very badly
|
|
|
|
packed, but I like the logical organization
|
|
|
|
of fields */
|
|
|
|
|
|
|
|
gboolean in_init;
|
|
|
|
unsigned int serial;
|
|
|
|
|
2017-02-24 05:10:52 -05:00
|
|
|
MetaLogicalMonitorLayoutMode layout_mode;
|
|
|
|
|
2013-07-29 07:00:15 -04:00
|
|
|
int screen_width;
|
|
|
|
int screen_height;
|
|
|
|
|
2016-12-12 21:53:38 -05:00
|
|
|
GList *monitors;
|
|
|
|
|
2016-12-02 03:00:03 -05:00
|
|
|
GList *logical_monitors;
|
2016-11-28 07:43:27 -05:00
|
|
|
MetaLogicalMonitor *primary_logical_monitor;
|
2013-07-29 07:00:15 -04:00
|
|
|
|
|
|
|
int dbus_name_id;
|
|
|
|
|
|
|
|
int persistent_timeout_id;
|
2017-03-23 05:20:07 -04:00
|
|
|
|
2020-06-11 12:15:22 -04:00
|
|
|
guint panel_orientation_managed : 1;
|
|
|
|
|
2017-01-09 01:31:18 -05:00
|
|
|
MetaMonitorConfigManager *config_manager;
|
|
|
|
|
2013-08-16 11:32:50 -04:00
|
|
|
GnomePnpIds *pnp_ids;
|
2017-03-04 02:30:56 -05:00
|
|
|
|
|
|
|
gulong experimental_features_changed_handler_id;
|
2017-06-07 12:38:10 -04:00
|
|
|
|
|
|
|
MetaMonitorSwitchConfigType current_switch_config;
|
2013-07-29 07:00:15 -04:00
|
|
|
};
|
|
|
|
|
2018-10-19 03:15:54 -04:00
|
|
|
/**
|
|
|
|
* MetaMonitorManagerClass:
|
|
|
|
*
|
|
|
|
* @read_edid: Returns the raw Extended Display Identification Data (EDID)
|
|
|
|
* for the given #MetaOutput object. Use meta_output_parse_edid() to parse
|
|
|
|
* afterwards.
|
|
|
|
*
|
|
|
|
* @ensure_initial_config: Called on setup. Makes sure an initial config
|
|
|
|
* is loaded.
|
|
|
|
*
|
|
|
|
* @apply_monitors_config: Tries to apply the given config using the given
|
|
|
|
* method. Throws an error if something went wrong.
|
|
|
|
*
|
|
|
|
* @set_power_save_mode: Sets the #MetaPowerSave mode (for all displays).
|
|
|
|
*
|
|
|
|
* @change_backlight: Changes the backlight intensity to the given value (in
|
|
|
|
* percent).
|
|
|
|
*
|
|
|
|
* @get_crtc_gamma: Queries and returns the gamma rampQueries and returns the
|
|
|
|
* gamma ramp.
|
|
|
|
*
|
|
|
|
* @set_crtc_gamma: Sets custom display LUT (look up table) for each primary
|
|
|
|
* color. Each table is indexed by a value that represents input intensity,
|
|
|
|
* and yields a value that represents output intensity.
|
|
|
|
*
|
|
|
|
* @tiled_monitor_added: Should be called by a #MetaMonitor when it is created.
|
|
|
|
*
|
|
|
|
* @tiled_monitor_removed: Should be called by a #MetaMonitor when it is
|
|
|
|
* destroyed.
|
|
|
|
*
|
|
|
|
* @is_transform_handled: vfunc for
|
|
|
|
* meta_monitor_manager_is_transform_handled().
|
|
|
|
* @calculate_monitor_mode_scale: vfunc for
|
|
|
|
* meta_monitor_manager_calculate_monitor_mode_scale().
|
|
|
|
* @calculate_supported_scales: vfunc for
|
|
|
|
* meta_monitor_manager_calculate_supported_scales().
|
|
|
|
* @get_capabilities: vfunc for meta_monitor_manager_get_capabilities().
|
|
|
|
* @get_max_screen_size: vfunc for meta_monitor_manager_get_max_screen_size().
|
|
|
|
* @get_default_layout_mode: vfunc for meta_monitor_manager_get_default_layout_mode().
|
|
|
|
*
|
|
|
|
* The base class for a #MetaMonitorManager.
|
|
|
|
*/
|
2013-07-29 07:00:15 -04:00
|
|
|
struct _MetaMonitorManagerClass
|
|
|
|
{
|
|
|
|
MetaDBusDisplayConfigSkeletonClass parent_class;
|
|
|
|
|
2013-08-08 07:32:05 -04:00
|
|
|
GBytes* (*read_edid) (MetaMonitorManager *,
|
|
|
|
MetaOutput *);
|
|
|
|
|
2019-01-11 08:45:44 -05:00
|
|
|
void (*read_current_state) (MetaMonitorManager *);
|
|
|
|
|
2017-01-06 00:27:21 -05:00
|
|
|
void (*ensure_initial_config) (MetaMonitorManager *);
|
|
|
|
|
2017-02-14 06:54:04 -05:00
|
|
|
gboolean (*apply_monitors_config) (MetaMonitorManager *,
|
|
|
|
MetaMonitorsConfig *,
|
|
|
|
MetaMonitorsConfigMethod ,
|
|
|
|
GError **);
|
2017-01-09 01:31:18 -05:00
|
|
|
|
2013-07-29 07:00:15 -04:00
|
|
|
void (*set_power_save_mode) (MetaMonitorManager *,
|
|
|
|
MetaPowerSave);
|
|
|
|
|
|
|
|
void (*change_backlight) (MetaMonitorManager *,
|
|
|
|
MetaOutput *,
|
|
|
|
int);
|
|
|
|
|
|
|
|
void (*get_crtc_gamma) (MetaMonitorManager *,
|
2016-12-07 23:15:28 -05:00
|
|
|
MetaCrtc *,
|
2013-07-29 07:00:15 -04:00
|
|
|
gsize *,
|
|
|
|
unsigned short **,
|
|
|
|
unsigned short **,
|
|
|
|
unsigned short **);
|
|
|
|
void (*set_crtc_gamma) (MetaMonitorManager *,
|
2016-12-07 23:15:28 -05:00
|
|
|
MetaCrtc *,
|
2013-07-29 07:00:15 -04:00
|
|
|
gsize ,
|
|
|
|
unsigned short *,
|
|
|
|
unsigned short *,
|
|
|
|
unsigned short *);
|
2015-03-30 21:11:12 -04:00
|
|
|
|
2016-12-13 05:58:22 -05:00
|
|
|
void (*tiled_monitor_added) (MetaMonitorManager *,
|
|
|
|
MetaMonitor *);
|
2015-03-30 21:11:12 -04:00
|
|
|
|
2016-12-13 05:58:22 -05:00
|
|
|
void (*tiled_monitor_removed) (MetaMonitorManager *,
|
|
|
|
MetaMonitor *);
|
2015-03-30 21:11:12 -04:00
|
|
|
|
2017-03-08 03:05:00 -05:00
|
|
|
gboolean (*is_transform_handled) (MetaMonitorManager *,
|
|
|
|
MetaCrtc *,
|
|
|
|
MetaMonitorTransform);
|
2017-01-20 02:07:12 -05:00
|
|
|
|
2017-05-25 04:12:51 -04:00
|
|
|
float (*calculate_monitor_mode_scale) (MetaMonitorManager *,
|
|
|
|
MetaMonitor *,
|
|
|
|
MetaMonitorMode *);
|
2017-01-26 04:14:32 -05:00
|
|
|
|
2017-06-05 03:59:47 -04:00
|
|
|
float * (*calculate_supported_scales) (MetaMonitorManager *,
|
|
|
|
MetaLogicalMonitorLayoutMode ,
|
|
|
|
MetaMonitor *,
|
|
|
|
MetaMonitorMode *,
|
|
|
|
int *);
|
2017-02-07 03:01:40 -05:00
|
|
|
|
|
|
|
MetaMonitorManagerCapability (*get_capabilities) (MetaMonitorManager *);
|
2017-02-15 03:06:46 -05:00
|
|
|
|
|
|
|
gboolean (*get_max_screen_size) (MetaMonitorManager *,
|
|
|
|
int *,
|
|
|
|
int *);
|
2017-02-24 05:10:52 -05:00
|
|
|
|
|
|
|
MetaLogicalMonitorLayoutMode (*get_default_layout_mode) (MetaMonitorManager *);
|
2013-07-29 07:00:15 -04:00
|
|
|
};
|
2013-07-18 07:09:16 -04:00
|
|
|
|
2019-01-11 09:35:42 -05:00
|
|
|
META_EXPORT_TEST
|
2017-07-10 05:39:07 -04:00
|
|
|
MetaBackend * meta_monitor_manager_get_backend (MetaMonitorManager *manager);
|
|
|
|
|
2017-07-05 06:06:06 -04:00
|
|
|
void meta_monitor_manager_setup (MetaMonitorManager *manager);
|
|
|
|
|
2019-01-22 21:25:35 -05:00
|
|
|
META_EXPORT_TEST
|
2017-01-09 01:31:18 -05:00
|
|
|
void meta_monitor_manager_rebuild (MetaMonitorManager *manager,
|
|
|
|
MetaMonitorsConfig *config);
|
2019-01-22 21:25:35 -05:00
|
|
|
|
|
|
|
META_EXPORT_TEST
|
2017-09-11 02:10:26 -04:00
|
|
|
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager,
|
|
|
|
MetaMonitorsConfig *config);
|
2013-09-02 09:04:05 -04:00
|
|
|
|
2019-01-22 21:25:35 -05:00
|
|
|
META_EXPORT_TEST
|
2016-11-28 07:11:24 -05:00
|
|
|
int meta_monitor_manager_get_num_logical_monitors (MetaMonitorManager *manager);
|
|
|
|
|
2019-01-22 21:25:35 -05:00
|
|
|
META_EXPORT_TEST
|
2016-12-02 03:00:03 -05:00
|
|
|
GList * meta_monitor_manager_get_logical_monitors (MetaMonitorManager *manager);
|
2013-07-18 07:09:16 -04:00
|
|
|
|
2016-11-28 22:46:41 -05:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_from_number (MetaMonitorManager *manager,
|
|
|
|
int number);
|
|
|
|
|
2016-11-28 07:43:27 -05:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_primary_logical_monitor (MetaMonitorManager *manager);
|
|
|
|
|
2016-11-29 21:49:00 -05:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_at (MetaMonitorManager *manager,
|
2016-12-01 02:37:32 -05:00
|
|
|
float x,
|
|
|
|
float y);
|
2016-11-29 21:49:00 -05:00
|
|
|
|
2016-11-30 23:52:07 -05:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_from_rect (MetaMonitorManager *manager,
|
|
|
|
MetaRectangle *rect);
|
|
|
|
|
2017-08-26 15:22:34 -04:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_neighbor (MetaMonitorManager *manager,
|
|
|
|
MetaLogicalMonitor *logical_monitor,
|
|
|
|
MetaDisplayDirection direction);
|
2016-12-01 02:15:52 -05:00
|
|
|
|
2016-12-20 23:38:13 -05:00
|
|
|
MetaMonitor * meta_monitor_manager_get_primary_monitor (MetaMonitorManager *manager);
|
|
|
|
|
2016-12-19 01:58:44 -05:00
|
|
|
MetaMonitor * meta_monitor_manager_get_laptop_panel (MetaMonitorManager *manager);
|
|
|
|
|
2016-12-20 23:41:53 -05:00
|
|
|
MetaMonitor * meta_monitor_manager_get_monitor_from_spec (MetaMonitorManager *manager,
|
|
|
|
MetaMonitorSpec *monitor_spec);
|
|
|
|
|
2017-06-21 01:44:06 -04:00
|
|
|
MetaMonitor * meta_monitor_manager_get_monitor_from_connector (MetaMonitorManager *manager,
|
|
|
|
const char *connector);
|
|
|
|
|
2019-01-22 21:25:35 -05:00
|
|
|
META_EXPORT_TEST
|
2016-12-12 21:53:38 -05:00
|
|
|
GList * meta_monitor_manager_get_monitors (MetaMonitorManager *manager);
|
|
|
|
|
2013-07-22 12:57:12 -04:00
|
|
|
void meta_monitor_manager_get_screen_size (MetaMonitorManager *manager,
|
|
|
|
int *width,
|
|
|
|
int *height);
|
2013-07-18 07:09:16 -04:00
|
|
|
|
2019-01-11 08:45:44 -05:00
|
|
|
MetaPowerSave meta_monitor_manager_get_power_save_mode (MetaMonitorManager *manager);
|
|
|
|
|
|
|
|
void meta_monitor_manager_power_save_mode_changed (MetaMonitorManager *manager,
|
|
|
|
MetaPowerSave mode);
|
|
|
|
|
2013-07-29 04:12:24 -04:00
|
|
|
void meta_monitor_manager_confirm_configuration (MetaMonitorManager *manager,
|
|
|
|
gboolean ok);
|
|
|
|
|
2015-01-04 15:24:05 -05:00
|
|
|
void meta_output_parse_edid (MetaOutput *output,
|
|
|
|
GBytes *edid);
|
2016-04-21 11:29:44 -04:00
|
|
|
gboolean meta_output_is_laptop (MetaOutput *output);
|
2015-01-04 15:24:05 -05:00
|
|
|
|
2013-10-31 09:37:44 -04:00
|
|
|
gboolean meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager);
|
2019-01-22 21:25:35 -05:00
|
|
|
|
|
|
|
META_EXPORT_TEST
|
2016-12-19 02:46:31 -05:00
|
|
|
void meta_monitor_manager_read_current_state (MetaMonitorManager *manager);
|
2019-01-22 21:25:35 -05:00
|
|
|
|
|
|
|
META_EXPORT_TEST
|
2014-10-12 18:13:15 -04:00
|
|
|
void meta_monitor_manager_on_hotplug (MetaMonitorManager *manager);
|
2013-09-02 09:04:05 -04:00
|
|
|
|
2014-12-11 12:14:00 -05:00
|
|
|
gboolean meta_monitor_manager_get_monitor_matrix (MetaMonitorManager *manager,
|
2017-10-06 07:41:49 -04:00
|
|
|
MetaMonitor *monitor,
|
2017-03-06 23:20:14 -05:00
|
|
|
MetaLogicalMonitor *logical_monitor,
|
2014-12-11 12:14:00 -05:00
|
|
|
gfloat matrix[6]);
|
|
|
|
|
2016-12-13 05:58:22 -05:00
|
|
|
void meta_monitor_manager_tiled_monitor_added (MetaMonitorManager *manager,
|
|
|
|
MetaMonitor *monitor);
|
|
|
|
void meta_monitor_manager_tiled_monitor_removed (MetaMonitorManager *manager,
|
|
|
|
MetaMonitor *monitor);
|
|
|
|
|
2017-03-08 03:05:00 -05:00
|
|
|
gboolean meta_monitor_manager_is_transform_handled (MetaMonitorManager *manager,
|
|
|
|
MetaCrtc *crtc,
|
|
|
|
MetaMonitorTransform transform);
|
|
|
|
|
2019-01-22 21:25:35 -05:00
|
|
|
META_EXPORT_TEST
|
2017-01-09 01:31:18 -05:00
|
|
|
MetaMonitorsConfig * meta_monitor_manager_ensure_configured (MetaMonitorManager *manager);
|
2017-01-06 00:27:21 -05:00
|
|
|
|
2019-01-22 21:25:35 -05:00
|
|
|
META_EXPORT_TEST
|
2017-01-09 01:31:18 -05:00
|
|
|
void meta_monitor_manager_update_logical_state (MetaMonitorManager *manager,
|
|
|
|
MetaMonitorsConfig *config);
|
2019-01-22 21:25:35 -05:00
|
|
|
|
|
|
|
META_EXPORT_TEST
|
2017-09-11 02:10:26 -04:00
|
|
|
void meta_monitor_manager_update_logical_state_derived (MetaMonitorManager *manager,
|
|
|
|
MetaMonitorsConfig *config);
|
2017-01-06 00:27:21 -05:00
|
|
|
|
2019-01-22 21:25:35 -05:00
|
|
|
META_EXPORT_TEST
|
2017-01-09 21:38:06 -05:00
|
|
|
void meta_monitor_manager_lid_is_closed_changed (MetaMonitorManager *manager);
|
|
|
|
|
2017-01-12 00:47:54 -05:00
|
|
|
gboolean meta_monitor_manager_is_headless (MetaMonitorManager *manager);
|
|
|
|
|
2017-05-25 04:12:51 -04:00
|
|
|
float meta_monitor_manager_calculate_monitor_mode_scale (MetaMonitorManager *manager,
|
2017-01-20 02:07:12 -05:00
|
|
|
MetaMonitor *monitor,
|
|
|
|
MetaMonitorMode *monitor_mode);
|
|
|
|
|
2017-06-05 03:59:47 -04:00
|
|
|
float * meta_monitor_manager_calculate_supported_scales (MetaMonitorManager *,
|
|
|
|
MetaLogicalMonitorLayoutMode ,
|
|
|
|
MetaMonitor *,
|
|
|
|
MetaMonitorMode *,
|
|
|
|
int *);
|
|
|
|
|
2017-05-25 05:20:59 -04:00
|
|
|
gboolean meta_monitor_manager_is_scale_supported (MetaMonitorManager *manager,
|
|
|
|
MetaLogicalMonitorLayoutMode layout_mode,
|
2017-06-05 03:59:47 -04:00
|
|
|
MetaMonitor *monitor,
|
|
|
|
MetaMonitorMode *monitor_mode,
|
2017-05-25 05:20:59 -04:00
|
|
|
float scale);
|
|
|
|
|
2017-04-21 06:01:15 -04:00
|
|
|
MetaMonitorManagerCapability
|
|
|
|
meta_monitor_manager_get_capabilities (MetaMonitorManager *manager);
|
|
|
|
|
2017-02-15 03:06:46 -05:00
|
|
|
gboolean meta_monitor_manager_get_max_screen_size (MetaMonitorManager *manager,
|
|
|
|
int *max_width,
|
|
|
|
int *max_height);
|
|
|
|
|
2017-02-24 05:10:52 -05:00
|
|
|
MetaLogicalMonitorLayoutMode
|
|
|
|
meta_monitor_manager_get_default_layout_mode (MetaMonitorManager *manager);
|
|
|
|
|
2017-09-11 02:10:26 -04:00
|
|
|
MetaMonitorConfigManager *
|
|
|
|
meta_monitor_manager_get_config_manager (MetaMonitorManager *manager);
|
|
|
|
|
2017-05-04 08:25:47 -04:00
|
|
|
void meta_monitor_manager_rotate_monitor (MetaMonitorManager *manager);
|
|
|
|
|
2015-10-27 10:02:43 -04:00
|
|
|
void meta_monitor_manager_clear_output (MetaOutput *output);
|
2016-12-09 02:49:54 -05:00
|
|
|
void meta_monitor_manager_clear_mode (MetaCrtcMode *mode);
|
2016-12-07 23:15:28 -05:00
|
|
|
void meta_monitor_manager_clear_crtc (MetaCrtc *crtc);
|
2015-10-27 10:02:43 -04:00
|
|
|
|
2018-09-24 03:48:37 -04:00
|
|
|
gboolean meta_monitor_has_aspect_as_size (MetaMonitor *monitor);
|
|
|
|
|
2019-06-26 06:29:22 -04:00
|
|
|
char * meta_monitor_manager_get_vendor_name (MetaMonitorManager *manager,
|
|
|
|
const char *vendor);
|
|
|
|
|
2020-02-25 14:30:46 -05:00
|
|
|
static inline MetaOutputAssignment *
|
|
|
|
meta_find_output_assignment (MetaOutputAssignment **outputs,
|
|
|
|
unsigned int n_outputs,
|
|
|
|
MetaOutput *output)
|
2020-02-25 12:37:21 -05:00
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
|
|
|
|
for (i = 0; i < n_outputs; i++)
|
|
|
|
{
|
2020-02-25 14:30:46 -05:00
|
|
|
MetaOutputAssignment *output_assignment = outputs[i];
|
2020-02-25 12:37:21 -05:00
|
|
|
|
2020-02-25 14:30:46 -05:00
|
|
|
if (output == output_assignment->output)
|
|
|
|
return output_assignment;
|
2020-02-25 12:37:21 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2020-06-11 12:18:37 -04:00
|
|
|
void meta_monitor_manager_post_init (MetaMonitorManager *manager);
|
|
|
|
|
2016-12-07 23:17:20 -05:00
|
|
|
#endif /* META_MONITOR_MANAGER_PRIVATE_H */
|