progrium / darwinkit

Native Mac APIs for Go. Previously known as MacDriver
MIT License
4.99k stars 158 forks source link

darwinkit: run enumexport on macOS 14 #170

Closed progrium closed 3 months ago

progrium commented 1 year ago

To make sure we have all possible values for generated constants and enums, we need to run our export tool on the latest version of macOS. If anybody is running macOS 14 on x86_64, it would help if you could checkout the darwinkit branch and run:

go run ./generate/tools/enumexport.go

Then submit a PR of the resulting changes to ./generate/modules/enums against darwinkit.

programmingkidx commented 1 year ago

Is doing this in a virtual environment or emulator ok?

programmingkidx commented 1 year ago

I wanted to use some NSBezelStyle constants but I could not find them in DarwinKit. Is it because of this issue?

Does this have to be done on x86_64? I could help if you are ok with running the command on ARM64.

progrium commented 1 year ago

I wanted to use some NSBezelStyle constants but I could not find them in DarwinKit. Is it because of this issue?

Does this have to be done on x86_64? I could help if you are ok with running the command on ARM64.

Do you mean NSTextFieldBezelStyle? Give me a reference link to what you mean if not.

programmingkidx commented 1 year ago

It was not NSTextFieldBezelStyle. It was actually NSBezelStyleCircular or NSBezelStylePush. I was trying to use SetBezelStyle() on a NSButton.

Here is a link to the styles I was looking at: https://developer.apple.com/documentation/appkit/nsbezelstyle?language=objc

I used the grep command to find some of the style values but wasn't successful. I'm guessing this current issue is the problem.

progrium commented 1 year ago

Are you staying up to date with the darwinkit branch?

https://github.com/progrium/macdriver/blob/darwinkit/macos/appkit/enumtypes.gen.go#L685

programmingkidx commented 1 year ago

That worked. Thank you.

I noticed that you dropped NS from everything. I thought you were into following the standard. Why the change?

progrium commented 1 year ago