Commit graph

3365 commits

Author SHA1 Message Date
Vadim Zeitlin
e34b5c5adc Remove unused m4 files and regenerate aclocal.m4
Some of autoconf macros are not used any longer, so get rid of them.
2023-07-23 23:59:57 +02:00
Vadim Zeitlin
121631514c Fix building non-GUI samples out of tree
Define wxUSE_GUI=0 for them.
2023-07-10 19:37:21 +02:00
Carlo Bramini
590cd0bd18 Fix linking with EGL under Cygwin in CMake builds
Link with OPENGL_egl_LIBRARY if OpenGL::EGL is not defined.

Closes #23673.
2023-07-04 01:37:15 +02:00
Vadim Zeitlin
aa77eb91b0 Add new test GIF image to CMake builds too
This should have been done in c2e5749443 (Fix crash when reading
truncated GIF image, 2023-07-02), but was forgotten there -- so do it
now, and add a comment reminding not to forget it the next time.

See #23409.
2023-07-03 20:20:52 +02:00
Vadim Zeitlin
b882eb96c3 Ensure CMake tests don't fail due to -Werror being used
Disable warnings while compiling the tests to avoid unnecessary noise in
the CMake output/error files (because we don't really care about
warnings in the test code at all) and also, and more importantly, to
ensure that the tests don't fail even when -Werror is specified in the
CMAKE_CXX_FLAGS globally, as it may happen when wxWidgets is used via
add_subdirectory() from a superproject.

See #23665.
2023-06-30 00:26:58 +01:00
Vadim Zeitlin
f072544bd5 Assume sigaction::sa_handler always takes "int"
This is the standard and there doesn't seem to be any contemporary
systems where this is not the case. The configure check for it was
originally added in 101c20d554 (attempting to fix sa_handler signature
for IRIX, 2000-04-01), but IRIX is not supported/doesn't exist any
longer, so don't waste time on checking for this.

The real motivation for this change is that the test failed in CMake
builds, showing just

-- Performing Test wxTYPE_SA_HANDLER_IS_INT - Failed

in the log and then resulting in -fpermissive warnings when assigning
wxFatalSignalHandler to sa_handler and it's simpler to just remove the
check than to debug it.

See #23664.
2023-06-30 00:26:19 +01:00
Maarten Bent
47041389f5
CMake: Don't show warning when webkit2 4.1 cannot be found
It will still show a warning when webkit2 4.00 can also not be found.

See #23633
2023-06-17 15:13:02 +02:00
Vadim Zeitlin
5cef6223c3 Merge branch 'cmake-imported-libs' of https://github.com/MaartenBent/wxWidgets
CMake: Improve finding library name or path of imported targets.

See #23635.
2023-06-15 23:47:44 +02:00
Vadim Zeitlin
d78399dcc9 Merge branch 'webkit2_support_4.1' of https://github.com/swt2c/wxWidgets
Add support for building WebView with libwebkit2gtk-4.1.

See #23633.
2023-06-15 23:42:11 +02:00
Scott Talbert
411e183cd0 Switch Fedora CI to use libwebkit2gtk-4.1 2023-06-13 18:14:04 -04:00
Scott Talbert
1b86644266 Add support for building WebView with libwebkit2gtk-4.1
libwebkit2gtk-4.1 has the same API as libwebkit2gtk-4.0, except that the
former links with libsoup-3.0 and the latter links with libsoup-2.4.

Fixes #23630.
2023-06-13 18:13:59 -04:00
Maarten Bent
0f1f61a9c8
CMake: Improve finding library name or path of imported targets
Checking LOCATION{_CONFIG} property on interfaces is only supported since CMake 3.19.
Also check the LOCATION and IMPORTED_LIBNAME properties for possible library locations.

