From: Brendan Shanks bshanks@codeweavers.com
--- dlls/winemac.drv/clipboard.c | 8 ++++---- dlls/winemac.drv/cocoa_clipboard.m | 8 ++++---- dlls/winemac.drv/macdrv.h | 20 ++++++++++---------- dlls/winemac.drv/macdrv_cocoa.h | 2 +- dlls/winemac.drv/macdrv_main.c | 12 ++++++------ dlls/winemac.drv/window.c | 18 +++++++++--------- 6 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/dlls/winemac.drv/clipboard.c b/dlls/winemac.drv/clipboard.c index c1e6ebb6d5b..c745be73484 100644 --- a/dlls/winemac.drv/clipboard.c +++ b/dlls/winemac.drv/clipboard.c @@ -1465,21 +1465,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 ac2a7853652..54c1278bc2f 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -39,9 +39,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; @@ -209,7 +209,7 @@ extern BOOL macdrv_SystemParametersInfo(UINT action, UINT int_param, void *ptr_p 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);
@@ -232,9 +232,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); @@ -251,7 +251,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); @@ -310,7 +310,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); @@ -328,7 +328,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 954acb0fc67..71cc0bae04d 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -548,7 +548,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 ed913834255..9780d350246 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -44,13 +44,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 26ea212043d..a511641e3c7 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; @@ -2085,14 +2085,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); @@ -2113,7 +2113,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); @@ -2126,7 +2126,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);
@@ -2135,7 +2135,7 @@ BOOL query_resize_start(HWND hwnd) sync_window_min_max_info(hwnd); send_message(hwnd, WM_ENTERSIZEMOVE, 0, 0);
- return TRUE; + return true; }
@@ -2144,11 +2144,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; }