2013-07-18 11:09:16 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file screen-private.h Handling of monitor configuration
|
|
|
|
*
|
|
|
|
* Managing multiple monitors
|
|
|
|
* This file contains structures and functions that handle
|
|
|
|
* multiple monitors, including reading the current configuration
|
|
|
|
* and available hardware, and applying it.
|
|
|
|
*
|
|
|
|
* This interface is private to mutter, API users should look
|
|
|
|
* at MetaScreen instead.
|
|
|
|
*/
|
|
|
|
|
2014-05-02 13:34:02 +00:00
|
|
|
/*
|
2013-07-18 11:09:16 +00: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 13:34:02 +00:00
|
|
|
*
|
2013-07-18 11:09:16 +00: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 13:34:02 +00:00
|
|
|
*
|
2013-07-18 11:09:16 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2014-01-12 01:42:06 +00:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2013-07-18 11:09:16 +00:00
|
|
|
*/
|
|
|
|
|
2016-12-08 04:17:20 +00:00
|
|
|
#ifndef META_MONITOR_MANAGER_PRIVATE_H
|
|
|
|
#define META_MONITOR_MANAGER_PRIVATE_H
|
2013-07-18 11:09:16 +00:00
|
|
|
|
2013-07-19 12:39:28 +00:00
|
|
|
#include <cogl/cogl.h>
|
2013-08-16 15:32:50 +00:00
|
|
|
#include <libgnome-desktop/gnome-pnp-ids.h>
|
2013-07-19 12:39:28 +00:00
|
|
|
|
2013-07-18 11:09:16 +00:00
|
|
|
#include "display-private.h"
|
|
|
|
#include <meta/screen.h>
|
|
|
|
#include "stack-tracker.h"
|
2015-01-30 13:51:18 +00:00
|
|
|
#include <meta/meta-monitor-manager.h>
|
2013-07-24 08:01:57 +00:00
|
|
|
|
2014-04-01 03:34:23 +00:00
|
|
|
#include "meta-display-config-shared.h"
|
2014-04-01 03:33:01 +00:00
|
|
|
#include "meta-dbus-display-config.h"
|
2014-04-22 19:39:09 +00:00
|
|
|
#include "meta-cursor.h"
|
2013-07-29 11:00:15 +00:00
|
|
|
|
2016-12-21 03:17:27 +00:00
|
|
|
typedef struct _MetaMonitorConfig MetaMonitorConfig;
|
2013-07-29 11:00:15 +00:00
|
|
|
|
2016-12-13 02:53:38 +00:00
|
|
|
typedef struct _MetaMonitor MetaMonitor;
|
|
|
|
typedef struct _MetaMonitorNormal MetaMonitorNormal;
|
|
|
|
typedef struct _MetaMonitorTiled MetaMonitorTiled;
|
2016-12-21 04:41:53 +00:00
|
|
|
typedef struct _MetaMonitorSpec MetaMonitorSpec;
|
2016-11-25 06:31:38 +00:00
|
|
|
typedef struct _MetaLogicalMonitor MetaLogicalMonitor;
|
|
|
|
|
2016-12-08 04:15:28 +00:00
|
|
|
typedef struct _MetaCrtc MetaCrtc;
|
2015-01-30 13:51:18 +00:00
|
|
|
typedef struct _MetaOutput MetaOutput;
|
2016-12-09 07:49:54 +00:00
|
|
|
typedef struct _MetaCrtcMode MetaCrtcMode;
|
2016-12-08 04:15:28 +00:00
|
|
|
typedef struct _MetaCrtcInfo MetaCrtcInfo;
|
2013-07-24 16:01:31 +00:00
|
|
|
typedef struct _MetaOutputInfo MetaOutputInfo;
|
2015-03-31 00:41:51 +00:00
|
|
|
typedef struct _MetaTileInfo MetaTileInfo;
|
2013-07-18 11:09:16 +00:00
|
|
|
|
2016-12-21 03:17:27 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2014-07-10 21:39:47 +00:00
|
|
|
META_MONITOR_TRANSFORM_NORMAL,
|
|
|
|
META_MONITOR_TRANSFORM_90,
|
|
|
|
META_MONITOR_TRANSFORM_180,
|
|
|
|
META_MONITOR_TRANSFORM_270,
|
|
|
|
META_MONITOR_TRANSFORM_FLIPPED,
|
|
|
|
META_MONITOR_TRANSFORM_FLIPPED_90,
|
|
|
|
META_MONITOR_TRANSFORM_FLIPPED_180,
|
|
|
|
META_MONITOR_TRANSFORM_FLIPPED_270,
|
|
|
|
} MetaMonitorTransform;
|
|
|
|
|
2014-12-30 00:18:24 +00:00
|
|
|
/* This matches the values in drm_mode.h */
|
2016-12-21 03:17:27 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
2014-12-30 00:18:24 +00:00
|
|
|
META_CONNECTOR_TYPE_Unknown = 0,
|
|
|
|
META_CONNECTOR_TYPE_VGA = 1,
|
|
|
|
META_CONNECTOR_TYPE_DVII = 2,
|
|
|
|
META_CONNECTOR_TYPE_DVID = 3,
|
|
|
|
META_CONNECTOR_TYPE_DVIA = 4,
|
|
|
|
META_CONNECTOR_TYPE_Composite = 5,
|
|
|
|
META_CONNECTOR_TYPE_SVIDEO = 6,
|
|
|
|
META_CONNECTOR_TYPE_LVDS = 7,
|
|
|
|
META_CONNECTOR_TYPE_Component = 8,
|
|
|
|
META_CONNECTOR_TYPE_9PinDIN = 9,
|
|
|
|
META_CONNECTOR_TYPE_DisplayPort = 10,
|
|
|
|
META_CONNECTOR_TYPE_HDMIA = 11,
|
|
|
|
META_CONNECTOR_TYPE_HDMIB = 12,
|
|
|
|
META_CONNECTOR_TYPE_TV = 13,
|
|
|
|
META_CONNECTOR_TYPE_eDP = 14,
|
|
|
|
META_CONNECTOR_TYPE_VIRTUAL = 15,
|
|
|
|
META_CONNECTOR_TYPE_DSI = 16,
|
|
|
|
} MetaConnectorType;
|
|
|
|
|
2016-12-21 03:17:27 +00:00
|
|
|
struct _MetaTileInfo
|
|
|
|
{
|
2015-03-31 00:41:51 +00:00
|
|
|
guint32 group_id;
|
|
|
|
guint32 flags;
|
|
|
|
guint32 max_h_tiles;
|
|
|
|
guint32 max_v_tiles;
|
|
|
|
guint32 loc_h_tile;
|
|
|
|
guint32 loc_v_tile;
|
|
|
|
guint32 tile_w;
|
|
|
|
guint32 tile_h;
|
|
|
|
};
|
|
|
|
|
2013-07-18 11:09:16 +00:00
|
|
|
struct _MetaOutput
|
|
|
|
{
|
2013-07-19 12:39:28 +00:00
|
|
|
/* The CRTC driving this output, NULL if the output is not enabled */
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtc *crtc;
|
2013-07-19 12:39:28 +00:00
|
|
|
/* The low-level ID of this output, used to apply back configuration */
|
2014-07-01 17:23:05 +00:00
|
|
|
glong winsys_id;
|
2013-07-18 11:09:16 +00:00
|
|
|
char *name;
|
2013-07-19 12:39:28 +00:00
|
|
|
char *vendor;
|
|
|
|
char *product;
|
|
|
|
char *serial;
|
2013-07-18 11:09:16 +00:00
|
|
|
int width_mm;
|
|
|
|
int height_mm;
|
|
|
|
CoglSubpixelOrder subpixel_order;
|
2014-04-26 08:27:34 +00:00
|
|
|
int scale;
|
2013-07-19 12:39:28 +00:00
|
|
|
|
2014-12-30 00:18:24 +00:00
|
|
|
MetaConnectorType connector_type;
|
|
|
|
|
2016-12-09 07:49:54 +00:00
|
|
|
MetaCrtcMode *preferred_mode;
|
|
|
|
MetaCrtcMode **modes;
|
2013-07-19 12:39:28 +00:00
|
|
|
unsigned int n_modes;
|
|
|
|
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtc **possible_crtcs;
|
2013-07-19 12:39:28 +00:00
|
|
|
unsigned int n_possible_crtcs;
|
|
|
|
|
2013-07-19 16:47:01 +00:00
|
|
|
MetaOutput **possible_clones;
|
|
|
|
unsigned int n_possible_clones;
|
|
|
|
|
2013-07-25 13:06:09 +00:00
|
|
|
int backlight;
|
|
|
|
int backlight_min;
|
|
|
|
int backlight_max;
|
|
|
|
|
2013-07-23 08:07:52 +00:00
|
|
|
/* Used when changing configuration */
|
|
|
|
gboolean is_dirty;
|
|
|
|
|
2013-07-19 12:39:28 +00:00
|
|
|
/* The low-level bits used to build the high-level info
|
2016-11-25 06:31:38 +00:00
|
|
|
in MetaLogicalMonitor
|
2013-07-19 12:39:28 +00:00
|
|
|
|
|
|
|
XXX: flags maybe?
|
|
|
|
There is a lot of code that uses MonitorInfo->is_primary,
|
|
|
|
but nobody uses MetaOutput yet
|
|
|
|
*/
|
|
|
|
gboolean is_primary;
|
|
|
|
gboolean is_presentation;
|
2014-04-16 08:20:55 +00:00
|
|
|
gboolean is_underscanning;
|
2015-07-02 00:42:46 +00:00
|
|
|
gboolean supports_underscanning;
|
2013-07-30 09:36:18 +00:00
|
|
|
|
|
|
|
gpointer driver_private;
|
|
|
|
GDestroyNotify driver_notify;
|
2013-10-31 13:37:44 +00:00
|
|
|
|
|
|
|
/* get a new preferred mode on hotplug events, to handle dynamic guest resizing */
|
|
|
|
gboolean hotplug_mode_update;
|
2014-11-10 21:36:47 +00:00
|
|
|
gint suggested_x;
|
|
|
|
gint suggested_y;
|
2015-03-31 00:41:51 +00:00
|
|
|
|
|
|
|
MetaTileInfo tile_info;
|
2013-07-18 11:09:16 +00:00
|
|
|
};
|
|
|
|
|
2016-12-08 04:15:28 +00:00
|
|
|
struct _MetaCrtc
|
2013-07-19 12:39:28 +00:00
|
|
|
{
|
|
|
|
glong crtc_id;
|
|
|
|
MetaRectangle rect;
|
2016-12-09 07:49:54 +00:00
|
|
|
MetaCrtcMode *current_mode;
|
2014-07-10 21:39:47 +00:00
|
|
|
MetaMonitorTransform transform;
|
2013-07-24 08:01:57 +00:00
|
|
|
unsigned int all_transforms;
|
2013-07-19 12:39:28 +00:00
|
|
|
|
|
|
|
/* Only used to build the logical configuration
|
|
|
|
from the HW one
|
|
|
|
*/
|
2016-11-25 06:31:38 +00:00
|
|
|
MetaLogicalMonitor *logical_monitor;
|
2013-07-22 11:31:10 +00:00
|
|
|
|
|
|
|
/* Used when changing configuration */
|
|
|
|
gboolean is_dirty;
|
2013-09-05 14:45:41 +00:00
|
|
|
|
2015-07-17 15:16:39 +00:00
|
|
|
/* Used by cursor renderer backend */
|
|
|
|
void *cursor_renderer_private;
|
2015-04-28 00:42:10 +00:00
|
|
|
|
|
|
|
gpointer driver_private;
|
|
|
|
GDestroyNotify driver_notify;
|
2013-07-19 12:39:28 +00:00
|
|
|
};
|
|
|
|
|
2016-12-09 07:49:54 +00:00
|
|
|
struct _MetaCrtcMode
|
2013-07-19 12:39:28 +00:00
|
|
|
{
|
|
|
|
/* The low-level ID of this mode, used to apply back configuration */
|
|
|
|
glong mode_id;
|
2013-07-30 09:36:18 +00:00
|
|
|
char *name;
|
2013-07-19 12:39:28 +00:00
|
|
|
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
float refresh_rate;
|
2015-04-21 15:49:55 +00:00
|
|
|
guint32 flags;
|
2013-07-30 09:36:18 +00:00
|
|
|
|
|
|
|
gpointer driver_private;
|
|
|
|
GDestroyNotify driver_notify;
|
2013-07-19 12:39:28 +00:00
|
|
|
};
|
|
|
|
|
2013-07-24 16:01:31 +00:00
|
|
|
/*
|
2016-12-08 04:15:28 +00:00
|
|
|
* MetaCrtcInfo:
|
2013-07-24 16:01:31 +00:00
|
|
|
* This represents the writable part of a CRTC, as deserialized from DBus
|
|
|
|
* or built by MetaMonitorConfig
|
|
|
|
*
|
2016-12-08 04:15:28 +00:00
|
|
|
* Note: differently from the other structures in this file, MetaCrtcInfo
|
2013-07-24 16:01:31 +00:00
|
|
|
* is handled by pointer. This is to accomodate the usage in MetaMonitorConfig
|
|
|
|
*/
|
2016-12-21 03:17:27 +00:00
|
|
|
struct _MetaCrtcInfo
|
|
|
|
{
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtc *crtc;
|
2016-12-09 07:49:54 +00:00
|
|
|
MetaCrtcMode *mode;
|
2013-07-24 16:01:31 +00:00
|
|
|
int x;
|
|
|
|
int y;
|
2014-07-10 21:39:47 +00:00
|
|
|
MetaMonitorTransform transform;
|
2013-07-24 16:01:31 +00:00
|
|
|
GPtrArray *outputs;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* MetaOutputInfo:
|
2016-12-08 04:15:28 +00:00
|
|
|
* this is the same as MetaCrtcInfo, but for outputs
|
2013-07-24 16:01:31 +00:00
|
|
|
*/
|
2016-12-21 03:17:27 +00:00
|
|
|
struct _MetaOutputInfo
|
|
|
|
{
|
2013-07-24 16:01:31 +00:00
|
|
|
MetaOutput *output;
|
|
|
|
gboolean is_primary;
|
|
|
|
gboolean is_presentation;
|
2014-04-16 08:20:55 +00:00
|
|
|
gboolean is_underscanning;
|
2013-07-24 16:01:31 +00:00
|
|
|
};
|
|
|
|
|
2013-07-18 11:09:16 +00: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 10:33:19 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorManager, g_object_unref)
|
|
|
|
|
2013-07-29 11:00:15 +00:00
|
|
|
struct _MetaMonitorManager
|
|
|
|
{
|
|
|
|
MetaDBusDisplayConfigSkeleton parent_instance;
|
|
|
|
|
|
|
|
/* XXX: this structure is very badly
|
|
|
|
packed, but I like the logical organization
|
|
|
|
of fields */
|
|
|
|
|
|
|
|
gboolean in_init;
|
|
|
|
unsigned int serial;
|
|
|
|
|
|
|
|
MetaPowerSave power_save_mode;
|
|
|
|
|
|
|
|
int max_screen_width;
|
|
|
|
int max_screen_height;
|
|
|
|
int screen_width;
|
|
|
|
int screen_height;
|
|
|
|
|
|
|
|
/* Outputs refer to physical screens,
|
|
|
|
CRTCs refer to stuff that can drive outputs
|
|
|
|
(like encoders, but less tied to the HW),
|
2016-11-25 06:31:38 +00:00
|
|
|
while logical_monitors refer to logical ones.
|
2013-07-29 11:00:15 +00:00
|
|
|
*/
|
|
|
|
MetaOutput *outputs;
|
|
|
|
unsigned int n_outputs;
|
|
|
|
|
2016-12-09 07:49:54 +00:00
|
|
|
MetaCrtcMode *modes;
|
2013-07-29 11:00:15 +00:00
|
|
|
unsigned int n_modes;
|
|
|
|
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtc *crtcs;
|
2013-07-29 11:00:15 +00:00
|
|
|
unsigned int n_crtcs;
|
|
|
|
|
2016-12-13 02:53:38 +00:00
|
|
|
GList *monitors;
|
|
|
|
|
2016-12-02 08:00:03 +00:00
|
|
|
GList *logical_monitors;
|
2016-11-28 12:43:27 +00:00
|
|
|
MetaLogicalMonitor *primary_logical_monitor;
|
2013-07-29 11:00:15 +00:00
|
|
|
|
|
|
|
int dbus_name_id;
|
|
|
|
|
|
|
|
int persistent_timeout_id;
|
2016-12-19 07:22:07 +00:00
|
|
|
MetaMonitorConfig *legacy_config;
|
2013-08-16 15:32:50 +00:00
|
|
|
|
|
|
|
GnomePnpIds *pnp_ids;
|
2013-07-29 11:00:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _MetaMonitorManagerClass
|
|
|
|
{
|
|
|
|
MetaDBusDisplayConfigSkeletonClass parent_class;
|
|
|
|
|
|
|
|
void (*read_current) (MetaMonitorManager *);
|
2013-08-08 11:32:05 +00:00
|
|
|
|
|
|
|
char* (*get_edid_file) (MetaMonitorManager *,
|
|
|
|
MetaOutput *);
|
|
|
|
GBytes* (*read_edid) (MetaMonitorManager *,
|
|
|
|
MetaOutput *);
|
|
|
|
|
2013-07-29 11:00:15 +00:00
|
|
|
void (*apply_configuration) (MetaMonitorManager *,
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtcInfo **,
|
2013-07-29 11:00:15 +00:00
|
|
|
unsigned int ,
|
|
|
|
MetaOutputInfo **,
|
|
|
|
unsigned int);
|
|
|
|
|
|
|
|
void (*set_power_save_mode) (MetaMonitorManager *,
|
|
|
|
MetaPowerSave);
|
|
|
|
|
|
|
|
void (*change_backlight) (MetaMonitorManager *,
|
|
|
|
MetaOutput *,
|
|
|
|
int);
|
|
|
|
|
|
|
|
void (*get_crtc_gamma) (MetaMonitorManager *,
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtc *,
|
2013-07-29 11:00:15 +00:00
|
|
|
gsize *,
|
|
|
|
unsigned short **,
|
|
|
|
unsigned short **,
|
|
|
|
unsigned short **);
|
|
|
|
void (*set_crtc_gamma) (MetaMonitorManager *,
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtc *,
|
2013-07-29 11:00:15 +00:00
|
|
|
gsize ,
|
|
|
|
unsigned short *,
|
|
|
|
unsigned short *,
|
|
|
|
unsigned short *);
|
2015-03-31 01:11:12 +00:00
|
|
|
|
2016-12-13 10:58:22 +00:00
|
|
|
void (*tiled_monitor_added) (MetaMonitorManager *,
|
|
|
|
MetaMonitor *);
|
2015-03-31 01:11:12 +00:00
|
|
|
|
2016-12-13 10:58:22 +00:00
|
|
|
void (*tiled_monitor_removed) (MetaMonitorManager *,
|
|
|
|
MetaMonitor *);
|
2015-03-31 01:11:12 +00:00
|
|
|
|
2013-07-29 11:00:15 +00:00
|
|
|
};
|
2013-07-18 11:09:16 +00:00
|
|
|
|
2013-09-02 13:04:05 +00:00
|
|
|
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager);
|
|
|
|
|
2016-11-28 12:11:24 +00:00
|
|
|
int meta_monitor_manager_get_num_logical_monitors (MetaMonitorManager *manager);
|
|
|
|
|
2016-12-02 08:00:03 +00:00
|
|
|
GList * meta_monitor_manager_get_logical_monitors (MetaMonitorManager *manager);
|
2013-07-18 11:09:16 +00:00
|
|
|
|
2016-11-29 03:46:41 +00:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_from_number (MetaMonitorManager *manager,
|
|
|
|
int number);
|
|
|
|
|
2016-11-28 12:43:27 +00:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_primary_logical_monitor (MetaMonitorManager *manager);
|
|
|
|
|
2016-11-30 02:49:00 +00:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_at (MetaMonitorManager *manager,
|
2016-12-01 07:37:32 +00:00
|
|
|
float x,
|
|
|
|
float y);
|
2016-11-30 02:49:00 +00:00
|
|
|
|
2016-12-01 04:52:07 +00:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_from_rect (MetaMonitorManager *manager,
|
|
|
|
MetaRectangle *rect);
|
|
|
|
|
2016-12-01 07:15:52 +00:00
|
|
|
MetaLogicalMonitor *meta_monitor_manager_get_logical_monitor_neighbor (MetaMonitorManager *manager,
|
|
|
|
MetaLogicalMonitor *logical_monitor,
|
|
|
|
MetaScreenDirection direction);
|
|
|
|
|
2016-12-21 04:38:13 +00:00
|
|
|
MetaMonitor * meta_monitor_manager_get_primary_monitor (MetaMonitorManager *manager);
|
|
|
|
|
2016-12-19 06:58:44 +00:00
|
|
|
MetaMonitor * meta_monitor_manager_get_laptop_panel (MetaMonitorManager *manager);
|
|
|
|
|
2016-12-21 04:41:53 +00:00
|
|
|
MetaMonitor * meta_monitor_manager_get_monitor_from_spec (MetaMonitorManager *manager,
|
|
|
|
MetaMonitorSpec *monitor_spec);
|
|
|
|
|
2016-12-13 02:53:38 +00:00
|
|
|
GList * meta_monitor_manager_get_monitors (MetaMonitorManager *manager);
|
|
|
|
|
2013-07-18 11:09:16 +00:00
|
|
|
MetaOutput *meta_monitor_manager_get_outputs (MetaMonitorManager *manager,
|
2013-07-24 13:35:47 +00:00
|
|
|
unsigned int *n_outputs);
|
2013-07-18 11:09:16 +00:00
|
|
|
|
2013-07-24 16:01:31 +00:00
|
|
|
void meta_monitor_manager_get_resources (MetaMonitorManager *manager,
|
2016-12-09 07:49:54 +00:00
|
|
|
MetaCrtcMode **modes,
|
2013-07-24 16:01:31 +00:00
|
|
|
unsigned int *n_modes,
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtc **crtcs,
|
2013-07-24 16:01:31 +00:00
|
|
|
unsigned int *n_crtcs,
|
|
|
|
MetaOutput **outputs,
|
|
|
|
unsigned int *n_outputs);
|
|
|
|
|
2013-07-22 16:57:12 +00:00
|
|
|
void meta_monitor_manager_get_screen_size (MetaMonitorManager *manager,
|
|
|
|
int *width,
|
|
|
|
int *height);
|
2013-07-18 11:09:16 +00:00
|
|
|
|
2013-07-25 08:57:59 +00:00
|
|
|
void meta_monitor_manager_get_screen_limits (MetaMonitorManager *manager,
|
|
|
|
int *width,
|
|
|
|
int *height);
|
|
|
|
|
2013-07-24 16:01:31 +00:00
|
|
|
void meta_monitor_manager_apply_configuration (MetaMonitorManager *manager,
|
2016-12-08 04:15:28 +00:00
|
|
|
MetaCrtcInfo **crtcs,
|
2013-07-24 16:01:31 +00:00
|
|
|
unsigned int n_crtcs,
|
|
|
|
MetaOutputInfo **outputs,
|
|
|
|
unsigned int n_outputs);
|
2013-07-24 13:35:47 +00:00
|
|
|
|
2013-07-29 08:12:24 +00:00
|
|
|
void meta_monitor_manager_confirm_configuration (MetaMonitorManager *manager,
|
|
|
|
gboolean ok);
|
|
|
|
|
2015-01-04 20:24:05 +00:00
|
|
|
void meta_output_parse_edid (MetaOutput *output,
|
|
|
|
GBytes *edid);
|
2016-04-21 15:29:44 +00:00
|
|
|
gboolean meta_output_is_laptop (MetaOutput *output);
|
2015-01-04 20:24:05 +00:00
|
|
|
|
2016-12-08 04:15:28 +00:00
|
|
|
void meta_crtc_info_free (MetaCrtcInfo *info);
|
2013-07-24 16:01:31 +00:00
|
|
|
void meta_output_info_free (MetaOutputInfo *info);
|
|
|
|
|
2013-10-31 13:37:44 +00:00
|
|
|
gboolean meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager);
|
2016-12-19 07:46:31 +00:00
|
|
|
void meta_monitor_manager_read_current_state (MetaMonitorManager *manager);
|
2014-10-12 22:13:15 +00:00
|
|
|
void meta_monitor_manager_on_hotplug (MetaMonitorManager *manager);
|
2013-09-02 13:04:05 +00:00
|
|
|
|
2014-12-11 17:14:00 +00:00
|
|
|
gboolean meta_monitor_manager_get_monitor_matrix (MetaMonitorManager *manager,
|
|
|
|
MetaOutput *output,
|
|
|
|
gfloat matrix[6]);
|
|
|
|
|
2016-12-13 10:58:22 +00:00
|
|
|
void meta_monitor_manager_tiled_monitor_added (MetaMonitorManager *manager,
|
|
|
|
MetaMonitor *monitor);
|
|
|
|
void meta_monitor_manager_tiled_monitor_removed (MetaMonitorManager *manager,
|
|
|
|
MetaMonitor *monitor);
|
|
|
|
|
2015-10-27 14:02:43 +00:00
|
|
|
void meta_monitor_manager_clear_output (MetaOutput *output);
|
2016-12-09 07:49:54 +00:00
|
|
|
void meta_monitor_manager_clear_mode (MetaCrtcMode *mode);
|
2016-12-08 04:15:28 +00:00
|
|
|
void meta_monitor_manager_clear_crtc (MetaCrtc *crtc);
|
2015-10-27 14:02:43 +00:00
|
|
|
|
2013-07-24 08:01:57 +00:00
|
|
|
/* Returns true if transform causes width and height to be inverted
|
|
|
|
This is true for the odd transforms in the enum */
|
|
|
|
static inline gboolean
|
2014-07-10 21:39:47 +00:00
|
|
|
meta_monitor_transform_is_rotated (MetaMonitorTransform transform)
|
2013-07-24 08:01:57 +00:00
|
|
|
{
|
|
|
|
return (transform % 2);
|
|
|
|
}
|
|
|
|
|
2016-12-08 04:17:20 +00:00
|
|
|
#endif /* META_MONITOR_MANAGER_PRIVATE_H */
|