Change GTKGetEntryTextLength() to return a signed value, as it's always
either assigned to or compared with the signed variables anyhow.
This avoids a couple of -Wsign-compare warnings when building with g++
5.4 from Ubuntu 16.04.
This function has to be called from a GTK+ callback, so make it public
and also rename to GTKColumnToWX() to conform to the naming convention
mandating the use of "GTK" prefix for the public methods which are not
part of the public API.
While this is not done for all the ports yet, the new API allows
returning different PPI values for different monitors, unlike the old
(and still existing, but implemented in terms of the new one) global
function.
Allow getting the depth of any display, not just the primary one, even
though this is not implemented for Unix ports currently.
Mostly do this for consistency with the other display-related functions.
This makes src/unix/displayx11.cpp almost readable as it's not littered
by "#ifndef __WXGTK20__" checks everywhere any more -- instead this file
is just not compiled as part of wxGTK2 at all any longer (it is still
included in wxGTK1 as well as wxX11 itself and wxMotif).
wxGTK code also can just include the new wx/unix/private/displayx11.h
instead of having to declare all the X11 functions it uses manually.
There should be no changes in behaviour, this is just a clean up.
Simplify the code by not making this function pure virtual as all the
ports except MSW had to override it just to return an empty string.
Instead, just return empty string by default as it's not critical to
force the derived classes to override this function.
Centralize all display-related code in wxDisplay class and avoid
duplicating or reimplementing it in wxDisplaySize() and
wxClientDisplayRect() functions.
See https://github.com/wxWidgets/wxWidgets/pull/955
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.
Move declaration of wxOwnerDrawnBase::ms_defaultMargin to correct file.
Do not include headers when wxUSE_UIACTIONSIMULATOR is disabled.
Add guards for wxUSE_DRAG_AND_DROP.
Use a different wxFont constructor in printing sample, which is also available in WXQT.
Avoid a heap allocation on every wxDisplay creation by caching the
wxDisplayImpl objects once they're created.
Currently we never invalidate the cache, but we should add a way to do
it in the future.
This speeds up wxDisplay::GetGeometry() benchmark by a factor of 4.
This is more consistent with the other headers, which are safe to
include even when the corresponding feature is turned off.
Also remove the now redundant wxUSE_ENH_METAFILE checks in the source
code including this header.
See https://github.com/wxWidgets/wxWidgets/pull/951
Code doing "bitmap = image" compiled in the other ports, but not in
wxMSW with WXWIN_COMPATIBILITY_3_0==1 as there was an ambiguity between
converting wxImage to wxBitmap, as intended, or converting wxImage to
wxCursor and then assigning it to wxBitmap using operator=(wxCursor)
overload.
Resolve this ambiguity by providing operator=() overload taking wxImage
directly.
This fixes widgets sample compilation under MSW after the changes of
455a45f5a8
See https://github.com/wxWidgets/wxWidgets/pull/946