Skip to content
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

Add versioned API #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add versioned API #128

wants to merge 1 commit into from

Conversation

btzy
Copy link
Owner

@btzy btzy commented Feb 4, 2024

This PR adds a new API function for each of the four kinds of dialogs, which take in a versioned struct. The version is set by an inline function in nfd.h, and the library checks the version to determine the number of fields in the struct. Additional fields can then be added to the end of the struct without breaking forward compatibility (binary built with an older version of NFDe works with a newer version of NFDe) or backward compatibility (automatically by ignoring the additional fields).

This will allow new options to be added without breaking forward compatibility, which will make #90, #93, #99, and #126 implementable.

TODO: SetFolder on Windows, take args struct by reference in nfd.h.

Resolves #92.

@btzy btzy force-pushed the versioned-api branch 3 times, most recently from 199cf42 to 409c8b6 Compare February 9, 2024 16:41
@btzy btzy force-pushed the versioned-api branch 6 times, most recently from c32851d to 2b7fc83 Compare March 31, 2024 15:33
@btzy btzy marked this pull request as ready for review March 31, 2024 15:55
@btzy btzy force-pushed the versioned-api branch 2 times, most recently from d0ab030 to 2d30563 Compare May 12, 2024 12:12
@btzy btzy added this to the New API milestone May 12, 2024
@btzy btzy force-pushed the versioned-api branch 2 times, most recently from 4e0db56 to 821d325 Compare May 12, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New API to set each property of the dialog separately
1 participant