Fixes #23632
2023-06-13 21:22:44 +02:00
Maarten Bent
e1f0a938f6
CMake: Fix using Cotire for precompiled headers
Cotire doesn't work when $<COMPILE_LANGUAGE:CXX> is used.
2023-06-13 21:19:44 +02:00
Maarten Bent
a801057f1a CMake: Check and enable use of libxkbcommon
CMake's has built-in support for checking xkbcommon using FindX11 since
3.18.

But because older CMake versions are supported, add our own module that
checks if the header and library is available.

See #23410.

Closes #23613.
2023-06-06 21:18:48 +02:00
PB
241ed70b5b Copy all data files needed by XRC sample when building with CMake
XPM files demonstrating the use of wxBitmapBundle in the XRC files
were not copied when building the XRC sample with CMake.

This should have been part of eaa769a (Use wxBitmapBundle in
wxBitmapComboBox XRC handler, 2022-02-09).

Closes #23612.
2023-06-06 21:18:03 +02:00
Brian Nixon
d78e9fb1cb Correct loading of BI_BITFIELDS bitmaps
This fixes several minor bugs in the loading of `BI_BITFIELDS` bitmaps,
related to handling different header sizes and the colour and alpha
masks.

Closes #23601.
2023-06-03 21:07:40 +02:00
Antti Nietosvaara
d666d1e222 Fix a memory leak when using non-wx threads
The wxThreadSpecificInfo object created by wxThreadSpecificInfo::Get()
was only released by the wxThreadInternal's cleanup, which meant that it
was leaked if wxThreadSpecificInfo::Get() was called by a thread not
created by wxThread, e.g. when using std::async or std::thread.

Fix this by simply using C++11 thread_local and removing the entire
wxThreadSpecificInfo machinery entirely.

See #23535.

Closes #23543.
2023-05-16 00:36:00 +02:00
Vadim Zeitlin
a0e3f1e1ab Use grep instead of fgrep and egrep
The latter are deprecated and shouldn't be used any longer.

No real changes.

Closes #23537.
2023-05-10 23:44:17 +02:00
Vadim Zeitlin
f5a735ed87 Stop using native MSW wxImageList in wxUniv
This doesn't make any sense, native image list implementation is only
needed for interoperability with the native controls which are not used
by wxUniv, so always use the generic version in it instead.
2023-04-22 19:03:08 +02:00
Vadim Zeitlin
2d1c63a4c1 Install all required headers as part of wxUniv/MSW installation
Move headers needed by wxUniv too to MSW_LOWLEVEL_HDR, so that they get
installed by "make install".
2023-04-22 18:40:49 +02:00
Vadim Zeitlin
0d046b8e9e Compile wxAppProgressIndicator as part of wxUniv/MSW too
This fixes link problem due to using wxAppProgressIndicator from the
common wxGauge code, see 11a5b83e2c (Add OS X implementation of
wxAppProgressIndicator., 2015-02-15) and seems to be better than adding
checks for wxUniv there, as this is part of "platform" functionality
rather than "toolkit".

This also pulls in wxTaskBarButton code.
2023-04-22 16:37:27 +02:00
Vadim Zeitlin
0b5252d12f Compile dark mode support for wxUniv/MSW too
Dark mode support for native controls is not needed in this port, but we
still need DWM-related stuff to make the window title bar use the dark
mode if necessary, so just include all this code in wxUniv.
2023-04-22 16:37:27 +02:00
Vadim Zeitlin
889845fbc4 Add support for wxNO_IMPLICIT_WXSTRING_CONV_TO_PTR to wxString
This symbol is similar to the existing wxNO_IMPLICIT_WXSTRING_ENCODING
and can be defined when building the application (as opposed to when
building the library) to disable implicit wxString conversions to
pointer types, i.e. char*, wchat_t* and void*.

This makes the just added wxUSE_CHAR_CONV_IN_WXSTRING library build
option unnecessary, so remove it.
2023-04-16 01:16:56 +02:00
Vadim Zeitlin
35c35c235e Remove wxUSE_STL which is not really used any longer
wxString is always based on std::[w]string since 2c0c727f49 (Remove wx
own wxStringImpl implementation, 2022-11-16) and all containers use
standard containers by default too now -- and there is a separate
wxUSE_STD_CONTAINERS for this anyhow.

