Commit Graph

816 Commits

Author SHA1 Message Date
Maarten Bent
137713e0c8 Add framework for Per-Monitor DPI Awareness on Windows
React to the WM_DPICHANGED event and update the size of the  child windows and
the top-level window. Scale the minimum and maximum window size to the new DPI.

Only react to WM_DPICHANGED when DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 is
used.
2019-08-24 22:30:11 +02:00
Maarten Bent
a377f0e5f0 Get rid of wxRA_LEFTTORIGHT and wxRA_TOPTOBOTTOM styles
This was only used in wxUniv, wxRA_SPECIFY_[COLS/ROWS] can be used instead.
Do not remove them from the definitions, to not break user code.

Closes #18100.
2019-01-27 15:26:16 +01:00
Stefan Csomor
61c413928a iOS fixes 2019-01-03 20:04:50 +01:00
Stefan Csomor
ca6cae20e8 Adding more osx types as opaque public types 2018-10-01 08:12:03 +02:00
Stefan Csomor
266f32493e Removing non-native bitmap code, using common code for iOS and macOS 2018-09-24 00:11:31 +02:00
Stefan Csomor
e7d21f6638 Initial Commit of full native bitmap macOS implementation
Right now, to better test regressions, with dual implementation
2018-09-24 00:11:31 +02:00
Vadim Zeitlin
f69dbaa1ae Introduce MSW ARM64 support
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.

Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
  libraries for ARM64 component installed

Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
   Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
   libraries.

Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
   requires to hardcode Windows SDK to 10.0.15063.0 or later in
   *.vcxproj files, which would render them non-compilable in older
   Visual Studio versions. Microsoft is aware of this issue and is
   planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
   missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/923
2018-09-17 22:34:32 +02:00
Vadim Zeitlin
ed01fede2e Add helper macros for suppressing gcc 8 -Wcast-function-type
These warnings are unavoidable in a few places, and testing for gcc
version and suppressing them is too verbose, so define helper macros
making it a bit less painful.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
4230cb24de Add WXWNDPROC typedef and use it in wxMSW instead of WXFARPROC
WNDPROC and FARPROC are not the same thing in MSW and it's wrong to use
WXFARPROC as the type of different window procedures we use.

Introduce WXWNDPROC which is more clear and correct and use it instead.

Also get rid of a few casts which are not necessary any longer.
2018-06-03 22:47:04 +02:00
Vadim Zeitlin
56511118d9 Merge branch 'cxx11-abi-fix'
Avoid ABI issues when building the library in C++98 mode and the
application using C++11 due to using different unordered containers.

Closes #18034.
2018-01-25 13:50:21 +01:00
Vadim Zeitlin
9364690c0e Correct check for <windows.h> inclusion to fix MinGW build
MinGW compiler predefines WIN32, meaning that wx/msw/winundef.h was
always included from wx/defs.h, even when it was completely unnecessary.
This was just inefficient, but harmless, until the changes of
042d922e88 which broke MinGW compilation
as wxUSE_UNICODE_WINDOWS_H was incorrectly defined during the very first
inclusion of wx/msw/winundef.h, before _UNICODE could be defined
correctly by windows.h.

Fix this by checking whether windows.h was really already included.
2018-01-23 17:53:18 +01:00
Martin Koegler
f6dddd9228 Use unordered_xxx classes detected by configure
When using configure, use the same family of hash sets/maps when
building wxWidgets and the applications using it as doing otherwise
results in ABI incompatibility.
2018-01-14 03:07:48 +01:00
Vadim Zeitlin
5def115f28 Extract common type definitions from wx/defs.h to wx/types.h
Fix the problem with compiling user code including wx/debug.h as the
first wxWidgets header under MSW. This ought to work, but didn't,
because wx/debug.h included wx/chartype.h without including wx/defs.h
(because there is already an inclusion in the other direction), which
defines SIZEOF_WCHAR_T required by wx/chartype.h, first.

Notice that we repurpose the existing but completely unused (no mentions
of it or the symbols defined in it anywhere neither in wxWidgets nor in
any of the code search engines) wx/types.h header as it has a fitting
name and this avoids having to add a new header and remove the existing
one.
2018-01-07 22:43:24 +01:00
prashantkn94
261b04b5a3 Merge multi-touch gestures event branch
This is a squashed commit of the SOC2017_GESTURES branch from
https://github.com/prashantkn94/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/551
2017-11-17 18:06:06 +01:00
Paul Cornett
4ec80a35f9 Define wxFALLTHROUGH for more compilers
Avoids -Wimplicit-fallthrough warning with GCC 7
2017-10-17 09:21:03 -07:00
Stefan Csomor
560676a393 Missing chanaged typedef for OpenGLES / iOS 2017-09-25 21:55:34 +02:00
Vadim Zeitlin
8c572c0a77 Always include wx/msw/winundef.h from wx/defs.h, not just once
Fix compilation/link problems due to symbols redefinitions in user code
that could happen if it included some wx header first, then <windows.h>
(possibly indirectly, e.g. via another third party library) and then
another wx header -- in this case, the second wx header wasn't protected
from <windows.h> redefinitions resulting in all the usual problems.

