Christian Grasser d8c6350918 Update to scintilla 5.5.1 & Lexilla 5.3.3
Release 5.5.1 ( https://www.scintilla.org/scintilla551.zip )

    Released 22 July 2024.
    SCI_CUTALLOWLINE added which is similar to SCI_COPYALLOWLINE but also deletes the copied text. Feature #1518.
    Can set font used for autocompletion lists with SCI_AUTOCSETSTYLE. Feature #1523.
    Increase maximum zoom set interactively to +60 points. Feature #1517.
    Fix flickering cursor after some mouse action sequences. Bug #2443.

Release 5.3.3 ( https://www.scintilla.org/lexilla533.zip )

    Released 22 July 2024.
    ASP: Control whether ASP is enabled for XML and HTML with lexer.xml.allow.asp and lexer.html.allow.asp. Issue #252.
    JavaScript: Recognize regular expressions at start or after '>' in JavaScript when lexer is cpp, hypertext, or xml. Issue #250, Bug #918.
    JavaScript: Recognize initial #! 'shebang' line as a comment in standalone files. Issue #253.
    Lua: Fix non-ASCII identifiers joined with '.' or ':'. Issue #242.
    Lua: Fix folding for multi-line SCE_LUA_LITERALSTRING and SCE_LUA_COMMENT when performed incrementally. Issue #247.
    PHP: Control whether PHP is enabled for XML and HTML with lexer.xml.allow.php and lexer.html.allow.php. Issue #252.

Close #15466
2024-07-23 13:07:50 +02:00

87 lines
2.4 KiB
C++

// Scintilla source code edit control
/** @file PlatWin.h
** Implementation of platform facilities 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 PLATWIN_H
#define PLATWIN_H
namespace Scintilla::Internal {
#ifndef USER_DEFAULT_SCREEN_DPI
#define USER_DEFAULT_SCREEN_DPI 96
#endif
extern void Platform_Initialise(void *hInstance) noexcept;
extern void Platform_Finalise(bool fromDllMain) noexcept;
constexpr RECT RectFromPRectangle(PRectangle prc) noexcept {
const RECT rc = { static_cast<LONG>(prc.left), static_cast<LONG>(prc.top),
static_cast<LONG>(prc.right), static_cast<LONG>(prc.bottom) };
return rc;
}
constexpr POINT POINTFromPoint(Point pt) noexcept {
return POINT{ static_cast<LONG>(pt.x), static_cast<LONG>(pt.y) };
}
constexpr Point PointFromPOINT(POINT pt) noexcept {
return Point::FromInts(pt.x, pt.y);
}
constexpr HWND HwndFromWindowID(WindowID wid) noexcept {
return static_cast<HWND>(wid);
}
inline HWND HwndFromWindow(const Window &w) noexcept {
return HwndFromWindowID(w.GetID());
}
void *PointerFromWindow(HWND hWnd) noexcept;
void SetWindowPointer(HWND hWnd, void *ptr) noexcept;
HMONITOR MonitorFromWindowHandleScaling(HWND hWnd) noexcept;
UINT DpiForWindow(WindowID wid) noexcept;
float GetDeviceScaleFactorWhenGdiScalingActive(HWND hWnd) noexcept;
int SystemMetricsForDpi(int nIndex, UINT dpi) noexcept;
HCURSOR LoadReverseArrowCursor(UINT dpi) noexcept;
class MouseWheelDelta {
int wheelDelta = 0;
public:
bool Accumulate(WPARAM wParam) noexcept {
wheelDelta -= GET_WHEEL_DELTA_WPARAM(wParam);
return std::abs(wheelDelta) >= WHEEL_DELTA;
}
int Actions() noexcept {
const int actions = wheelDelta / WHEEL_DELTA;
wheelDelta = wheelDelta % WHEEL_DELTA;
return actions;
}
};
#if defined(USE_D2D)
extern bool LoadD2D() noexcept;
extern ID2D1Factory *pD2DFactory;
extern IDWriteFactory *pIDWriteFactory;
struct RenderingParams {
std::unique_ptr<IDWriteRenderingParams, UnknownReleaser> defaultRenderingParams;
std::unique_ptr<IDWriteRenderingParams, UnknownReleaser> customRenderingParams;
};
struct ISetRenderingParams {
virtual void SetRenderingParams(std::shared_ptr<RenderingParams> renderingParams_) = 0;
};
#endif
}
#endif