The only remaining use of wxUSE_STL was as the default value for
wxUSE_STD_STRING_CONV_IN_WXSTRING option, but it's not really needed
for this neither, and this option can just be set to 0 by default.

Also add wxUSE_CHAR_CONV_IN_WXSTRING which can now be set to 0 too to
disable all unwanted implicit conversions (even "safe" ones, to wide
strings, in addition to the unsafe ones to narrow strings that could be
already disabled with wxUSE_UNSAFE_WXSTRING_CONV) to allow people who
don't want to have any implicit conversions at all to do it.

Keep --enable-stl configure option for compatibility, but warn if it is
used to tell people that it is not needed any longer.
2023-04-15 17:22:09 +02:00
Vadim Zeitlin
fb17a5ac38 Merge branch 'use-std-cont-1'
Set wxUSE_STD_CONTAINERS=1 by default.

See #23439.
2023-04-15 15:46:08 +02:00
Vadim Zeitlin
d6fc5230e0 Remove src/msw/gdiobj.cpp which seems to have been never used
Somewhat incredibly, this file, added back in 2bda0e1738 (added some
wxMSW stuff, 1998-05-20), never contained anything but some commented
out code and so was always totally useless.

Finally remove it.
2023-04-12 17:28:45 +02:00
Vadim Zeitlin
e273d45c9b Enable use of the standard container classes by default
This is mostly, even if not completely, compatible with the previous
default build using wxUSE_STD_CONTAINERS=0, so try enabling this by
default again. Hopefully it should work better now than the last time we
tried it, see 01871bf642 (Add wxUSE_STD_CONTAINERS and turn it on by
default., 2011-03-30) and the subsequent 7311debd0d (Don't use the
standard containers by default., 2011-05-13).

See #22718.
2023-04-10 17:00:32 +01:00
Ivan Sorokin
2c0f6a2aa0 Fix wxKeyEvent::GetKeyCode() for non-US keyboard layouts
Use the key code corresponding to the key in the US keyboard layout for
the key down/up events even when not actually using US layout, as this
is much more useful than simply returning 0 as was done before.

It also is compatible with the behaviour of the other ports.

Closes #17643.

Closes #23379.

See #23410.
2023-04-01 20:14:02 +02:00
Vadim Zeitlin
dee816bb5b Merge branch 'ci-utf8'
Fix UTF-8 build under MSW and improve its coverage in the CI jobs.

See #23313.

Closes #23328.
2023-03-30 19:46:05 +02:00
Maarten Bent
8102958665 CMake: Add libraries of imported targets to wx-config
Use the LOCATION_DEBUG or LOCATION_RELEASE property of an imported target (like NanoSVG)
to determine the full library path.

Fixes #23373.

Closes #23390.
2023-03-29 12:24:41 +02:00
Vadim Zeitlin
f1f612ea1a Use correct path for the test on AppVeyor CI in debug builds
Don't hardcode the path for DLL release configurations.
2023-03-28 23:05:09 +02:00
Vadim Zeitlin
0677d493df Add wxUSE_UNICODE_UTF8 to wx/setup.h
This option can also be used under MSW, so move it to the common setup.h
instead of having it in setup.h.in only.

Also do the same thing for wxUSE_UTF8_LOCALE_ONLY, even if it's less
clear if this one is really useful in non-Unix environment.
2023-03-24 19:18:30 +01:00
Vadim Zeitlin
0f0ac39800 Don't claim that wxUSE_UNICODE_UTF8 is Unix-specific
It can be used under MSW too.
2023-03-24 19:17:59 +01:00
Tobias Taschner
1edb38b548 Fix MSW lib names for ARM64 with CMake build
Any 64 platform had the added _x64 suffix. This will now be _arm64
when building for ARM64.

