From: Brendan Shanks <bshanks@codeweavers.com> --- dlls/winemac.drv/clipboard.c | 8 ++++---- dlls/winemac.drv/cocoa_clipboard.m | 8 ++++---- dlls/winemac.drv/macdrv.h | 22 +++++++++++----------- dlls/winemac.drv/macdrv_cocoa.h | 2 +- dlls/winemac.drv/macdrv_main.c | 12 ++++++------ dlls/winemac.drv/window.c | 26 +++++++++++++------------- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c index 061e10ff3b3..d7039ec76cf 100644 --- a/dlls/winemac.drv/clipboard.c +++ b/dlls/winemac.drv/clipboard.c @@ -1464,21 +1464,21 @@ void macdrv_UpdateClipboard(void) /************************************************************************** * query_pasteboard_data */ -BOOL query_pasteboard_data(HWND hwnd, CFStringRef type) +bool query_pasteboard_data(HWND hwnd, CFStringRef type) { struct get_clipboard_params params = { .data_only = TRUE, .size = 1024 }; WINE_CLIPFORMAT *format; - BOOL ret = FALSE; + bool ret = false; TRACE("win %p/%p type %s\n", hwnd, clipboard_cocoa_window, debugstr_cf(type)); format = format_for_type(type); - if (!format) return FALSE; + if (!format) return false; if (!NtUserOpenClipboard(clipboard_hwnd, 0)) { ERR("failed to open clipboard for %s\n", debugstr_cf(type)); - return FALSE; + return false; } for (;;) diff --git a/dlls/winemac.drv/cocoa_clipboard.m b/dlls/winemac.drv/cocoa_clipboard.m index 8fc14c5329a..e0a83778b44 100644 --- a/dlls/winemac.drv/cocoa_clipboard.m +++ b/dlls/winemac.drv/cocoa_clipboard.m @@ -216,11 +216,11 @@ void macdrv_clear_pasteboard(macdrv_window w) * that type already on the pasteboard. If data is NULL, promises the * type. * - * Returns 0 on error, non-zero on success. + * Returns false on error, true on success. */ -int macdrv_set_pasteboard_data(CFStringRef type, CFDataRef data, macdrv_window w) +bool macdrv_set_pasteboard_data(CFStringRef type, CFDataRef data, macdrv_window w) { - __block int ret = 0; + __block bool ret = false; WineWindow* window = (WineWindow*)w; OnMainThread(^{ @@ -235,7 +235,7 @@ int macdrv_set_pasteboard_data(CFStringRef type, CFDataRef data, macdrv_window w if (data) ret = [pb setData:(NSData*)data forType:(NSString*)type]; else - ret = 1; + ret = true; } } @catch (id e) diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index aeeadae122e..1572531e21e 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -38,9 +38,9 @@ #include "unixlib.h" -extern BOOL allow_vsync; -extern BOOL allow_set_gamma; -extern BOOL allow_software_rendering; +extern bool allow_vsync; +extern bool allow_set_gamma; +extern bool allow_software_rendering; extern UINT64 app_icon_callback; extern UINT64 app_quit_request_callback; @@ -202,12 +202,12 @@ extern BOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_p }; extern struct macdrv_client_surface *impl_from_client_surface(struct client_surface *client); -extern BOOL macdrv_client_surface_acquire_metal_swapchain(struct macdrv_client_surface *surface); +extern bool macdrv_client_surface_acquire_metal_swapchain(struct macdrv_client_surface *surface); extern struct macdrv_win_data *get_win_data(HWND hwnd); extern void release_win_data(struct macdrv_win_data *data); extern void init_win_context(void); -extern macdrv_window macdrv_get_cocoa_window(HWND hwnd, BOOL require_on_screen); +extern macdrv_window macdrv_get_cocoa_window(HWND hwnd, bool require_on_screen); extern RGNDATA *get_region_data(HRGN hrgn, HDC hdc_lptodp); extern void activate_on_following_focus(void); @@ -230,9 +230,9 @@ extern BOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_p extern void macdrv_window_drag_begin(HWND hwnd, const macdrv_event *event); extern void macdrv_window_drag_end(HWND hwnd); extern void macdrv_reassert_window_position(HWND hwnd); -extern BOOL query_resize_size(HWND hwnd, macdrv_query *query); -extern BOOL query_resize_start(HWND hwnd); -extern BOOL query_min_max_info(HWND hwnd); +extern bool query_resize_size(HWND hwnd, macdrv_query *query); +extern bool query_resize_start(HWND hwnd); +extern bool query_min_max_info(HWND hwnd); extern void macdrv_mouse_button(HWND hwnd, const macdrv_event *event); extern void macdrv_mouse_moved(HWND hwnd, const macdrv_event *event); @@ -248,7 +248,7 @@ extern BOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_p extern void macdrv_displays_changed(const macdrv_event *event); extern void macdrv_UpdateClipboard(void); -extern BOOL query_pasteboard_data(HWND hwnd, CFStringRef type); +extern bool query_pasteboard_data(HWND hwnd, CFStringRef type); extern void macdrv_lost_pasteboard_ownership(HWND hwnd); extern UINT macdrv_OpenGLInit(UINT version, const struct opengl_funcs *opengl_funcs, const struct opengl_driver_funcs **driver_funcs); @@ -307,7 +307,7 @@ static inline HWND get_focus(void) return NtUserGetGUIThreadInfo(GetCurrentThreadId(), &info) ? info.hwndFocus : 0; } -static inline BOOL intersect_rect( RECT *dst, const RECT *src1, const RECT *src2 ) +static inline bool intersect_rect( RECT *dst, const RECT *src1, const RECT *src2 ) { dst->left = max(src1->left, src2->left); dst->top = max(src1->top, src2->top); @@ -325,7 +325,7 @@ extern HKEY reg_create_ascii_key(HKEY root, const char *name, DWORD options, DWORD *disposition); extern HKEY reg_create_key(HKEY root, const WCHAR *name, ULONG name_len, DWORD options, DWORD *disposition); -extern BOOL reg_delete_tree(HKEY parent, const WCHAR *name, ULONG name_len); +extern bool reg_delete_tree(HKEY parent, const WCHAR *name, ULONG name_len); extern HKEY reg_open_key(HKEY root, const WCHAR *name, ULONG name_len); /* string helpers */ diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h index 9a91edbe8e3..49097d6d3c7 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -560,7 +560,7 @@ extern void macdrv_get_input_source_info(CFDataRef* uchr,CGEventSourceKeyboardTy extern bool macdrv_is_pasteboard_owner(macdrv_window w); extern bool macdrv_has_pasteboard_changed(void); extern void macdrv_clear_pasteboard(macdrv_window w); -extern int macdrv_set_pasteboard_data(CFStringRef type, CFDataRef data, macdrv_window w); +extern bool macdrv_set_pasteboard_data(CFStringRef type, CFDataRef data, macdrv_window w); /* opengl */ diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 96168242cc2..b8e3eafebb6 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -43,13 +43,13 @@ C_ASSERT(NUM_EVENT_TYPES <= sizeof(macdrv_event_mask) * 8); int topmost_float_inactive = TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN; bool capture_displays_for_fullscreen = false; -BOOL allow_vsync = TRUE; -BOOL allow_set_gamma = TRUE; +bool allow_vsync = true; +bool allow_set_gamma = true; bool left_option_is_alt = false; bool right_option_is_alt = false; bool left_command_is_ctrl = false; bool right_command_is_ctrl = false; -BOOL allow_software_rendering = FALSE; +bool allow_software_rendering = false; bool allow_immovable_windows = true; bool use_confinement_cursor_clipping = true; bool cursor_clipping_locks_windows = true; @@ -206,15 +206,15 @@ HKEY reg_create_ascii_key(HKEY root, const char *name, DWORD options, DWORD *dis } -BOOL reg_delete_tree(HKEY parent, const WCHAR *name, ULONG name_len) +bool reg_delete_tree(HKEY parent, const WCHAR *name, ULONG name_len) { char buffer[4096]; KEY_NODE_INFORMATION *key_info = (KEY_NODE_INFORMATION *)buffer; DWORD size; HKEY key; - BOOL ret = TRUE; + bool ret = true; - if (!(key = reg_open_key(parent, name, name_len))) return FALSE; + if (!(key = reg_open_key(parent, name, name_len))) return false; while (ret && !NtEnumerateKey(key, 0, KeyNodeInformation, key_info, sizeof(buffer), &size)) ret = reg_delete_tree(key, key_info->Name, key_info->NameLength); diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index c23142de722..b76e100da55 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -220,7 +220,7 @@ void release_win_data(struct macdrv_win_data *data) * * Return the Mac window associated with the full area of a window */ -macdrv_window macdrv_get_cocoa_window(HWND hwnd, BOOL require_on_screen) +macdrv_window macdrv_get_cocoa_window(HWND hwnd, bool require_on_screen) { struct macdrv_win_data *data = get_win_data(hwnd); macdrv_window ret = NULL; @@ -1162,12 +1162,12 @@ struct client_surface *macdrv_CreateClientSurface(HWND hwnd, int pixel_format) return &surface->client; } -BOOL macdrv_client_surface_acquire_metal_swapchain(struct macdrv_client_surface *surface) +bool macdrv_client_surface_acquire_metal_swapchain(struct macdrv_client_surface *surface) { HWND hwnd = surface->client.hwnd; struct macdrv_win_data *data; - if (surface->metal_swapchain) return TRUE; + if (surface->metal_swapchain) return true; if ((data = get_win_data(hwnd))) { @@ -1181,10 +1181,10 @@ BOOL macdrv_client_surface_acquire_metal_swapchain(struct macdrv_client_surface if (NtUserGetAncestor(hwnd, GA_ROOT) != hwnd) { FIXME("Cross-process child window Metal swapchains are not implemented\n"); - return FALSE; + return false; } - if (!NtUserGetClientRect(hwnd, &rect, NtUserGetWinMonitorDpi(hwnd, MDT_RAW_DPI))) return FALSE; + if (!NtUserGetClientRect(hwnd, &rect, NtUserGetWinMonitorDpi(hwnd, MDT_RAW_DPI))) return false; surface->metal_swapchain = macdrv_create_offscreen_swapchain(hwnd, cgrect_from_rect(rect)); } @@ -2135,14 +2135,14 @@ void macdrv_app_quit_requested(const macdrv_event *event) * * Handler for QUERY_RESIZE_SIZE query. */ -BOOL query_resize_size(HWND hwnd, macdrv_query *query) +bool query_resize_size(HWND hwnd, macdrv_query *query) { struct macdrv_win_data *data = get_win_data(hwnd); RECT rect; int corner; - BOOL ret = FALSE; + bool ret = false; - if (!data) return FALSE; + if (!data) return false; rect = rect_from_cgrect(query->resize_size.rect); rect = window_rect_from_visible(&data->rects, rect); @@ -2163,7 +2163,7 @@ BOOL query_resize_size(HWND hwnd, macdrv_query *query) { rect = visible_rect_from_window(&data->rects, rect); query->resize_size.rect = cgrect_from_rect(rect); - ret = TRUE; + ret = true; } release_win_data(data); @@ -2176,7 +2176,7 @@ BOOL query_resize_size(HWND hwnd, macdrv_query *query) * * Handler for QUERY_RESIZE_START query. */ -BOOL query_resize_start(HWND hwnd) +bool query_resize_start(HWND hwnd) { TRACE("hwnd %p\n", hwnd); @@ -2185,7 +2185,7 @@ BOOL query_resize_start(HWND hwnd) sync_window_min_max_info(hwnd); send_message(hwnd, WM_ENTERSIZEMOVE, 0, 0); - return TRUE; + return true; } @@ -2194,11 +2194,11 @@ BOOL query_resize_start(HWND hwnd) * * Handler for QUERY_MIN_MAX_INFO query. */ -BOOL query_min_max_info(HWND hwnd) +bool query_min_max_info(HWND hwnd) { TRACE("hwnd %p\n", hwnd); sync_window_min_max_info(hwnd); - return TRUE; + return true; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9503