-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNativeSurfaceWrapper.cs
More file actions
113 lines (88 loc) · 3.07 KB
/
NativeSurfaceWrapper.cs
File metadata and controls
113 lines (88 loc) · 3.07 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
using System;
using System.ComponentModel;
using OpenTK.Windowing.Common;
using OpenTK.Windowing.Desktop;
namespace engenious
{
/// <summary>
/// A wrapper for a native surface.
/// </summary>
public class NativeSurfaceWrapper : IRenderingSurface
{
/// <summary>
/// Initializes an new instance of the <see cref="NativeSurfaceWrapper"/> class.
/// </summary>
/// <param name="windowInfo">The native window info to wrap.</param>
/// <param name="contextFlags">Thre graphics context flags</param>
/// <exception cref="NotImplementedException">This class is currently not implemented.</exception>
public NativeSurfaceWrapper(IWindowWrapper windowInfo, ContextFlags contextFlags)
{
//TODO implement
WindowInfo = windowInfo;
Context = windowInfo.Context;
Focused = false;
throw new NotImplementedException();
}
/// <inheritdoc />
public IWindowWrapper WindowInfo { get; }
/// <summary>
/// Gets the graphics context for this surface wrapper.
/// </summary>
public IGraphicsContext Context { get; }
/// <inheritdoc />
public void Dispose()
{
throw new NotImplementedException();
}
/// <inheritdoc />
public Point PointToScreen(Point pt)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public Point PointToClient(Point pt)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public Vector2 Vector2ToScreen(Vector2 pt)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public Vector2 Vector2ToClient(Vector2 pt)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public Rectangle ClientRectangle { get; set; }
/// <inheritdoc />
public Size ClientSize { get; set; }
/// <inheritdoc />
public bool Focused { get; }
/// <inheritdoc />
public bool CursorVisible { get; set; }
/// <inheritdoc />
public bool CursorGrabbed { get; set; }
/// <inheritdoc />
public bool Visible { get; set; }
/// <inheritdoc />
public IntPtr Handle => throw new NotSupportedException();
/// <inheritdoc />
public event Action<FrameEventArgs>? RenderFrame;
/// <inheritdoc />
public event Action<FrameEventArgs>? UpdateFrame;
/// <inheritdoc />
public event Action<CancelEventArgs>? Closing;
/// <inheritdoc />
public event Action<FocusedChangedEventArgs>? FocusedChanged;
/// <inheritdoc />
public event Action<TextInputEventArgs>? KeyPress;
/// <inheritdoc />
public event Action<ResizeEventArgs>? Resize;
/// <inheritdoc />
public event Action? Load;
/// <inheritdoc />
public event Action<MouseWheelEventArgs>? MouseWheel;
}
}