-
-
Notifications
You must be signed in to change notification settings - Fork 688
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
Missing Win32 Cursor Constants in Windows Bindings #4808
Comments
For what it's worth, these use the same numbers as the |
It's true that the These APIs are a bit of a mess. They'll use a numeric constant typed as a ptr, and pass it as a core/sys/windows/types.odin:_IDC_ARROW := rawptr(uintptr(32512))
core/sys/windows/types.odin:_IDC_IBEAM := rawptr(uintptr(32513))
core/sys/windows/types.odin:_IDC_WAIT := rawptr(uintptr(32514))
core/sys/windows/types.odin:_IDC_CROSS := rawptr(uintptr(32515))
core/sys/windows/types.odin:_IDC_UPARROW := rawptr(uintptr(32516))
core/sys/windows/types.odin:IDC_ARROW := cstring(_IDC_ARROW)
core/sys/windows/types.odin:IDC_IBEAM := cstring(_IDC_IBEAM)
core/sys/windows/types.odin:IDC_WAIT := cstring(_IDC_WAIT)
core/sys/windows/types.odin:IDC_CROSS := cstring(_IDC_CROSS)
core/sys/windows/types.odin:IDC_HAND := cstring(_IDC_HAND)
core/sys/windows/types.odin:IDC_UPARROW := cstring(_IDC_UPARROW)
core/sys/windows/types.odin:_IDI_APPLICATION := rawptr(uintptr(32512))
core/sys/windows/types.odin:_IDI_HAND := rawptr(uintptr(32513))
core/sys/windows/types.odin:_IDI_QUESTION := rawptr(uintptr(32514))
core/sys/windows/types.odin:_IDI_EXCLAMATION := rawptr(uintptr(32515))
core/sys/windows/types.odin:_IDI_ASTERISK := rawptr(uintptr(32516))
core/sys/windows/types.odin:IDI_APPLICATION := cstring(_IDI_APPLICATION)
core/sys/windows/types.odin:IDI_HAND := cstring(_IDI_HAND)
core/sys/windows/types.odin:IDI_QUESTION := cstring(_IDI_QUESTION)
core/sys/windows/types.odin:IDI_EXCLAMATION := cstring(_IDI_EXCLAMATION)
core/sys/windows/types.odin:IDI_ASTERISK := cstring(_IDI_ASTERISK) |
@Kelimion The OP of this issue was complaining about missing
The fact that the numbers coincide is just a consequence of how those APIs treat their arguments if they're below 65536. I like using the |
Yes, that's exactly my point with respect to the We may even want to get rid of |
I'm not opposed to |
Oh I see. I thought you were suggesting that there's a connection between Regarding |
No, just exploring whether if we're going to add purely numeric constants from which to derive
You'd still have |
Hmm, ultimately I don't think I have a strong enough opinion about that. If someone's programming win32, I think they're used to wonky arguments and questionable constants. Just a little worried about potential naming conflicts. |
As Microsoft namespaces all of their enum constants, I don't imagine that to be an issue. Another option would be to use |
Context
Odin: dev-2025-01-nightly:2aae4cf
OS: Windows 11 Professional (version: 24H2), build 26100.3037
CPU: 11th Gen Intel(R) Core(TM) i7-11700KF @ 3.60GHz
RAM: 32605 MiB
Backend: LLVM 18.1.8
Expected Behavior
The Windows bindings should include all relevant cursor constants from winuser.h, such as:
Retrived from SetSystemCursor.
Current Behavior
The cursor constants listed above are missing from the Win32 bindings.
The text was updated successfully, but these errors were encountered: