Repository navigation
Extend Win32 common dialog bindings - #7584
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
core:sys/windowsalready contained bindings for the open/save file dialogs.This PR adds the rest of the common dialogs implemented in
comdlg32.dll.See: https://learn.microsoft.com/en-us/windows/win32/dlgbox/using-common-dialog-boxes
It also fixes some incorrect declarations in
OPENFILENAMEW.This comes with new examples: odin-lang/examples#183
Note: The person who originally did the bindings for the file dialog included a convenience wrapper function, but in 2022 Bill removed all
core:stringsdependencies fromcore:sys/windows, and that code has been defunct ever since. I was advised to remove it for the time being. A roughly equivalent functional replacement is provided in the new example (see above).Important: Due to the partially incorrect previous declaration of
OPENFILENAMEW, this can break user code, notably the assignment of the file name buffer. Jeroen and I decided that it is preferable to correct the problem, rather than preserving a bug for backward compatibility.