2017-08-11 08:28:17 +02:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2017-08-11 08:28:17 +02:00
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-09-05 09:00:41 +02:00
|
|
|
|
using SafeExamBrowser.Monitoring.Contracts.Display.Events;
|
2021-05-30 20:04:44 +02:00
|
|
|
|
using SafeExamBrowser.Settings.Monitoring;
|
2018-07-06 15:57:38 +02:00
|
|
|
|
|
2019-09-05 09:00:41 +02:00
|
|
|
|
namespace SafeExamBrowser.Monitoring.Contracts.Display
|
2017-08-11 08:28:17 +02:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
2021-05-30 20:04:44 +02:00
|
|
|
|
/// Monitors the displays of the computer for changes and provides access to display-related functionality.
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// </summary>
|
2017-08-11 08:28:17 +02:00
|
|
|
|
public interface IDisplayMonitor
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event fired when the primary display or its settings have changed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
event DisplayChangedEventHandler DisplayChanged;
|
2024-01-11 12:02:01 +01:00
|
|
|
|
|
2017-08-11 08:28:17 +02:00
|
|
|
|
/// <summary>
|
2017-08-11 11:16:44 +02:00
|
|
|
|
/// Sets the desktop working area to accommodate to the taskbar's height and removes the configured wallpaper (if possible).
|
2017-08-11 08:28:17 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
void InitializePrimaryDisplay(int taskbarHeight);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Resets the desktop working area and wallpaper to their previous (initial) state.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void ResetPrimaryDisplay();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Starts monitoring for display changes, i.e. display changes will trigger the <c>DisplaySettingsChanged</c> event.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void StartMonitoringDisplayChanges();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stops monitoring for display changes.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void StopMonitoringDisplayChanges();
|
2021-06-29 17:34:05 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Validates the currently active display configuration according to the given settings.
|
|
|
|
|
/// </summary>
|
|
|
|
|
ValidationResult ValidateConfiguration(DisplaySettings settings);
|
2017-08-11 08:28:17 +02:00
|
|
|
|
}
|
|
|
|
|
}
|