Add cairo interface.
This commit is contained in:
parent
a03eb9599f
commit
9bcc0ae88e
63 changed files with 1247 additions and 450 deletions
|
@ -1,7 +1,5 @@
|
|||
#include "DesktopManager.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
DesktopManager::DesktopManager()
|
||||
: mScreens(),
|
||||
mWindowManager(WindowManager::Create()),
|
||||
|
@ -69,7 +67,7 @@ void DesktopManager::OnUiEvent(UiEventUPtr eventUPtr)
|
|||
{
|
||||
auto mouseEvent = dynamic_cast<const MouseEvent*>(event);
|
||||
OnMouseEvent(mouseEvent);
|
||||
if(mouseEvent->GetAction() == MouseEvent::Action::Pressed)
|
||||
if (mouseEvent->GetAction() == MouseEvent::Action::Pressed)
|
||||
{
|
||||
mModified = true;
|
||||
}
|
||||
|
@ -109,6 +107,20 @@ AbstractDesktopAppPtr DesktopManager::GetMainApp()
|
|||
return mMainApplication;
|
||||
}
|
||||
|
||||
void DesktopManager::AddScreen(ScreenPtr screen)
|
||||
{
|
||||
mScreens.push_back(std::move(screen));
|
||||
}
|
||||
|
||||
mt::Screen* DesktopManager::GetDefaultScreen() const
|
||||
{
|
||||
if (mScreens.size() > 0)
|
||||
{
|
||||
return mScreens[0].get();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void DesktopManager::SetWindowManager(WindowManagerUPtr windowManager)
|
||||
{
|
||||
mWindowManager = std::move(windowManager);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue