7 #include <CCompositor.hpp>
17 using namespace AxWin;
20 int main(int argc, char *argv[])
22 // - Load configuration (from file and argv)
25 config.parseCommandline(argc, argv);
27 catch(const std::exception& e) {
28 fprintf(stderr, "Exception: %s\n", e.what());
32 Graphics::Initialise(config.m_video);
33 // - Initialise compositor structures
34 CCompositor* compositor = new CCompositor(/*config.m_compositor*/);
36 Input::Initialise(config.m_input);
38 // - Bind IPC channels
39 IPC::Initialise(config.m_ipc, compositor);
40 // - Start root child process (from config)
41 // TODO: Spin up child process
49 nfd = ::std::max(nfd, Input::FillSelect(rfds));
50 nfd = ::std::max(nfd, IPC::FillSelect(rfds));
52 // TODO: Support _SysSendMessage IPC?
53 int64_t timeout = Timing::GetTimeToNextEvent();
54 int rv = ::_SysSelect(nfd, &rfds, NULL, &rfds, &timeout, 0);
56 Timing::CheckEvents();
58 Input::HandleSelect(rfds);
59 IPC::HandleSelect(rfds);