mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 00:27:43 +00:00
CIOWinManager implementation
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
#define __RETRO_CIOWINMANAGER_HPP__
|
||||
|
||||
#include <memory>
|
||||
#include <list>
|
||||
#include "CIOWin.hpp"
|
||||
#include "rstl.hpp"
|
||||
#include "CArchitectureQueue.hpp"
|
||||
|
||||
namespace Retro
|
||||
{
|
||||
@@ -11,17 +14,31 @@ class CIOWinManager
|
||||
{
|
||||
struct IOWinPQNode
|
||||
{
|
||||
std::shared_ptr<CIOWin> m_iowin;
|
||||
int m_prio;
|
||||
CIOWinManager::IOWinPQNode* m_prev;
|
||||
IOWinPQNode(std::weak_ptr<CIOWin> iowin, int prio,
|
||||
CIOWinManager::IOWinPQNode* prev)
|
||||
: m_iowin(iowin), m_prio(prio), m_prev(prev) {}
|
||||
std::shared_ptr<CIOWin> GetIOWin() const {return m_iowin;}
|
||||
rstl::rc_ptr<CIOWin> x0_iowin;
|
||||
int x4_prio;
|
||||
CIOWinManager::IOWinPQNode* x8_next;
|
||||
IOWinPQNode(rstl::ncrc_ptr<CIOWin> iowin, int prio,
|
||||
CIOWinManager::IOWinPQNode* next)
|
||||
: x0_iowin(iowin), x4_prio(prio), x8_next(next) {}
|
||||
rstl::rc_ptr<CIOWin> GetIOWin() const {return rstl::rc_ptr<CIOWin>(x0_iowin);}
|
||||
};
|
||||
IOWinPQNode* x0_rootDraw = nullptr;
|
||||
IOWinPQNode* x4_rootPump = nullptr;
|
||||
CArchitectureQueue x8_internalQueue;
|
||||
public:
|
||||
bool OnIOWinMessage(const CArchitectureMessage& msg);
|
||||
void Draw() const;
|
||||
bool DistributeOneMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue);
|
||||
void PumpMessages(CArchitectureQueue& queue);
|
||||
rstl::rc_ptr<CIOWin> FindIOWin(const std::string& name);
|
||||
void ChangeIOWinPriority(rstl::ncrc_ptr<CIOWin>, int pumpPrio, int drawPrio);
|
||||
void RemoveAllIOWins();
|
||||
void RemoveIOWin(rstl::ncrc_ptr<CIOWin>);
|
||||
void AddIOWin(rstl::ncrc_ptr<CIOWin>, int pumpPrio, int drawPrio);
|
||||
};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __RETRO_CIOWINMANAGER_HPP__
|
||||
|
||||
Reference in New Issue
Block a user