コード例 #1
0
ファイル: cwtapplication.php プロジェクト: noccy80/cherryphp
 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
ファイル: widget.php プロジェクト: noccy80/cherryphp
 private final function postMessage($type, Widget $dest, array $data)
 {
     $queue = c::get("cwt:messagequeue");
     $queue->push(new Message($type, $this, $dest, $data));
 }