73 releases (1 stable)

1.0.0 Sep 26, 2023
0.47.1 Nov 3, 2021
0.47.0 Aug 8, 2020
0.46.0 Jul 18, 2020
0.0.1 Dec 12, 2014

#1816 in Game dev

Download history 3041/week @ 2023-12-11 3753/week @ 2023-12-18 2343/week @ 2023-12-25 1668/week @ 2024-01-01 3528/week @ 2024-01-08 3024/week @ 2024-01-15 2921/week @ 2024-01-22 1953/week @ 2024-01-29 2853/week @ 2024-02-05 3342/week @ 2024-02-12 3496/week @ 2024-02-19 3787/week @ 2024-02-26 3969/week @ 2024-03-04 3962/week @ 2024-03-11 4532/week @ 2024-03-18 3772/week @ 2024-03-25

16,560 downloads per month
Used in 116 crates (13 directly)

MIT license

115KB
2.5K SLoC

window Build StatusCrates.io

A library for window abstraction

How to contribute


lib.rs:

Window storage and interfacing traits.

The Window trait is the minimum interface required for event loop. All backends usually support this trait.

The AdvancedWindow trait is the maximum interface that can be provided, while still staying consistent between backends. Not all backends implement AdvancedWindow; check your backend's documentation to see whether it implements this trait.

The WindowSettings structure is the preferred way of building new windows in Piston. It uses the BuildFromWindowSettings trait, which backends implement to handle window creation and setup.

The OpenGLWindow trait is used to provide low-level access to OpenGL through the abstract Piston API.

The Size structure is used throughout Piston to store window sizes. It implements some conversion traits for convenience.

Dependencies

~0.5–1.1MB
~26K SLoC