def view(x, y, width, height)
      view = View.new(self, x, y, width, height)

      return view unless block_given?

      begin
        yield(view)
      ensure
        view.sync
      end
      nil
    end
def view(x, y, width, height)
      view = View.new(self, x, y, width, height)

      return view unless block_given?

      begin
        yield(view)
      ensure
        view.sync
      end
      nil
    end
Construct a view. If a block is present, yield and pass the view
 object, otherwise return the view object.