mirror of
https://github.com/brl/mutter.git
synced 2025-02-26 01:34:09 +00:00

This object takes care of mapping absolute devices to monitors, to do so it uses 3 heuristics, in this order of preference: - If a device is known to be builtin, it's assigned to the builtin monitor. - If input device and monitor match sizes (with an error margin of 5%) - If input device name and monitor vendor/product in EDID match somehow (from "full", through "partial", to just "vendor") The most favorable outputs are then assigned to each device, making sure not to assign two devices of the same kind to the same output. This object replaces (and is mostly 1:1 with) GsdDeviceMapper in g-s-d. That object would perform these same heuristics, and let mutter indirectly know through settings changes. This object allows doing the same in-process.
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
/*
|
|
* Copyright 2018 Red Hat, Inc.
|
|
*
|
|
* 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.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Author: Carlos Garnacho <carlosg@gnome.org>
|
|
*/
|
|
|
|
#ifndef META_INPUT_MAPPER_H
|
|
#define META_INPUT_MAPPER_H
|
|
|
|
#include <clutter/clutter.h>
|
|
|
|
#define META_TYPE_INPUT_MAPPER (meta_input_mapper_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (MetaInputMapper, meta_input_mapper,
|
|
META, INPUT_MAPPER, GObject)
|
|
|
|
MetaInputMapper * meta_input_mapper_new (void);
|
|
|
|
void meta_input_mapper_add_device (MetaInputMapper *mapper,
|
|
ClutterInputDevice *device,
|
|
gboolean builtin);
|
|
void meta_input_mapper_remove_device (MetaInputMapper *mapper,
|
|
ClutterInputDevice *device);
|
|
|
|
#endif /* META_INPUT_MAPPER_H */
|