Closed alexflint closed 7 years ago
Okay have moved away from functional options. It's nicer now because there is a more natural place for the default sizes and titles. All of these APIs are still very provisional and open to complete redesign so I'm going to merge this soon @ernesto-jimenez .
The README needs updating to remove the use of NewWindow
.
This pr introduces a new API for creating windows that lets you set many more window properties than was previously possible. For example, to create a borderless window:
The callback style for passing options is based on Dave Cheney's presentation here: http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis. I'm not yet sold on the idea and may go back to just passing in an options struct to
OpenWindow()
The full set of options:
(My plan is to leave PRs like this up for 24 hours before merging to gather feedback. If anybody has time to do a full code review I would appreciate it.)