-
Couldn't load subscription status.
- Fork 31
Add missing Window bindings #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds missing GLFW bindings for window management functions, expanding the Zig wrapper's coverage of GLFW's window API. The bindings include window state management (iconify, restore, maximize, hide), opacity control, aspect ratio setting, frame size querying, and attention requests.
- Adds 10 new GLFW function bindings for window management operations
- Provides both direct function bindings and object-oriented method aliases on the Window struct
- Implements a helper method
getFrameSize()that returns window frame dimensions as an array
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| var left: c_int = 0.0; | ||
| var top: c_int = 0.0; | ||
| var right: c_int = 0.0; | ||
| var bottom: c_int = 0.0; |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integer variables are being initialized with floating-point literal 0.0. Use 0 instead of 0.0 for c_int variables.
| var width: c_int = 0.0; | ||
| var height: c_int = 0.0; |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integer variables are being initialized with floating-point literal 0.0. Use 0 instead of 0.0 for c_int variables.
Adds missing bindings for the glfw functions:
glfwSetWindowAspectRatioglfwGetWindowFrameSizeglfwGetWindowOpacityglfwSetWindowOpacityglfwIconifyWindowglfwRestoreWindowglfwMaximizeWindowglfwHideWIndowglfwRequestWindowAttentionglfwPostEmptyEventAll functions except for
postEmptyEventhave been aliased as methods to theWindowstruct to support the "objecty" API.