void wxClientDisplayRect(int *x, int *y, int *width, int *height) { #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 HIRect bounds ; HIWindowGetAvailablePositioningBounds(kCGNullDirectDisplay,kHICoordSpace72DPIGlobal, &bounds); if ( x ) *x = bounds.origin.x; if ( y ) *y = bounds.origin.y; if ( width ) *width = bounds.size.width; if ( height ) *height = bounds.size.height; #else Rect r; GetAvailableWindowPositioningBounds( GetMainDevice() , &r ); if ( x ) *x = r.left; if ( y ) *y = r.top; if ( width ) *width = r.right - r.left; if ( height ) *height = r.bottom - r.top; #endif }
void wxClientDisplayRect(int *x, int *y, int *width, int *height) { HIRect bounds ; HIWindowGetAvailablePositioningBounds(kCGNullDirectDisplay,kHICoordSpace72DPIGlobal, &bounds); if ( x ) *x = bounds.origin.x; if ( y ) *y = bounds.origin.y; if ( width ) *width = bounds.size.width; if ( height ) *height = bounds.size.height; }