Fixes: #23347

Closes #23355.
2023-03-18 20:58:15 +01:00
Vadim Zeitlin
19100f63ca Merge branch 'cmake-large-files' of https://github.com/MaartenBent/wxWidgets
CMake: Enable large file support and other fixes.

See #23336.
2023-03-12 14:01:39 +01:00
Tobias Taschner
41194a7b2a CMake: silence shorten-64-to-32 warnings on macOS
See #23331.

Closes #23329.
2023-03-12 13:47:56 +01:00
Vadim Zeitlin
0fe6f04bfc Merge branch 'customize-dark-mode'
Allow customizing appearance in dark mode in wxMSW.

See #23275.
2023-03-12 13:42:45 +01:00
Artur Wieczorek
3142e028b2 Move wxPropertyGrid internal stuff to the separate private header 2023-03-10 23:57:43 +01:00
Maarten Bent
865f7aced2
CMake: Apply no-RTTI compile options directly to targets
Don't set global compile options or defines.
2023-03-10 00:04:51 +01:00
Maarten Bent
1051dfd141
CMake: Enable large file support
Define HAVE_LARGEFILE_SUPPORT and add '_FILE_OFFSET_BITS=64' compile definition.
Make it a PUBLIC definition so it is part of the interface, and defined when importing a target.

Check if fseeko is available, which is used in the large file code.
Also add the compile definition to wxconfig's cppflags, because configure does this too.

Large file support can be disabled with the wxBUILD_LARGEFILE_SUPPORT option, similar to configure's --disable-largefile.

Fixes #22750
2023-03-09 23:55:19 +01:00
Vadim Zeitlin
f932046a5c Merge branch 'msw-overlay'
Add native wxOverlay implementation using layered windows to wxMSW.

See #23261.
2023-02-20 18:28:21 +01:00
Vadim Zeitlin
d3ab43ae02 Add a possibility to customize dark mode colours in wxMSW
Add MSW-specific wxDarkModeSettings class which can be used to customize
the colours used in the dark mode (and will be also used for other
customizations in the future).

This commit is best viewed using Git --color-moved option.
2023-02-19 21:57:05 +00:00
Maarten Bent
73211659fc
Generate Xcode projects after Scintilla and Lexilla changes 2023-02-14 22:52:27 +01:00
Maarten Bent
9d3a24b8db
Add Lexilla to pbx template and makeprojects.py
Update paths and defines in wx.xcconfig.
Open in Xcode, copy scintilla and rename to lexilla. Then manually check the file for more scintilla usages and duplicate them for lexilla with the correct identifiers.
2023-02-14 22:52:27 +01:00
Maarten Bent
dd5ff3c59c
Update MSVS projects with Scintilla and Lexilla changes 2023-02-14 22:52:26 +01:00
Maarten Bent
b0385e498c
Rebake after bakefile changes 2023-02-14 22:52:26 +01:00
Maarten Bent
c8c254db1a
Update bakefile with Scintilla and Lexilla changes 2023-02-14 22:43:18 +01:00
Maarten Bent
5d5facb3e7
Update CMake with Scintilla and Lexilla changes
Move Scintilla and Lexilla to separate files.
Extract their include paths and compile definitions instead of redefining them for wxSTC.
2023-02-14 22:43:17 +01:00
AliKet
91031bcfee Add native wxOverlay implementation for wxMSW
Using generic implementation doesn't work any longer since the switch to
using composited windows (i.e. turning on WS_EX_COMPOSITED) by default
as drawing using wxClientDC has no effect.

So implement wxOverlay in a different way by using a layered window
covering the original window and drawing on it instead. This is similar
to Cocoa implementation of wxOverlay.

Closes #23047.
2023-02-14 18:48:47 +00:00
Vadim Zeitlin
cd0c527889 Merge branch 'composite-bookctrl-base'
Fix link when using wxSimplebook both directly and indirectly.

See #23185.
2023-01-31 01:25:38 +01:00