On Mon Aug 17 23:09:57 2026 +0000, Brendan Shanks wrote:
I'm not sure we can change the win32u API. I think the easiest way is to have winemac specific helpers in .c files for any win32u call that needs to be made from the .m sources. We wouldn't need to change the win32u API, ObjC code would be able to call functions with `BOOL` arguments without a problem. i.e. ObjC code would see a prototype of `NtUserGetSystemMenu( HWND hwnd, WINBOOL revert )` and could call that just fine. The only case where `WINBOOL` would show up is when implementing functions that take/return BOOLs and have their pointers passed to win32u, of course there's a lot of these with the user/opengl/vulkan driver funcs. But that's a Wine-internal API that we can change, and since `BOOL`/`bool` cast back and forth without a problem it should just be a matter of changing the types. (You'd also have to use `WINBOOL` if a function takes a `BOOL *`, but I don't see any NtUser functions like this) That's probably better than having to type WINBOOL, but it still feels ugly and quite confusing to me that some `winemac` code uses `BOOL` in various places while that `BOOL` is not be the same as the `BOOL` type in some other `winemac`, or every other module, code. There is code that can't be changed, for instance `DllMain`.
Anyway, it's already the case, and I'm more interested in converting the main thread to a Wine thread, than fixing that aspect of things. I think it can stay as it current is, and intermediate helpers be used between C and ObjC code like we already do. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11333#note_149147