/*
* Copyright (c) 2017 ETH Zürich, Educational Development and Technology (LET)
*
* 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/.
*/
using System;
namespace SafeExamBrowser.Contracts.Monitoring
{
public delegate void WindowChangedEventHandler(IntPtr window);
public interface IWindowMonitor
{
///
/// Event fired when the window monitor observes that the foreground window has changed.
///
event WindowChangedEventHandler WindowChanged;
///
/// Forcefully closes the specified window.
///
void Close(IntPtr window);
///
/// Hides the specified window. Returns true if the window was successfully hidden, otherwise false.
///
bool Hide(IntPtr window);
///
/// Hides all currently opened windows.
///
void HideAllWindows();
///
/// Restores all windows which were hidden during the startup procedure.
///
void RestoreHiddenWindows();
///
/// Starts monitoring application windows by subscribing to specific system events.
/// If a window is shown which is not supposed to do so, it will be automatically hidden.
///
void StartMonitoringWindows();
///
/// Stops monitoring windows and deregisters from any subscribed system events.
///
void StopMonitoringWindows();
}
}