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

Split platform specific "C"-bindings into the separate files #242

Closed
bruvzg opened this issue Apr 24, 2023 · 1 comment · Fixed by #243
Closed

Split platform specific "C"-bindings into the separate files #242

bruvzg opened this issue Apr 24, 2023 · 1 comment · Fixed by #243

Comments

@bruvzg
Copy link
Contributor

bruvzg commented Apr 24, 2023

Currently, accesskit.h includes some Obj-C headers when it is used on macOS, therefore it is usable only from the Obj-C/Obj-C++ source, but not from pure C/C++.

Splitting platform specific adapter bindings to the separate file would allow using platform independent part of the code from C/C++.

Or alternatively, since no Obj-C specific stuff is really used in the binding, it might be worth getting rid of the Obj-C includes, by replacing NSObject * with void * (already done with NSView * for subclassing adapter) and CGPoint with two floats.

@DataTriny
Copy link
Member

Thanks @bruvzg for the report.

I thought this could work.

We will go the second path then, as there is not an easy way to generate multiple header files with cbindgen.

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 a pull request may close this issue.

2 participants