mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-08-14 14:28:25 +02:00
update to Scinitlla Release 5.3.5 (https://www.scintilla.org/scintilla535.zip) Released 31 May 2023. On Win32, implement IME context sensitivity with IMR_DOCUMENTFEED. Feature #1310. On Win32 remove dependence on MSIMG32.DLL by replacing AlphaBlend by GdiAlphaBlend. Bug #1923. On Qt, stop movement of IME candidate box. On Qt, report correct caret position within paragraph for IME retrieve surrounding text. On Qt for Cocoa, fix crash in entry of multi-character strings with IME. and Lexilla Release 5.2.5 (https://www.scintilla.org/lexilla525.zip) Released 31 May 2023. Add CharacterSetArray constructor without setBase initial argument for common case where this is setNone and the initialSet argument completely defines the characters. This shortens and clarifies use of CharacterSetArray. Bash: implement highlighting inside quoted elements and here-docs. Controlled with properties lexer.bash.styling.inside.string, lexer.bash.styling.inside.backticks, lexer.bash.styling.inside.parameter, and lexer.bash.styling.inside.heredoc. Issue #154, Issue #153, Feature #1033. Bash: add property lexer.bash.command.substitution to choose how to style command substitutions. 0 → SCE_SH_BACKTICKS; 1 → surrounding "$(" and ")" as operators and contents styled as bash code; 2 → use distinct styles (base style + 64) for contents. Choice (2) is a provisional feature and details may change before it is finalized. Issue #153. Bash: fix nesting of parameters (SCE_SH_PARAM) like ${var/$sub/"${rep}}"}. Issue #154. Bash: fix single character special parameters like $? by limiting style. Issue #154. Bash: treat "$$" as special parameter and end scalars before "$". Issue #154. Bash: treat "<<" in arithmetic contexts as left bitwise shift operator instead of here-doc. Issue #137. Batch: style SCE_BAT_AFTER_LABEL used for rest of line after label which is not executed. Issue #148. F#: Lex interpolated verbatim strings as verbatim. Issue #156. VB: allow multiline strings when lexer.vb.strings.multiline set. Issue #151. Close #13729
87 lines
2.3 KiB
C++
87 lines
2.3 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;
|
|
int 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();
|
|
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
|