public function runDesktop() { c::set("cwt:messagequeue", new FifoQueue()); $running = true; while ($running) { $this->cwtDesktop->onTick(); $this->cwtDesktop->onDraw(); $time = date(\DateTime::RFC822); \Cherry\Expm\Cwt\Context::getInstance()->textAt(2, 2, "Hello World! {$time}"); ncurses_refresh(); \usleep(10000); } }
private final function postMessage($type, Widget $dest, array $data) { $queue = c::get("cwt:messagequeue"); $queue->push(new Message($type, $this, $dest, $data)); }