OpenWindow is a project that aims to offer a simple C# API that calls into the running native windowing backend without any layer in between. It targets .NET Standard 1.3 and 2.0.
- Intuitive API
- Only C#, no C/C++ or any other language for interop
- Support for keyboard, mouse and touch input
- No dependencies other than the native libs that come installed with the windowing backend
- Multiple backends
- Win32 (Windows)
- X11 using XCB (Linux)
- Wayland (Linux)
- Cocoa (macOS)
- Rendering. No graphical backend will be implemented whatsoever. OpenWindow does allow passing parameters to window creation for OpenGL support (e.g. surface format, depth buffer) and there's a helper library called OpenWindow.GL to get started with OpenGL in a cross-platform way.
- Mobile platform support. This might change in the future, but currently the API is targeted for desktop, so a large chunk wouldn't be usable on mobile platforms.
The project is very much a work in progress. The Win32 backend is pretty far along, but the others cannot be used yet. The API is not final, but I don't expect major changes.
The Win32 backend has most of what you'd expect from a library like this. Check out the HelloOpenWindow sample or the Window API to see what's supported.
To do:
- Touch
- Drag and drop
- Clipboard
- Cursor appearance
The X backend requires a generator to generate the client-side library from xml files that define the protocol. I'm working on parsing the files and generating the bindings.
Wayland bindings are generated and the implementation is in a usable state. Needs a lot more testing though.
Not started. I don't have a Mac device to test with. Any help would be most welcome :) If you have a Mac and want to help implement the macOS backend, please open an issue for discussion.
Install .NET Core 2.0+ and dotnet CLI, and run dotnet build
on any of the projects.
OpenWindow is licensed under the MIT license. See the LICENSE.txt file.