SkiaLayer

expect open class SkiaLayer

Generic layer for Skiko rendering.

actual open class SkiaLayer
actual open class SkiaLayer

Provides a way to render the content and to receive the input events. Rendering and events processing should be implemented in renderDelegate.

SkikoLayer needs to be initialized with HTMLCanvasElement instance using attachTo method.

actual open class SkiaLayer
actual open class SkiaLayer

SkiaLayer implementation for macOS. Supports only GraphicsApi.METAL

Constructors

Link copied to clipboard
constructor()
constructor()
constructor()
constructor()

Properties

Link copied to clipboard
expect val component: Any?

Underlying platform component.

actual val component: Any?
actual val component: Any?
actual val component: Any?
actual val component: Any?
Link copied to clipboard
expect val contentScale: Float

Current content scale.

actual val contentScale: Float
actual val contentScale: Float

See https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio

actual val contentScale: Float
actual val contentScale: Float

The scale factor of NSWindow https://developer.apple.com/documentation/appkit/nswindow/1419459-backingscalefactor

Link copied to clipboard
expect var fullscreen: Boolean

If rendering is full screen.

actual var fullscreen: Boolean
actual var fullscreen: Boolean

Fullscreen is not supported

actual var fullscreen: Boolean
actual var fullscreen: Boolean

Fullscreen is not supported

Link copied to clipboard
Link copied to clipboard
lateinit var nsView: <Error class: unknown class>

Underlying NSView

Link copied to clipboard

Pixel geometry corresponding to graphics device which renders this layer

actual val pixelGeometry: PixelGeometry
actual val pixelGeometry: PixelGeometry
actual val pixelGeometry: PixelGeometry
actual val pixelGeometry: PixelGeometry
Link copied to clipboard

Current graphics API used for rendering.

actual var renderApi: GraphicsApi
actual var renderApi: GraphicsApi

GraphicsApi.WEBGL is the only supported renderApi for k/js (browser).

actual var renderApi: GraphicsApi
actual var renderApi: GraphicsApi

GraphicsApi.METAL is the only GraphicsApi supported for macOS. Setter throws an IllegalArgumentException if the value is not GraphicsApi.METAL.

Link copied to clipboard

Current view used for rendering.

actual var renderDelegate: SkikoRenderDelegate?
actual var renderDelegate: SkikoRenderDelegate?

An implementation of SkikoRenderDelegate with content rendering and event processing logic.

actual var renderDelegate: SkikoRenderDelegate?
actual var renderDelegate: SkikoRenderDelegate?

Implements rendering logic and events processing.

Link copied to clipboard
expect var transparency: Boolean

If transparency is enabled.

actual var transparency: Boolean
actual var transparency: Boolean

Transparency is not supported

actual var transparency: Boolean
actual var transparency: Boolean

Transparency is not supported on macOS native.

Link copied to clipboard

Functions

Link copied to clipboard
expect fun attachTo(container: Any)

Attach this SkikoRenderDelegate to platform container. Actual type of attach container is platform-specific.

actual fun attachTo(container: Any)
actual fun attachTo(container: Any)
actual fun attachTo(container: Any)
actual fun attachTo(container: Any)
Link copied to clipboard
expect fun detach()

Detach this SkikoRenderDelegate from platform container.

actual fun detach()
actual fun detach()
actual fun detach()
actual fun detach()
Link copied to clipboard
fun SkiaLayer.disableTitleBar(customHeaderHeight: Float)

Disable showing window title bar.

Link copied to clipboard
Link copied to clipboard
expect fun needRedraw()

Force redraw.

actual fun needRedraw()
actual fun needRedraw()

Schedules a drawFrame to the appropriate moment.

actual fun needRedraw()
actual fun needRedraw()

Schedules a frame to an appropriate moment.