Implement wxDisplaySize() and wxClientDisplayRect() via wxDisplay

Instead of forwarding to these functions from wxDisplay implementation
in wxUSE_DISPLAY==0 case, make the functions themselves wrappers around
wxDisplay, which may, or not, depending on the platform, have a simpler
implementation in wxUSE_DISPLAY==0 case, but is always available in any
case.

As part of this change, only use src/osx/core/display.cpp in macOS
builds, not iOS ones and update the Xcode project accordingly too.

This cuts down on code duplication, especially in wxGTK, and facilitates
further additions to wxDisplay API.
This commit is contained in:
Vadim Zeitlin
2018-09-29 22:18:02 +02:00
parent c98d504b6d
commit c2162792cf
22 changed files with 406 additions and 394 deletions

View File

@@ -2258,7 +2258,6 @@ set(OSX_LOWLEVEL_SRC
src/osx/core/bitmap.cpp
src/osx/core/colour.cpp
src/osx/core/dcmemory.cpp
src/osx/core/display.cpp
src/osx/core/fontenum.cpp
src/osx/core/hid.cpp
src/osx/core/printmac.cpp
@@ -2500,6 +2499,7 @@ set(OSX_COCOA_SRC
src/osx/datectrl_osx.cpp
src/osx/core/sound.cpp
src/osx/cocoa/statbmp.mm
src/osx/core/display.cpp
)
set(OSX_COCOA_HDR