Restore SEBPatch

This commit is contained in:
2025-06-01 11:44:20 +02:00
commit 8c656e3137
1297 changed files with 142172 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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/.
*/
namespace SafeExamBrowser.SystemComponents.Contracts.Keyboard.Events
{
/// <summary>
/// Indicates that the active keyboard layout has changed.
/// </summary>
public delegate void LayoutChangedEventHandler(IKeyboardLayout layout);
}

View File

@@ -0,0 +1,35 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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;
using System.Collections.Generic;
using SafeExamBrowser.SystemComponents.Contracts.Keyboard.Events;
namespace SafeExamBrowser.SystemComponents.Contracts.Keyboard
{
/// <summary>
/// Defines the functionality of the keyboard system component.
/// </summary>
public interface IKeyboard : ISystemComponent
{
/// <summary>
/// Fired when the active keyboard layout changed.
/// </summary>
event LayoutChangedEventHandler LayoutChanged;
/// <summary>
/// Activates the keyboard layout with the given identifier.
/// </summary>
void ActivateLayout(Guid id);
/// <summary>
/// Gets all currently available keyboard layouts.
/// </summary>
IEnumerable<IKeyboardLayout> GetLayouts();
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* 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.SystemComponents.Contracts.Keyboard
{
/// <summary>
/// Defines a keyboard layout which can be loaded by the application.
/// </summary>
public interface IKeyboardLayout
{
/// <summary>
/// The three-letter ISO code of the culture to which this keyboard layout is associated.
/// </summary>
string CultureCode { get; }
/// <summary>
/// The culture name of this keyboard layout.
/// </summary>
string CultureName { get; }
/// <summary>
/// The unique identifier of the keyboard layout.
/// </summary>
Guid Id { get; }
/// <summary>
/// Indicates whether this is the currently active keyboard layout.
/// </summary>
bool IsCurrent { get; }
/// <summary>
/// The name of this keyboard layout.
/// </summary>
string LayoutName { get; }
}
}