mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-08-14 06:18:27 +02:00
Sintilla Release 5.5.0 (https://www.scintilla.org/scintilla550.zip) Released 23 April 2024. Add elements for inactive additional selections SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT and SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK. When not set these default to SC_ELEMENT_SELECTION_INACTIVE_TEXT and SC_ELEMENT_SELECTION_INACTIVE_BACK. Bug #2417. On Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store. Fix Win32 IME crash in windowed mode. Bug #2433. Scale reverse arrow cursor for margins to match other cursors when user changes pointer size. Bug #2321. Lexilla Release 5.3.2 (https://www.scintilla.org/lexilla532.zip) Released 23 April 2024. COBOL: Stop string literal continuing over line end. Issue #229. COBOL: Stop doc comment assigning different styles to \r and \n at line end. Issue #229. COBOL: Recognize keywords that start with 'V'. Issue #230. COBOL: Recognize comments after tag or that start with '/'. Issue #231. HTML: Implement substyles for tags, attributes, and identifiers SCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD. HTML: Implement context-sensitive attributes. "tag.attribute" matches "attribute" only inside "tag". HTML: Match standard handling of comments. Issue #232. Lua: Implement substyles for identifiers SCE_LUA_IDENTIFIER. Ruby: Allow non-ASCII here-doc delimiters. Issue #234. Ruby: Allow modifier if, unless, while and until after heredoc delimiter. Issue #236. Rust: Recognize raw identifiers. Issue #239, Pull request #240. Close #15042
88 lines
2.4 KiB
C++
88 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;
|
|
|
|
constexpr int defaultCursorBaseSize = 32;
|
|
HCURSOR LoadReverseArrowCursor(UINT dpi, int cursorBaseSize) 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
|