mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-08-14 06:18:27 +02:00
Release 5.5.6 (https://www.scintilla.org/scintilla556.zip) Released 2 April 2025. * Disallow changing case of protected text. Bug #2463. * Return enumeration type from MarkerSymbolDefined to match MarkerDefine. Bug #2469. * On Win32, use DirectWrite for autocompletion lists when DirectWrite chosen for document text. * On Win32, optimize case-insensitive DBCS search to be around 5 times faster by using 64K memory to cache folding data for each DBCS code page used. * On Win32, fix a crash with bidirectional text. * When using Visual C++ through nmake, fix building for ARM64. Feature #1546. * On Qt, draw clipped UTF-8 text correctly. Bug #2464. * On Qt, avoid a dwell start when the mouse is moved outside the Scintilla widget. Bug #2466. * On Qt, autoCompleteSelection converts from local encoding when not in Unicode mode. Bug #2465. Release 5.4.4 (https://www.scintilla.org/lexilla544.zip) Released 2 April 2025. * Fix building for ARM64. Pull request #308. Close #16373
51 lines
1.7 KiB
C++
51 lines
1.7 KiB
C++
// Scintilla source code edit control
|
|
/** @file SurfaceD2D.h
|
|
** Definitions for drawing to Direct2D on Windows.
|
|
**/
|
|
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
|
|
// The License.txt file describes the conditions under which this software may be distributed.
|
|
|
|
#ifndef SURFACED2D_H
|
|
#define SURFACED2D_H
|
|
|
|
namespace Scintilla::Internal {
|
|
|
|
extern bool LoadD2D() noexcept;
|
|
extern void ReleaseD2D() noexcept;
|
|
extern ID2D1Factory1 *pD2DFactory;
|
|
extern IDWriteFactory1 *pIDWriteFactory;
|
|
|
|
using DCRenderTarget = ComPtr<ID2D1DCRenderTarget>;
|
|
|
|
using D3D11Device = ComPtr<ID3D11Device1>;
|
|
|
|
HRESULT CreateDCRenderTarget(const D2D1_RENDER_TARGET_PROPERTIES *renderTargetProperties, DCRenderTarget &dcRT) noexcept;
|
|
extern HRESULT CreateD3D(D3D11Device &device) noexcept;
|
|
|
|
using WriteRenderingParams = ComPtr<IDWriteRenderingParams1>;
|
|
|
|
struct RenderingParams {
|
|
WriteRenderingParams defaultRenderingParams;
|
|
WriteRenderingParams customRenderingParams;
|
|
};
|
|
|
|
struct ISetRenderingParams {
|
|
virtual void SetRenderingParams(std::shared_ptr<RenderingParams> renderingParams_) = 0;
|
|
};
|
|
|
|
using BrushSolid = ComPtr<ID2D1SolidColorBrush>;
|
|
using Geometry = ComPtr<ID2D1PathGeometry>;
|
|
using GeometrySink = ComPtr<ID2D1GeometrySink>;
|
|
using StrokeStyle = ComPtr<ID2D1StrokeStyle>;
|
|
using TextLayout = ComPtr<IDWriteTextLayout>;
|
|
|
|
BrushSolid BrushSolidCreate(ID2D1RenderTarget *pTarget, COLORREF colour) noexcept;
|
|
Geometry GeometryCreate() noexcept;
|
|
GeometrySink GeometrySinkCreate(ID2D1PathGeometry *geometry) noexcept;
|
|
StrokeStyle StrokeStyleCreate(const D2D1_STROKE_STYLE_PROPERTIES &strokeStyleProperties) noexcept;
|
|
TextLayout LayoutCreate(std::wstring_view wsv, IDWriteTextFormat *pTextFormat, FLOAT maxWidth=10000.0F, FLOAT maxHeight=1000.0F) noexcept;
|
|
|
|
}
|
|
|
|
#endif
|