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:
parent
f56c7faf40
commit
8d33428dcf
2 changed files with 23 additions and 22 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue