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

Enums and bitmasks #76

Open
PMeira opened this issue Apr 13, 2022 · 2 comments
Open

Enums and bitmasks #76

PMeira opened this issue Apr 13, 2022 · 2 comments

Comments

@PMeira
Copy link
Member

PMeira commented Apr 13, 2022

A few enumerations are used in bitmasks or mixed enum+mask. Currently, CEnum doesn't allow this.

An interim fix was added for Monitors.Mode in #75 (just allow integers without restricting to the enum values), but a more elegant solution would be better. I also noticed a few projects vendor CEnum and modify it, for example https://github.com/JuliaGPU/VulkanCore.jl/pull/17/files

Looking for alternative packages, so far I found https://github.com/jmert/BitFlags.jl
Should we adopt it here?

@kdheepak
Copy link
Member

Yeah, I think generally we can do a lot to make a more Julian interface here.

@kdheepak
Copy link
Member

I will look into those packages. I seem to remember solving this for work differently. When I’m back at my work computer I’ll try to find that solution and paste it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants