No description
Find a file
Jonathan Johnson de899cf546
Removed UnwindSafe bounds
After thinking about this more and more, I've come to realize that
forcing UnwindSafe is not the intention of the bound on catch_unwind.
This should have been evident to me by the fact that thread::spawn does
not require UnwindSafe, yet it catches panics. The key qualifier I wasn't
noticing was that the design of the trait is to prevent *easily*
observing invariant states.

Since this panic catch results in dropping and then subsequently closing
everything that was passed to it, it fits the same general shape as
thread::spawn, so I'm removing the bounds.
2023-12-20 11:10:24 -08:00
src Removed UnwindSafe bounds 2023-12-20 11:10:24 -08:00
.gitignore Committing Cargo.lock 2023-08-31 10:08:37 -07:00
Cargo.lock Releasing v0.1.1 2023-12-18 17:03:13 -08:00
Cargo.toml Releasing v0.1.1 2023-12-18 17:03:13 -08:00
README.md Updating readme 2023-12-18 09:41:52 -08:00

appit

appit is considered alpha and unsupported crate version Documentation for main branch

An opinionated wrapper for winit that provides a trait-based approach to implementing multi-window applications.

This crate's main type is WindowBehavior, a trait that provides functions for nearly every winit::event::WindowEvent. This allows you to implement exactly which events you wish to respond to, and ignore the rest without a large match statement.

This crate also keeps track of the redraw state of the window, and allows scheduling redraws in the future.

use appit::WindowBehavior;

struct MyWindow;

impl WindowBehavior for MyWindow {
    type Context = ();

    fn initialize(_window: &mut appit::RunningWindow, _context: Self::Context) -> Self {
        Self
    }

    fn redraw(&mut self, window: &mut appit::RunningWindow) {
        println!("Should redraw");
    }
}

fn main() {
    MyWindow::run()
}

Project Status

This project is early in development as part of Kludgine and Gooey. It is considered alpha and unsupported at this time, and the primary focus for @ecton is to use this for his own projects. Feature requests and bug fixes will be prioritized based on @ecton's own needs.

If you would like to contribute, bug fixes are always appreciated. Before working on a new feature, please open an issue proposing the feature and problem it aims to solve. Doing so will help prevent friction in merging pull requests, as it ensures changes fit the vision the maintainers have for Gooey.