Пример #1
0
 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);
     }
 }
Пример #2
0
 private final function postMessage($type, Widget $dest, array $data)
 {
     $queue = c::get("cwt:messagequeue");
     $queue->push(new Message($type, $this, $dest, $data));
 }