Scoop API

scoop:scoop.surface:0.1.0

src/shared/host/content.scoop

Selected production source · src/shared/host/content.scoop

1package scoop.surface
3/** A root owned by one SurfaceWindow, closed before its renderer and native lease. */
4public interface SurfaceContent: Closeable {
5 public fun paint(frame: FrameContext)
6 public fun onFrameComplete(frame: FrameCompletion) {}
7}
9internal class PainterContent(private val painter: (FrameContext) -> Unit): SurfaceContent {
10 public override fun paint(frame: FrameContext) {
11 painter(frame)
12 }
13 public override fun close() {}