aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
AgeCommit message (Collapse)AuthorFilesLines
2025-02-20Move SizeOfRect to header to allow use in ScintillaWin.cxx where it simplifiesNeil1-4/+0
and avoids type warnings.
2025-02-19Silence warnings with explicit, using, noexcept, [[nodiscard]], unnamedNeil1-132/+118
namespace, = default, in-class default member initializers, avoiding NULL, avoiding unnecessary else. Use POINT for insets as POINT has integer fields avoiding casts. Simplified cursor setting.
2025-02-19Use ComPtr for render targets of SurfaceD2D.Neil1-14/+13
Add comments about different types of Surface.
2025-02-18Use ComPtr for text formats and text layouts.Neil1-59/+42
2025-02-18Use ComPtr for geometric and graphic objects: brush, geometry, geometry sink,Neil1-80/+78
stroke style, bitmap, and gradients to remove explicit release calls and possible leaks. Ensure HPEN and HBRUSH initialised. Not converting render targets, text formats or text layouts yet.
2025-02-17Switch to using ComPtr from WRL for render target code for simplicity andNeil1-36/+19
familiarity.
2025-02-12Debug tracing was accidentally turned on so turn it off again.Neil1-1/+1
2025-02-12Implement Direct2D/DirectWrite 1.1. Add SC_TECHNOLOGY_DIRECT_WRITE_1 to use anNeil1-1/+77
explicit swap chain and ID2D1DeviceContext. Stop supporting DirectWrite on Windows Vista.
2025-02-11Update Direct2D and DirectWrite functions and types to Direct2D 1.1.Neil1-5/+6
2025-02-09Add RenderTargets to hold one render target at a time, either Hwnd or DC.Neil1-9/+17
Drawing code just needs one or the other but other calls need a particular type with casting hiding potential problems. This will be more important in the future when a third type of render target ID2D1DeviceContext will be added. Use unique_ptr more for render targets to ensure they are freed correctly.
2025-02-09Update Direct2D headers to Direct2D 1.1.Neil1-2/+2
Doesn't change functionality yet but ensures more recent APIs will be available.
2025-02-09Standardize DLL freeing.Neil1-15/+21
2024-11-26Bug [#2458]. Add include of cstdint to provide intptr_t and uintptr_t.Neil1-0/+1
2024-08-15Add SCI_STYLESETSTRETCH to support condensed and expanded text styles.Neil1-2/+4
2024-06-21Feature [feature-requests:#1520]. Cherry pick DISABLE_D2D warning fix from ↵Martijn Laan1-1/+1
isscint.
2024-05-22Bug [#2321]. Use const for some unique_ptr variables.Zufu Liu1-10/+8
2024-05-13Move Direct2D unique_ptr creation functions and use where possible.Neil1-73/+60
This encapsulates lifetimes better, ensuring resources will be freed and increases consistency between methods.
2024-05-10Bug [#2321]. Remove unused variable and declaration.Zufu Liu1-4/+0
2024-05-09Bug [#2321]. Scale reverse arrow cursor with Direct2D when enabled.Zufu Liu1-70/+277
Implement arrow cursor colour choice. React to most settings changes.
2024-05-06Make LoadD2D noexcept so can be called in more situations.Zufu Liu1-2/+6
2024-04-18Bug [#2321]. Scale reverse arrow cursor for margins to match other cursors.Zufu Liu1-3/+10
2024-03-17Fix MSVC C5055 warning in C++20 mode.Neil1-1/+1
2024-01-18Add const to avoid cppcheck 2.13 warning.Markus Nißl1-1/+1
2024-01-18Use the multi-threaded option to Direct2D to avoid crashes when ScintillaMarkus Nißl1-2/+2
instances created on different threads.
2023-10-06Fix COPY_INSTEAD_OF_MOVE performance warnings from Coverity.Neil1-1/+1
2023-06-22Bug [#2382]. Fix reverse arrow cursor when scaled.Markus Nißl1-39/+89
2023-04-09Feature [feature-requests:#1485] Follow rule-of-zero to omit standard methods.Zufu Liu1-9/+3
2023-03-27Bug [#1923]. Remove dependence on MSIMG32.DLL on Win32 by replacing AlphaBlendMat Berchtold1-3/+3
by GdiAlphaBlend.
2023-03-27Declare const where possible.Neil1-10/+10
2023-02-22Remove _CRT_SECURE_NO_DEPRECATE.Neil1-2/+2
Replace [v]sprintf with bounds checked [v]snprintf.
2022-11-29Bug [#2344]. When GDI scaling is active, ensure correct monitor used forNeil1-2/+2
determining scale factor. Function name changed to avoid possibility of confusion with Win32 API.
2022-11-26Bug [#2344]. Avoid blurry display with DirectWrite in GDI scaling mode.Markus Nißl1-8/+44
https://sourceforge.net/p/scintilla/code/merge-requests/28/
2022-10-29Bug [#2344]. Use the top-level window to find the monitor for DirectWriteMarkus Nißl1-0/+23
rendering parameters. Temporarily switch DPI awareness to find correct monitor in GDI scaling mode. https://sourceforge.net/p/scintilla/code/merge-requests/34/
2022-10-23Feature [feature-requests:#1457] Reuse MouseWheelDelta for autocompletion lists.Zufu Liu1-10/+4
This code triggers when wheel rotated and mouse is outside list.
2022-09-17Bug [#2344]. Limit render target to image area when drawing images with Direct2DMarkus Nißl1-6/+8
for autocompletion lists. This prevents the text appearing blurred with GDI scaling.
2022-08-02Hoist common DirectWrite position measuring code into MeasurePositions function.Neil1-43/+32
Ensure works on text longer than stackBufferLength.
2022-08-01Improve drawing of rounded rectangles with Direct2D.Neil1-10/+20
Treat case where outline and fill are same colour as single fill call for more uniform appearance. In thin rectangles, shift to semi-circular ends when no room for full rounded corners. Use different radius for fill and stroke for more uniform appearance.
2022-04-10Feature [feature-requests:#1435] Fix problem with horizontally inverted glyphsNeil1-1/+1
with buffered drawing and WS_EX_LAYOUTRTL set on Win32 GDI.
2022-03-12Feature [feature-requests:#1432] Support per-monitor text rendering parametersNeil1-33/+20
and update when changed by user. Includes code from Zufu Liu.
2022-03-01Update Windows API version to Windows 10 (0x0A00) as released in 2015 and SDKsNeil1-14/+2
should now be compatible.
2022-02-17Add extra condition to avoid Clang-Tidy warning.Neil1-1/+1
2022-02-02Add Supports::ThreadSafeMeasureWidths for platforms to indicate if they supportNeil1-0/+1
concurrent calls to MeasureWidths.
2022-01-13Feature [feature-requests:#1427] Make SurfaceD2D::MeasureWidths andZufu Liu1-61/+60
MeasureWidthsUTF8 reentrant so they can be called safely from multiple threads.
2022-01-13Remove tests for pD2DFactory and pIDWriteFactory that can not fail.Zufu Liu1-11/+11
Use constexpr.
2021-11-22Make const where correct.Neil1-2/+2
2021-11-22Move common Win32 functions for releasing IUnknown* and DLL function access intoNeil1-0/+1
new WinType.h header.
2021-10-12Feature [feature-requests:#1416] Drop static in unnamed namespace.Neil1-1/+1
2021-09-29Feature [feature-requests:#1416] Shorten code.Zufu Liu1-3/+2
2021-09-29Feature [feature-requests:#1416] Shorten code and avoid cppcheck warning.Zufu Liu1-7/+1
2021-09-15Move colour mixing implementations into implementation file.Neil1-13/+1
Avoids some warnings but drops constexpr. Use MixedWith in PlatWin for GDI instead of local implementation. Add unit tests for Geometry.