-
-
Notifications
You must be signed in to change notification settings - Fork 426
/
Copy pathIInputPlatform.cs
36 lines (33 loc) · 1.36 KB
/
IInputPlatform.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// This file is part of Silk.NET.
//
// You may modify and distribute Silk.NET under the terms
// of the MIT license. See the LICENSE file for details.
using Silk.NET.Windowing.Common;
namespace Silk.NET.Input.Common
{
/// <summary>
/// An interface representing an input platform.
/// </summary>
public interface IInputPlatform
{
/// <summary>
/// If this platform is applicable to this window.
/// </summary>
/// <param name="window">The window to check.</param>
/// <returns>Whether or not this platform is applicable.</returns>
/// <remarks>
/// Generally, each Input package will also have a matching Windowing package,
/// and the Input package will reference the Windowing package. IsApplicable works
/// by checking that the given window is an instance created by the Windowing
/// package the Input package references. For example, GlfwInputPlatform will only
/// be applicable for a GlfwWindow.
/// </remarks>
bool IsApplicable(IWindow window);
/// <summary>
/// Get an input context for this window.
/// </summary>
/// <param name="window">The window to get a context for.</param>
/// <returns>The context.</returns>
IInputContext GetInput(IWindow window);
}
}