summaryrefslogtreecommitdiff
path: root/src/lib.rs
Commit message (Collapse)AuthorAge
* Add a SetIcon request typeBen Bridle2024-10-29
| | | | | | | This is used to set the window icon at runtime. This commit also exposes the Icon and CursorIcon types in the crate root, as they were previously inaccessible.
* Complete rewrite of PhosphorBen Bridle2024-10-19
| | | | | | | | | | | | | | | The previous version of the library passed events to an implementation of a WindowController trait by calling the trait method associated with each event, and received requests by calling different trait methods and reading the returned values. This had the downside of requiring that any data received from one event had to be stored in the type so that it could be passed back to Phosphor when a request method was called. The new library structure uses a single handle_event method on a trait, which is passed data representing any single event when it is called. Data is returned via a passed mutable reference to an EventQueue, meaning that any number of responses for any event can be immediately returned to Phosphor without having to wait in storage.
* Use geometry types forwarded by bufferBen Bridle2023-12-24
| | | | | | Previously, this crate was defining its own set of aliases for types from the geometry crate, which were clashing with the aliases already defined by the buffer crate. The buffer aliases are now used instead.
* Implement window scalingBen Bridle2023-11-05
| | | | | | A window now can declare a scale factor to be used when rendering logical pixels to a physical window. Each logical pixel will be drawn as an NxN block of physical pixels, where N is the scale factor.
* Rewrite phosphorBen Bridle2023-10-11
| | | | | | | | | | | | This has been a long-awaited task, the code has been accumulating small changes for a while now. This commit consolidates all these changes in order to make the code more readable and maintainable for the future. Notable changes: - Remove the concept of a ProgramController - Remove all of the dead OpenGL stub code - Update winit to version 28.1, from 27.4 - Use softbuffer for writing pixels to the native display server
* First commit, before upgrading winit to version 28.1Ben Bridle2023-10-10