Commit graph

493 commits

Author SHA1 Message Date
Vadim Zeitlin
ff59ef301b Merge branch 'master' into webview-chromium 2024-01-17 00:22:39 +01:00
Paul Cornett
ce1d317768 Remove GLU dependency
See #23721
2023-12-28 14:49:42 -08:00
Viachaslau Lisouski
ca405352e0 Add wxFileSystemHandler for "data" scheme
This notably allows embedding images directly in HTML.

Closes #24138.
2023-12-18 22:19:11 +01:00
Vadim Zeitlin
ae8619b6dd Don't build separate webview_chromium library
Just include wxWebViewChromium in the webview library if it's enabled
during the build.

There doesn't seem to be any reason to build a separate library for it,
it's not really different from the other disabled by default wxWebView
backend (Edge).

And now that we don't need to link with an extra library, there is also
no need to have a separate webview_chromium sample, so just add a
possibility to run webview sample itself using Chromium backend by
setting WX_WEBVIEW_BACKEND environment variable.
2023-09-15 01:56:08 +02:00
Vadim Zeitlin
b6bfdd97c9 Merge branch 'master' into webview-chromium
Update to the latest master.
2023-08-30 02:03:00 +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
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
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
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
f932046a5c Merge branch 'msw-overlay'
Add native wxOverlay implementation using layered windows to wxMSW.

See #23261.
2023-02-20 18:28:21 +01:00
Maarten Bent
b0385e498c
Rebake after bakefile changes 2023-02-14 22:52:26 +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
e89f05faba Remove memory debugging/tracing support and all related options
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.

Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.

Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
2023-01-05 21:41:38 +01:00
Vadim Zeitlin
e0db72d80e Include arch-specific suffix in the DLLs names in makefile.vc too
This is similar to edcfeab29d (Include arch-specific suffix in the DLL
names in CMake builds too, 2022-12-23).

See #23053.
2022-12-28 22:06:41 +01:00
Vadim Zeitlin
bcea384923 Start adding dark mode support to wxMSW
Add experimental wxApp::MSWEnableDarkMode().

For now this is very incomplete and just uses the basic API for setting
the preferred application mode, which only works for the standard
dialogs and popup menus, but it's a start.

Support of dark mode is also limited to Windows 10 20H1 and later, but
this should, hopefully, be not a problem in practice as few people
should be using pre-2020 Windows 10 versions by now.
2022-12-08 00:15:18 +00:00
Vadim Zeitlin
2c0c727f49 Remove wx own wxStringImpl implementation
Always use std::basic_string<> as wxStringImpl.

Closes #22883.
2022-11-17 00:40:50 +01:00
Vadim Zeitlin
c78b0d652b Remove UNICODE build option, hardcode its value as 1
Also hardcode "u" suffix for the library names -- it doesn't make sense
any longer, but we need to keep it for compatibility.
2022-10-27 19:43:59 +02:00
Vadim Zeitlin
6e8290a9ce Stop defining _UNICODE in makefiles
This shouldn't be necessary any longer, so don't do it.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
5c49448c75 Remove bakefile UNICODE_DEFINE variable, always define _UNICODE
It might be unnecessary to define it on command line at all, as it's
done in wx/setup.h, but keep doing it for now.

However stop using a variable for this, as setting wxUSE_UNICODE to 0 is
not supported any longer.
2022-10-27 19:43:30 +02:00
Maarten Bent
2af3719a4e
Add new scintilla sources to build systems
Mention updating the CMake file in the readme.
Remove NO_CXX11_REGEX from scintilla build.
Manually update vcxproj files.
Define LPEG_LEXER=0, prevent LPEG_LEXER is not defined error.
2022-10-22 19:05:18 +02:00
Artur Wieczorek
5e2da5a106 Get rid of v2.8 code 2022-08-02 08:26:29 +02:00
Vadim Zeitlin
af4ad43824 Rebake and rerun autoconf after the version update 2022-07-17 17:03:39 +02:00
Vadim Zeitlin
2a2308d5ed Update version to 3.2.0 and rebake and rerun autoconf
Update all make/project files to use 3.2.0.
2022-06-21 00:54:26 +02:00
Maarten Bent
ae695b8b57 Add wxWebViewEdge includes to monolithic builds too
Create a template with the additional webview includes and defines needed for Edge backend.
Use the template in the lib, dll, and monolithic build.

