From: Brendan Shanks bshanks@codeweavers.com
--- dlls/winemac.drv/macdrv.h | 49 +++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 17 deletions(-)
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 570b1eac5c7..6111577c02c 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -29,6 +29,10 @@
#include "macdrv_cocoa.h"
+#ifdef __OBJC__ +# define BOOL WINBOOL +#endif + /* All Windows headers needed by Unix C/ObjC files must be included here. */ #include "ntstatus.h" #define WIN32_NO_STATUS @@ -51,6 +55,18 @@ #include "wine/vulkan.h" #include "wine/vulkan_driver.h"
+#ifdef __OBJC__ +# undef BOOL +# undef interface /* objbase defines 'interface' to 'struct' */ +#else + typedef BOOL WINBOOL; +#endif + +/* This file is included by C and ObjC, and BOOL could mean either Win32 BOOL or ObjC BOOL. + * Use the C 'bool' type instead, or use 'WINBOOL' if you need a Win32 BOOL. + */ +#define BOOL DoNotUseBOOLInThisFile +
extern bool allow_vsync; extern bool allow_set_gamma; @@ -97,8 +113,6 @@ static inline RECT rect_from_cgrect(CGRect cgrect)
extern CGRect macdrv_get_desktop_rect(void); extern void macdrv_reset_device_metrics(void); -extern BOOL macdrv_GetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp); -extern BOOL macdrv_SetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp);
/************************************************************************** @@ -135,14 +149,14 @@ static inline RECT rect_from_cgrect(CGRect cgrect) }
-extern BOOL macdrv_ActivateKeyboardLayout(HKL hkl, UINT flags); +extern WINBOOL macdrv_ActivateKeyboardLayout(HKL hkl, UINT flags); extern void macdrv_Beep(void); extern LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid); extern LRESULT macdrv_ClipboardWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); extern UINT macdrv_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, void *param); -extern BOOL macdrv_GetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp); -extern BOOL macdrv_SetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp); -extern BOOL macdrv_ClipCursor(const RECT *clip, BOOL reset); +extern WINBOOL macdrv_GetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp); +extern WINBOOL macdrv_SetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp); +extern WINBOOL macdrv_ClipCursor(const RECT *clip, WINBOOL reset); extern LRESULT macdrv_NotifyIcon(HWND hwnd, UINT msg, NOTIFYICONDATAW *data); extern void macdrv_CleanupIcons(HWND hwnd); extern LRESULT macdrv_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); @@ -152,24 +166,24 @@ static inline RECT rect_from_cgrect(CGRect cgrect) extern void macdrv_SetLayeredWindowAttributes(HWND hwnd, COLORREF key, BYTE alpha, DWORD flags); extern void macdrv_SetParent(HWND hwnd, HWND parent, HWND old_parent); -extern void macdrv_SetWindowRgn(HWND hwnd, HRGN hrgn, BOOL redraw); +extern void macdrv_SetWindowRgn(HWND hwnd, HRGN hrgn, WINBOOL redraw); extern void macdrv_SetWindowStyle(HWND hwnd, INT offset, STYLESTRUCT *style); extern void macdrv_SetWindowText(HWND hwnd, LPCWSTR text); extern UINT macdrv_ShowWindow(HWND hwnd, INT cmd, RECT *rect, UINT swp); extern LRESULT macdrv_SysCommand(HWND hwnd, WPARAM wparam, LPARAM lparam, const POINT *pos); extern void macdrv_UpdateLayeredWindow(HWND hwnd, BYTE alpha, UINT flags); extern LRESULT macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); -extern BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, BOOL shaped, const struct window_rects *rects); -extern BOOL macdrv_GetWindowStyleMasks(HWND hwnd, UINT style, UINT ex_style, UINT *style_mask, UINT *ex_style_mask); -extern BOOL macdrv_CreateWindowSurface(HWND hwnd, BOOL layered, const RECT *surface_rect, struct window_surface **surface); +extern WINBOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, WINBOOL shaped, const struct window_rects *rects); +extern WINBOOL macdrv_GetWindowStyleMasks(HWND hwnd, UINT style, UINT ex_style, UINT *style_mask, UINT *ex_style_mask); +extern WINBOOL macdrv_CreateWindowSurface(HWND hwnd, WINBOOL layered, const RECT *surface_rect, struct window_surface **surface); extern void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, HWND owner_hint, UINT swp_flags, const struct window_rects *new_rects, struct window_surface *surface); extern void macdrv_DestroyCursorIcon(HCURSOR cursor); -extern BOOL macdrv_GetCursorPos(LPPOINT pos); +extern WINBOOL macdrv_GetCursorPos(LPPOINT pos); extern void macdrv_SetCapture(HWND hwnd, UINT flags); extern void macdrv_SetCursor(HWND hwnd, HCURSOR cursor); -extern BOOL macdrv_SetCursorPos(INT x, INT y); -extern BOOL macdrv_RegisterHotKey(HWND hwnd, UINT mod_flags, UINT vkey); +extern WINBOOL macdrv_SetCursorPos(INT x, INT y); +extern WINBOOL macdrv_RegisterHotKey(HWND hwnd, UINT mod_flags, UINT vkey); extern void macdrv_UnregisterHotKey(HWND hwnd, UINT modifiers, UINT vkey); extern SHORT macdrv_VkKeyScanEx(WCHAR wChar, HKL hkl); extern UINT macdrv_ImeProcessKey(HIMC himc, UINT wparam, UINT lparam, const BYTE *state); @@ -179,10 +193,10 @@ extern INT macdrv_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyStat extern UINT macdrv_GetKeyboardLayoutList(INT size, HKL *list); extern INT macdrv_GetKeyNameText(LONG lparam, LPWSTR buffer, INT size); extern void macdrv_NotifyIMEStatus(HWND hwnd, UINT status); -extern BOOL macdrv_SetIMECompositionRect(HWND hwnd, RECT rect); -extern BOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_param, - UINT flags); -extern BOOL macdrv_ProcessEvents(DWORD mask); +extern WINBOOL macdrv_SetIMECompositionRect(HWND hwnd, RECT rect); +extern WINBOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_param, + UINT flags); +extern WINBOOL macdrv_ProcessEvents(DWORD mask); extern void macdrv_ThreadDetach(void);
@@ -358,4 +372,5 @@ static inline UINT asciiz_to_unicode(WCHAR *dst, const char *src) return (p - dst) * sizeof(WCHAR); }
+#undef BOOL #endif /* __WINE_MACDRV_H */