1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-25 02:04:23 +00:00

Direct2D: Move WindowsScopedEvent to Direct2DHwndContext.cpp

This commit is contained in:
reuk 2025-04-17 14:10:46 +01:00 committed by Oli
parent f56c7faf40
commit 8d33428dcf
2 changed files with 23 additions and 22 deletions

View file

@ -35,28 +35,6 @@
namespace juce
{
class WindowsScopedEvent
{
public:
explicit WindowsScopedEvent (HANDLE handleIn)
: handle (handleIn)
{
}
WindowsScopedEvent()
: WindowsScopedEvent (CreateEvent (nullptr, FALSE, FALSE, nullptr))
{
}
HANDLE getHandle() const noexcept
{
return handle.get();
}
private:
std::unique_ptr<std::remove_pointer_t<HANDLE>, FunctionPointerDestructor<CloseHandle>> handle;
};
//==============================================================================
/** Heap storage for a DirectWrite glyph run */
class DirectWriteGlyphRun

View file

@ -35,6 +35,29 @@
namespace juce
{
class WindowsScopedEvent
{
public:
explicit WindowsScopedEvent (HANDLE handleIn)
: handle (handleIn)
{
}
WindowsScopedEvent()
: WindowsScopedEvent (CreateEvent (nullptr, FALSE, FALSE, nullptr))
{
}
HANDLE getHandle() const noexcept
{
return handle.get();
}
private:
std::unique_ptr<std::remove_pointer_t<HANDLE>, FunctionPointerDestructor<CloseHandle>> handle;
};
//==============================================================================
class SwapChain
{
public: