#include "Win32UIInterface.h"

#include <Windows.h>

Win32UIInterface::Win32UIInterface()
    : mWindowInterface(std::make_unique<Win32WindowInterface>())
{

}

void Win32UIInterface::Initialize(DesktopManager* desktopManager)
{

}

void Win32UIInterface::Loop(DesktopManager* desktopManager)
{
    // Run the message loop.
    MSG msg = { };
    while (::GetMessage(&msg, NULL, 0, 0))
    {
        ::TranslateMessage(&msg);
        ::DispatchMessage(&msg);
    }
}

void Win32UIInterface::ShutDown()
{

}

void Win32UIInterface::ShowWindow(mt::Window* window)
{
    mWindowInterface->Show(window);
}

void Win32UIInterface::AddWindow(mt::Window* window, DesktopManager* desktopManager)
{
    mWindowInterface->Add(window, desktopManager);
}