Fixes #19104
2022-05-20 00:17:30 +02:00
Vadim Zeitlin
5d5591816d Update to bakefile 0.2.13 to fix DLL directory creation
Fix the bug introduced in ec0734f96f (Install DLLs in bindir, not
libdir, when using MSW toolchains, 2021-01-09): the directory where the
DLLs were installed wasn't created any more, resulting in errors if it
didn't exist.

Update to latest bakefile version adding the missing mkdir command to
fix this and also use a released bakefile version for the wx makefiles.

Regenerate configure to match the new version.

See #14601.
2022-04-23 23:11:31 +02:00
Vadim Zeitlin
19e3a47d98 Update version to 3.1.7 and rebake the makefiles
Make it possible to distinguish the latest master from 3.1.6 before
making any changes.

Closes #22282.
2022-04-07 17:40:13 +02:00
Vadim Zeitlin
1549aafdc9 Factor out common code from most wxBookCtrl-related XRC handlers
Add new wxBookCtrlXmlHandlerBase and inherit the XRC handlers of all the
wxBookCtrlBase-derived classes except for wxTreebookXmlHandler, which
will require special handling, from it to avoid duplicating the same
code in all of them.

This commit is best viewed with --color-moved git option.
2022-02-27 22:42:00 +00:00
Tobias Taschner
d2a17b37c8
Rebake for static web view edge 2022-02-07 22:49:33 +01:00
Vadim Zeitlin
d156058d41 Avoid warnings in tif_print.c by excluding it from build
This is a rather drastic solution, but warnings given when
cross-compiling this file with MinGW are annoying, really fixing them is
not completely trivial and risks conflicting with the upstream changes
later, and we don't need the TIFFPrintDirectory() function defined in
this file anyhow, so just exclude it from the build.

Closes https://github.com/wxWidgets/wxWidgets/pull/2587
2021-11-16 17:34:32 +01:00
Vadim Zeitlin
af1069374e Merge branch 'bitmap-bundle'
Add wxBitmapBundle and use it in wxToolBar.

See https://github.com/wxWidgets/wxWidgets/pull/2535
2021-10-05 18:58:18 +02:00
Vadim Zeitlin
ac02ae877f Add simple wxBitmapBundle::FromSVG() implementation using NanoSVG
Add nanosvg submodule and use it in the generic implementation of this
function.

This is incomplete yet and, notably, doesn't cache the rasterized
images, but already shows that using SVG images works (at least in the
toolbar sample).
2021-10-05 16:06:43 +01:00
Vadim Zeitlin
b33df7360a Implement loading resource bundle from Windows resources
This allows to use resources defined in the .rc files under MSW instead
of embedding them in the program text as arrays.
2021-10-05 15:49:43 +01:00
Vadim Zeitlin
97f6c85d9b Add first version of wxBitmapBundle and use it in wxToolBar
This first version provides only a generic implementation of
wxBitmapBundle using a collection of bitmaps and only supports using it
in wxToolBar in wxMSW and wxGTK.

More methods of creating wxBitmapBundle will be provided later and more
functions taking wxBitmap will be changed to take wxBitmapBundle later
too and, of course, all the other ports will be updated to use the new
API too.
2021-10-05 15:49:43 +01:00
Alexander Koshelev
e2aca9cbd5 Add wxStyledTextCtrl XRC handler
Closes https://github.com/wxWidgets/wxWidgets/pull/2530

Co-authored-by: VZ <vz-github@zeitlins.org>
2021-09-28 15:39:20 +02:00
Vadim Zeitlin
5216d97f08 Use arch suffix consistently in all directories names
For some reason, we used "vc_x64_lib" as the output directory for the
libraries, but "vc_mswu_x64" as the output directory for the samples.

Place the arch suffix, i.e. "_x64" part, always after the compiler
prefix (possibly including version), for consistency with both the
library output directories and with MSBuild project files, as
build/msw/wx_setup.props uses $(wxCompilerPrefix)$(wxArchSuffix)_...
as wxIntRootDir value.
2021-08-26 23:12:40 +02:00
Vadim Zeitlin
b9cbe6770f Add wxUILocale with minimal functionality
Use it in the sample to show what (little) it can do right now.
2021-08-20 22:02:46 +02:00
Arrigo Marchiori
30915c6163 Make wxrc independent from GUI support
The wxrc program does not depend on the GUI libraries, but only on
the base and XML libraries, so make it possible to build it in non-GUI
builds too.

Closes https://github.com/wxWidgets/wxWidgets/pull/2419
2021-08-06 21:51:11 +02:00
Vadim Zeitlin
3d8438619d Use PCRE as built-in regex library
Replace the use of Henry Spencer's regex library with PCRE at the build
level and enable wxUSE_PCRE in wxRegEx code to switch to PCRE-based
implementation there.

Note that this has to be done unconditionally because there is no simple
way to select between the previously used regex library and PCRE at the
makefiles level.

We could still keep the possibility to use the system regex library
under Unix, but this doesn't seem to be worth doing, as we don't support
Unicode REs properly when using it (and never did), so drop support for
this too.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
1dfc18a004 Link with ws2_32.lib rather than obsolete wsock32.lib
Winsock 2 provided by ws2_32.lib is available since 1994, it should be
fine to use it even for wx in 2021.

See #15562.
2021-04-18 22:13:45 +02:00
Vadim Zeitlin
dc5f1711f2 Upgrade version to 3.1.6
Run misc/scripts/inc_release, bakefile_gen and autoconf.
2021-04-14 17:57:27 +02:00
Maarten Bent
09bc566b60 Support building wxWebViewEdge with GCC or Clang
Add EventToken.h with EventRegistrationToken implementation, that can be used by the WebView2 header.
2021-03-01 00:09:23 +01:00
Vadim Zeitlin
d1810b0dce Remove setup0.h files
Simplify things by putting setup.h files themselves under version
control and getting rid of setup0.h ones.

The initial motivation for using separate setup0.h files was to allow
having local changes to setup.h, but with Git there is a simple way to
do it by using "git update-index --skip-worktree include/wx/msw/setup.h"
for example, so we don't really need setup0.h any more and dropping them
makes things simpler.
2021-01-31 19:02:56 +01:00
Vadim Zeitlin
6bdab7b3c8 Merge branch 'master' into web-request
Merge with the latest master in preparation for merging into master.

Rebake to resolve conflicts in generated files.
2020-12-12 18:12:25 +01:00
Vadim Zeitlin
426a0ed527 Remove HAVE_W32API_H definition and checks
All still supported versions of MinGW/Cygwin provide w32api.h file, so
there is no need to test for it.

This allows to simplify the code, but also remove the definition of
HAVE_W32API_H from bake- and makefiles and this, in turn, allows to get
rid of extra flags in MinGW format entirely, as we don't support gcc
2.95 for which they were originally needed neither.
2020-10-20 01:47:47 +02:00
Artur Wieczorek
365c3a2ae9 Revert "Get rid of unused wxTransformMatrix"
wxTransformMatrix is undocumented but it is appartently
in use so it has to be present in the library.

This reverts commit 3e88df56f5.
2020-10-07 23:15:10 +02:00
Artur Wieczorek
3e88df56f5 Get rid of unused wxTransformMatrix
As it is stated in matrix.cpp wxTransformMatrix was intended to be used
in wxDC to replace the basic system of scaling/translation but actually
it was never used.
Because applying affine transformations can be done with wxAffineMatrix2D
and wxDC::SetTransformMatrix() we can get rid of this dead code.

Closes #13114.
2020-10-06 20:49:32 +02:00
Maarten Bent
53a2c8c7fb Rebake after manifest changes 2020-07-31 01:53:43 +02:00
Vadim Zeitlin
d1aa3d5663 Update the version to 3.1.5
This was done by running misc/scripts/inc_release, bakefile_gen and
autoconf.
2020-07-23 16:25:39 +02:00
Vadim Zeitlin
2c4b0b4271 Get rid of src/xrc/xmladv.cpp file
It contained a single function which can be defined in xh_animatctrl.cpp
instead as it's only used there anyhow, and this file has no more reason
to exist, as "adv" library itself doesn't exist any longer.
2020-06-09 18:07:10 +02:00