Avoid this by always including winundef.h whenever any wx header is
included, not just when wx/defs.h is included for the first time.
2017-08-24 13:55:23 +02:00
Vadim Zeitlin
bb306b7ed0 Merge fixes for handling Unicode characters outside of BMP
Closes https://github.com/wxWidgets/wxWidgets/pull/467
2017-06-21 19:10:12 +02:00
Vadim Zeitlin
a86d0f8d65 Move wx/debug.h inclusion after SIZEOF_WCHAR_T in wx/defs.h
This is required now because wx/debug.h includes wx/chartype.h which uses
SIZEOF_WCHAR_T to define wxUSE_UNICODE_UTF16.
2017-06-21 19:07:43 +02:00
Stefan Csomor
8b1381f2b1 OSX use fontAttributes for better emulation of bold fonts (#501)
* using fontAttributes dictionary allows for better emulation of bold typefaces, also switch to using color from context, this allows keeping the same dict throughout, as a side effect fix font caching

* reverting in order to maintain crossplatform compatibility

* applying review suggestions

* applying review suggestions
2017-06-20 17:55:26 +02:00
Vadim Zeitlin
3b298cc8b2 Only define wxCLANG_WARNING_SUPPRESS/RESTORE when using clang
This makes sense and avoids an error if some other header sabotages our
__has_warning definition check by providing a dummy definition for it (as ICU
does, for whatever reason).
2017-03-20 00:26:10 +01:00
Vadim Zeitlin
d15bbcacd2 Merge branch 'rmv_symbols_3' of https://github.com/catalinr/wxWidgets
Remove obsolete mentions of Windows 9x, Windows CE and OS/2.
2017-02-20 17:46:45 +01:00
Vadim Zeitlin
04428890b7 Fix warning about undefined macro when cross-compiling with MinGW
__USE_MINGW_ANSI_STDIO is apparently not defined when using MinGW as a
cross-compiler from Linux, so 7c730334a2
resulted in -Wundef warning about this.

Fix this by checking if the macro is defined before testing its value.

See #17736.
2016-12-12 23:39:01 +01:00
Laurent Poujoulat
7c730334a2 Fix long long format specifier when using MinGW with ANSI STDIO
When using MinGW own, more standard-compliant, STDIO library, the correct
format specified to use for long long values is "%lld" and not "%I64d" as when
using MSVC CRT.

Closes #17736.
2016-12-02 20:47:43 +01:00
ARATA Mizuki
affbcfa6c4 Remove HAVE_PARTIAL_SPECIALIZATION and HAVE_TEMPLATE_OVERLOAD_RESOLUTION macros
See #17655.
2016-09-14 18:45:12 +09:00
ARATA Mizuki
32666e8d4f Remove feature test for HAVE_EXPLICIT 2016-09-14 18:45:12 +09:00
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00
ARATA Mizuki
1e6251d592 Replace wx_static_cast/wx_const_cast/wx_reinterpret_cast with the function-style casts
See #17655.
2016-09-14 18:45:12 +09:00
Vadim Zeitlin
c32fad09b8 Don't use __has_include() to test for C++11 headers
This is unnecessary as we know that we have them in C++11 mode and we can't
compile them in non-C++11 mode even if they exist.

Not doing it simplifies the code and works around a bug in clang 3.2.

Closes https://github.com/wxWidgets/wxWidgets/pull/247
2016-03-07 16:16:45 +01:00
Catalin
ed938781b6 Removed obsolete symbols from comments. 2016-02-21 20:12:09 +02:00
Vadim Zeitlin
8e3a317392 Remove useless #ifdef wxUSE_DEBUG_NEW_ALWAYS check
This symbol is tested using "#if", so it should be always defined and there is
no need for testing whether this is the case.

Moreover, doing this useless check triggers warning C4574 (which is disabled
by default, but it's useful enough to enable it explicitly) with VC14 about
using "#ifdef" with a symbol defined as 0.
2016-02-15 01:20:48 +01:00
Vadim Zeitlin
f8bfab5284 Replace out of date comment before wx/windowid.h inclusion
No real changes, just remove the nonsensical comment from wx/defs.h which
completely lost its meaning since wxWindowID typedef was replaced by a class 8
years ago in cf2810aa39.
2016-02-10 00:06:41 +01:00
Vadim Zeitlin
d50abc2d3e Make wxWS_EX_VALIDATE_RECURSIVELY default (and only) behaviour
In practice, almost everybody using validators also seems to use this style,
so make it the default (this hadn't been done when it was originally
introduced because of compatibility concerns, but now, 15+ years later, it's
probably safe enough to change this).
2016-02-09 23:38:23 +01:00
Lauri Nurmi
4281cb4daa Use enums, not typedef enums, in all public headers. 2016-02-07 01:11:25 +02:00
Vadim Zeitlin
a2ecb7a320 Don't test for old compilers in C++11 mode in configure
This makes configure faster when C++11 is enabled by avoiding spending time on
compiling unnecessary checks in this case.
2016-02-06 00:16:10 +01:00
Tobias Taschner
5ba67c67e4 Remove wxOSX/Carbon support.
Cocoa has been the default toolkit in wxWidgets for a long time. There is really no good reason to use Carbon in 2016 and this removes a lot of unused and unmaintained code.
2016-02-01 13:48:48 +01:00
Jens Göpfert
abd46cb99a Add support for multimedia keys to wxMSW and wxGTK
Add WXK_XXX constants for the standard multimedia keys and generate events
corresponding to them under wxGTK and wxMSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/157
2016-01-08 23:22:24 +01:00
Vadim Zeitlin
777b7537c1 Change WXK_SPECIALx constants to follow the other WXK_XXX values
These constants were defined in the middle of the wxKeyCode enum, value-wise,
which made it difficult to end new elements to the enum as they could clash
with the existing ones if they were simply added at the end.
2016-01-08 23:13:25 +01:00
ARATA Mizuki
f90205951c Add macros to conditionally suppress clang warnings.
The added macros wxCLANG_WARNING_{SUPPRESS,RESTORE} are similar to
wxGCC_WARNING_{SUPPRESS,RESTORE}, but the `wxCLANG_' version will expand to
compiler pragmas only when the warning name is known to the compiler.

They use clang's __has_warning feature.
2015-11-06 16:33:16 +09:00
Bryan Petty
0b2263c25d Updated links and mailing list addresses. 2015-10-30 20:06:09 -06:00
Tobias Taschner
2eccc1a57d Remove remaining MSDOS support code
The remaining DOS source files where already removed in
26a0a24f38. This removes the remaining __DOS__
and __DJGPP__ (the DOS gcc) code paths.

Closes https://github.com/wxWidgets/wxWidgets/pull/100
2015-09-24 14:38:22 +02:00
Tobias Taschner
8282c1be0f Remove Windows CE support
Windows CE doesn't seem to be supported by Microsoft any longer. Last CE
release was in early 2013 and the PocketPC and Smartphone targets supported by
wxWidgets are long gone.

The build files where already removed in an earlier cleanup this commit
removes all files, every #ifdef and all documentation regarding the Windows CE
support.

Closes https://github.com/wxWidgets/wxWidgets/pull/81
2015-09-23 00:52:30 +02:00
Tobias Taschner
f1abb351af Remove MicroWindows support.
MicroWindows (aka Nano-X) support hasn’t been updated since 2010 and last work for it in wxWidgets happened more than 10 years ago.
2015-08-27 11:00:16 +02:00
Vadim Zeitlin
8741c2730b Make wxVSCROLL explicitly of int type.
Its value (0x80000000) is outside of the int type range on 32 bit platforms,
but we still want to allow using it as an initializer of int and/or long
variables for consistency with the other types, so cast it to int explicitly
to suppress -Wnarrowing warnings from recent g++ which were given when doing
this before.
2015-06-21 15:59:16 +02:00
Vadim Zeitlin
4f846f72de Don't attempt using <type_traits> with g++ 4.9.2 in C++98 mode.
g++ 4.9.2 added support of __has_include() but, unlike clang, refuses to
compile the <type_traits> header that is detected as existing now in C++98
mode, so the build was broken with it when not using configure (i.e. under
MSW).

Fix this by, first, testing for C++11 compilers separately (which seems like a
good idea anyhow as it will allow using these headers with other compilers)
and, second, not trusting g++ __has_include() for C++11 headers in C++98 mode.
2015-03-17 23:55:46 +01:00
Václav Slavík
94fc40b7ea Make semantic wxICON_XXX styles the canonical ones
Make wxICON_WARNING and wxICON_ERROR the primary constants for their
purpose and define their visual Windows-based synonyms wxICON_HAND and
wxICON_EXCLAMATION in terms of the semantic ones, instead of the other
way around.
2015-03-07 16:15:51 +01:00
Vadim Zeitlin
626aadf02f Use #pragma diagnostic for clang too, not just g++ 4.6+.
Clang seems to support this #pragma just fine and it's useful for disabling
deprecation warnings in wxOSX code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:32:13 +00:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Stefan Csomor
c6201f2d70 completing in place swapping macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 16:03:03 +00:00
Stefan Csomor
14c736b89b fixing commit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 15:50:13 +00:00