zig-glfw/src
InKryption 23c922f0a4 glfw: window hints rework (#71)
* glfw: make comments into doc comments
* glfw: Publicize Window.CursorPos, Window.Size, Window.Pos, and Window.FrameSize
* glfw: Make enum value name the same format as other enum value names
* glfw: Window hints rework patch
* glfw: Relegate `Window.hint` to testing; move it down to just above the tests to reflect this, add doc comment line
* glfw: handle error `Error.InvalidEnum` explicitly, for clear error message in this unlikely edge case
* glfw: instate `Hint.context_no_error` as a hint, as it actually is specified to be a Window creation hint by the docs, and affirm removal of `Hint.context_revision`, which isn't.
The docs don't seem to specify a default value for `Hints.context_no_error` to take on, so we could set it based on `std.debug.runtime_safety` like this.
* glfw: default `context_no_error` to `false`, and added a note of caution about its usage as suggested.
* glfw: Inline enum values of `ClientApi`, `ContextCreationApi`, `ContextRobustness`, `ContextReleaseBehavior`, and `OpenGlProfile` from consts.zig, and remove the now unused constants (replaced by aformentioned enum values).
* glfw: Reference `Window.Hint` enum instead of `Window.Hints` struct to ensure fields are the same
* glfw: add comment explaining default values of `Window.Hints`
* glfw: change `OpenGlProfile` to `OpenGLProfile` based on established naming convention
* glfw: Update actual declaration of `OpenGLProfile`
* glfw: call `Window.defaultHints` after window creation, not before
* glfw: remove 'consts.zig', and move `dont_care` directly into 'main.zig'; fix anything referencing it.
* glfw: put `Window.defaultHints` into defer statement to handle cleanup in all paths
* glfw: move `Hint.focused` to match position of `Hints.focused`
* glfw: do 'zig fmt glfw/src'
* glfw: Cull `Window.Hint` comments, polish remaining; match order entirely according to current GLFW docs
* glfw: Change `Window.Hints.*Api` to `Window.Hints.*API`

Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-15 18:41:16 -07:00
..
action.zig glfw: ziggify gamepad action enumerations 2021-10-30 20:06:03 -07:00
c.zig glfw: add glfw.getInstanceProcAddress 2021-10-16 18:39:57 -07:00
clipboard.zig glfw: Update tests in all other files to reflect changes made to glfw.init 2021-11-10 11:42:24 -07:00
Cursor.zig glfw: Update tests in all other files to reflect changes made to glfw.init 2021-11-10 11:42:24 -07:00
errors.zig glfw: deduplicate @cImport for type equivalence 2021-07-17 20:14:09 -07:00
gamepad_axis.zig glfw: ziggify gamepad button enumerations 2021-10-30 20:06:03 -07:00
gamepad_button.zig glfw: ziggify gamepad button enumerations 2021-10-30 20:06:03 -07:00
GammaRamp.zig glfw: add GammaRamp type 2021-07-17 21:29:51 -07:00
hat.zig glfw: add Hat.toInt / Hat.fromInt tests, fix bug 2021-10-30 20:06:03 -07:00
Image.zig glfw: add Image type 2021-07-20 21:00:05 -07:00
Joystick.zig glfw: Update tests in all other files to reflect changes made to glfw.init 2021-11-10 11:42:24 -07:00
key.zig glfw: Update tests in all other files to reflect changes made to glfw.init 2021-11-10 11:42:24 -07:00
main.zig glfw: window hints rework (#71) 2021-11-15 18:41:16 -07:00
mod.zig glfw: fix failing Mod bitmask tests, make fromInt/toInt work on non-6-bit integers 2021-10-30 20:06:03 -07:00
Monitor.zig glfw: Update tests in all other files to reflect changes made to glfw.init 2021-11-10 11:42:24 -07:00
mouse_button.zig glfw: make mouse buttons a proper enum 2021-10-30 20:06:03 -07:00
opengl.zig glfw: window hints rework (#71) 2021-11-15 18:41:16 -07:00
time.zig glfw: Update tests in all other files to reflect changes made to glfw.init 2021-11-10 11:42:24 -07:00
version.zig glfw: deduplicate @cImport for type equivalence 2021-07-17 20:14:09 -07:00
VideoMode.zig glfw: fix and test VideoMode getters 2021-07-17 20:56:48 -07:00
vulkan.zig glfw: Update tests in all other files to reflect changes made to glfw.init 2021-11-10 11:42:24 -07:00
Window.zig glfw: window hints rework (#71) 2021-11-15 18:41:16 -07:00