blob: f4f804b2e295db8ca5ddc00aff9f28ae736aa609 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// 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 {
extern void Platform_Initialise(void *hInstance);
extern void Platform_Finalise(bool fromDllMain);
RECT RectFromPRectangle(PRectangle prc) noexcept;
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());
}
#if defined(USE_D2D)
extern bool LoadD2D();
extern ID2D1Factory *pD2DFactory;
extern IDWriteFactory *pIDWriteFactory;
#endif
}
#endif
|