SurfaceControlCallback


interface SurfaceControlCallback


A host-side interface for reporting to an off-process renderer events affecting the android.view.SurfaceView it renders content on.

Summary

Public functions

Unit
onError(msg: String, e: Throwable)

Notifies when there is an error.

Unit

Notifies when android.view.SurfaceView receives a new key event.

Unit

Notifies when android.view.SurfaceView receives a new touch event.

Unit
onWindowFocusChanged(hasFocus: Boolean, isInTouchMode: Boolean)

Notifies when the window focus changes.

Unit

Notifies when the underlying surface changes.

Public functions

onError

Added in 1.1.0
fun onError(msg: String, e: Throwable): Unit

Notifies when there is an error. Provide default implementation for easier transition.

onKeyEvent

Added in 1.1.0
fun onKeyEvent(event: KeyEvent): Unit

Notifies when android.view.SurfaceView receives a new key event.

onTouchEvent

Added in 1.1.0
fun onTouchEvent(event: MotionEvent): Unit

Notifies when android.view.SurfaceView receives a new touch event.

onWindowFocusChanged

Added in 1.1.0
fun onWindowFocusChanged(hasFocus: Boolean, isInTouchMode: Boolean): Unit

Notifies when the window focus changes.

setSurfaceWrapper

Added in 1.1.0
fun setSurfaceWrapper(surfaceWrapper: SurfaceWrapper): Unit

Notifies when the underlying surface changes.