From: Brendan Shanks bshanks@codeweavers.com
--- dlls/winemac.drv/cocoa_display.m | 64 -------------------------------- dlls/winemac.drv/macdrv_cocoa.h | 8 ---- 2 files changed, 72 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_display.m b/dlls/winemac.drv/cocoa_display.m index 2cb6a8f1ce5..372d89381f1 100644 --- a/dlls/winemac.drv/cocoa_display.m +++ b/dlls/winemac.drv/cocoa_display.m @@ -45,70 +45,6 @@ static inline CGRect convert_display_rect(NSRect in_rect, NSRect primary_frame) }
-/*********************************************************************** - * macdrv_get_displays - * - * Returns information about the displays. - * - * Returns 0 on success and *displays contains a newly-allocated array - * of macdrv_display structures and *count contains the number of - * elements in that array. The first element of the array is the - * primary display. When the caller is done with the array, it should - * use macdrv_free_displays() to deallocate it. - * - * Returns non-zero on failure and *displays and *count are unchanged. - */ -int macdrv_get_displays(struct macdrv_display** displays, int* count) -{ -@autoreleasepool -{ - NSArray* screens = [NSScreen screens]; - if (screens) - { - NSUInteger num_screens = [screens count]; - struct macdrv_display* disps = malloc(num_screens * sizeof(disps[0])); - - if (disps) - { - NSRect primary_frame; - - NSUInteger i; - for (i = 0; i < num_screens; i++) - { - NSScreen* screen = screens[i]; - NSRect frame = [screen frame]; - NSRect visible_frame = [screen visibleFrame]; - - if (i == 0) - primary_frame = frame; - - disps[i].displayID = [[screen deviceDescription][@"NSScreenNumber"] unsignedIntValue]; - disps[i].frame = cgrect_win_from_mac(convert_display_rect(frame, primary_frame)); - disps[i].work_frame = cgrect_win_from_mac(convert_display_rect(visible_frame, primary_frame)); - } - - *displays = disps; - *count = num_screens; - return 0; - } - } - - return -1; -} -} - - -/*********************************************************************** - * macdrv_free_displays - * - * Deallocates an array of macdrv_display structures previously returned - * from macdrv_get_displays(). - */ -void macdrv_free_displays(struct macdrv_display* displays) -{ - free(displays); -} - /*********************************************************************** * get_entry_property_uint32 * diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h index ad56615dbb2..954acb0fc67 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -110,12 +110,6 @@ struct macdrv_event; struct macdrv_query;
-struct macdrv_display { - CGDirectDisplayID displayID; - CGRect frame; - CGRect work_frame; -}; -
/* main */ extern bool macdrv_err_on; @@ -261,8 +255,6 @@ static inline CGPoint cgpoint_win_from_mac(CGPoint point) CGRect rc_work; };
-extern int macdrv_get_displays(struct macdrv_display** displays, int* count); -extern void macdrv_free_displays(struct macdrv_display* displays); extern int macdrv_set_display_mode(CGDirectDisplayID id, CGDisplayModeRef display_mode); extern int macdrv_get_gpus(struct macdrv_gpu** gpus, int* count); extern void macdrv_free_gpus(struct macdrv_gpu* gpus);