libs-gui icon indicating copy to clipboard operation
libs-gui copied to clipboard

Minor renamings of some APIs

Open ethanc8 opened this issue 1 year ago • 6 comments

This commit implements Apple's renaming of some APIs, such as another enum NSProgressIndicatorStyle that Apple had renamed in order to allow it to be parsed by the Swift compiler, the new typedef typedef NSString *NSPasteboardType;, and the -[NSViewController view{Will|Did}{Appear|Disappear}] variants which take no arguments.

ethanc8 avatar Jun 23 '24 19:06 ethanc8

It would be best to, instead of renaming them, do a similar version ifdef for the version of macOS this change was made in. We always want to be as backwards compatible as possible. It is okay in an enum for multiple names to be assigned the same value.

I did not rename any APIs -- I just added the new APIs, and the enums have been defined. I might need to add some guards around the new enum names, though.

ethanc8 avatar Jun 28 '24 12:06 ethanc8

It would be best to, instead of renaming them, do a similar version ifdef for the version of macOS this change was made in. We always want to be as backwards compatible as possible. It is okay in an enum for multiple names to be assigned the same value.

I did not rename any APIs -- I just added the new APIs, and the enums have been defined. I might need to add some guards around the new enum names, though.

I apologize, I wasn't clear, this is what I meant. It's so that if someone is using a particular version of the API they don't have access to the enums under the new names.

gcasa avatar Jun 28 '24 23:06 gcasa

Could you please add the #ifdef that Gregory requested so we can merge this.

fredkiefer avatar Jun 29 '24 05:06 fredkiefer

Could you please add the #ifdef that Gregory requested so we can merge this.

I will do that tomorrow.

ethanc8 avatar Jun 29 '24 05:06 ethanc8

I have rebased it on master and will try updating the patches soon.

ethanc8 avatar Feb 01 '25 21:02 ethanc8

@fredkiefer @gcasa I believe this is ready to merge into master. The CI errors are due to unrelated issues with the workflow YAML definitions.

ethanc8 avatar Feb 01 '25 21:02 ethanc8