Commit Graph

5 Commits

Author SHA1 Message Date
Osspial
4377680a44 Re-organize into module structure 2018-11-08 22:43:04 -05:00
Osspial
02f922f003 Implement new ControlFlow and associated events 2018-11-08 20:59:46 -05:00
Osspial
9feada206f Update run_forever to hijack thread 2018-11-08 20:18:47 -05:00
Osspial
529c08555f Rename EventsLoop and associated types to EventLoop 2018-11-08 19:13:07 -05:00
Francesca Frangipane
eadd9a19b2 Replace Closed event with CloseRequested and Destroyed (#476)
* Replace Closed event with CloseRequested and Destroyed

Implements #434

The existing Closed event had ambiguous meaning, both in name and in
cross-platform behavior. Closed is now split into two more precise events:

* CloseRequested - the window has been requested to close, most commonly by
having clicked the window's close button. Whether or not you respond by
closing the window is up to you.

* Destroyed - the window has been destroyed, and can no longer be safely
used.

Most notably, now you can reliably implement classic patterns like
prompting the user to save their work before closing, and have the
opportunity to perform any necessary cleanup.

Migrating to the new API is straightforward. In most cases, you can simply
replace all existing usages of Closed with CloseRequested. For more
information, see the example programs, particularly handling_close and
multiwindow.

iOS applications must replace all usages of Closed with Destroyed, and
require no other changes.
2018-04-24 16:20:40 -04:00