-
Notifications
You must be signed in to change notification settings - Fork 489
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
Add Win32 Macros #921
Comments
The win32 metadata, where most of the API definitions come from, doesn't include macros. |
Are you going to add non-metadata things or would that end up in a separate crate? I'd open a PR to add some of these things if you know where you want to put them. |
I would think this could live in a separate crate as a set of inline helper functions. |
But should they live in another crate? Those macros are pretty integral to Win32 programming, distasteful as the byte-level manipulations are in Rust. |
It's certainly debatable. You'll have to forgive me for being a little cautious as there are thousands of macros in the Windows SDK. 😉 Deciding which are "integral" is going to be an uphill battle. |
Yeah... At this stage of development I think getting the architecture-specific struct packing in is more important than Separately, how are you evaluating best practices for Win32 programming in Rust? The fast-and-loose nature of DWORD/INT_PTR/WPARAM conversions is hard. My tiny program has a big chunk of |
I forgot about all the |
Yep... the WinRT APIs are mostly idiomatic and directly usable. The Win32 APIs are mostly going to stay faithful to the original definitions and will likely need various specialized hand-written crates wrapping the different APIs to provide a more idiomatic developer experience. |
I'm porting my tiny window manager from winapi-rs and had to create inline functions for the bit manipulation macros. I'm sure I'm missing tons more, but I can't find a single point of reference in the API docs. Many of them seem to be defined in
minwindef.h
andwinbasex.h
The text was updated successfully, but these errors were encountered: