Using
using NativeWindow.Windowing;
using NativeWindow.Windowing.Events;
There are no secrets, it is simple and easy to use, with well-defined event systems.
internal class Program(WindowSettings gws) : Window(gws)
{
protected override void OnUpdateFrame(FrameEventArgs eventArgs)
{
base.OnUpdateFrame(eventArgs);
}
protected override void OnResize(ResizeEventArgs eventArgs)
{
base.OnResize(eventArgs);
}
protected override void OnKeyboardKeyDown(KeyboardKeyEventArgs eventArgs)
{
base.OnKeyboardKeyDown(eventArgs);
}
// protected override void On...
static void Main(string[] args)
{
using var window = new Program(new WindowSettings()
{
Border = WindowBorder.Resizable,
Position = Point.Empty,
Size = new Size(800, 600),
State = WindowState.Normal,
CursorMode = CursorMode.Normal,
Title = "Test",
UpdateFrequency = null,
Icon = WindowResourcePtr.LoadIcon("Content\\win.ico"),
});
window.Run();
}
}