docs
Loading...
Searching...
No Matches
ULSurfaceDefinition

#include <Ultralight/CAPI/CAPI_Surface.h>

Overview

User-defined surface interface.

You should implement each of these callbacks, then pass an instance of this struct containing your callbacks to ulPlatformSetSurfaceDefinition().

Zero-initialize the struct (ULSurfaceDefinition def = {0};) so a callback you leave unset reads as NULL.

Public Attributes

ULSurfaceDefinitionCreateCallback create
 Callback invoked when a Surface is created.
ULSurfaceDefinitionDestroyCallback destroy
 Callback invoked when a Surface is destroyed.
ULSurfaceDefinitionGetWidthCallback get_width
 Callback invoked to get the Surface width in pixels.
ULSurfaceDefinitionGetHeightCallback get_height
 Callback invoked to get the Surface height in pixels.
ULSurfaceDefinitionGetRowBytesCallback get_row_bytes
 Callback invoked to get the number of bytes per row.
ULSurfaceDefinitionGetSizeCallback get_size
 Callback invoked to get the Surface size in bytes.
ULSurfaceDefinitionLockPixelsCallback lock_pixels
 Callback invoked to lock the pixel buffer for reading/writing.
ULSurfaceDefinitionUnlockPixelsCallback unlock_pixels
 Callback invoked to unlock the pixel buffer.
ULSurfaceDefinitionResizeCallback resize
 Callback invoked to resize the pixel buffer.
ULSurfaceDefinitionScrollCallback scroll
 Callback invoked to shift a rectangle of pixels (may be NULL, the library then shifts the locked buffer itself and reports the whole rectangle dirty).

Member Data Documentation

◆ create

Callback invoked when a Surface is created.

◆ destroy

Callback invoked when a Surface is destroyed.

◆ get_height

Callback invoked to get the Surface height in pixels.

◆ get_row_bytes

Callback invoked to get the number of bytes per row.

◆ get_size

Callback invoked to get the Surface size in bytes.

◆ get_width

Callback invoked to get the Surface width in pixels.

◆ lock_pixels

Callback invoked to lock the pixel buffer for reading/writing.

◆ resize

Callback invoked to resize the pixel buffer.

◆ scroll

Callback invoked to shift a rectangle of pixels (may be NULL, the library then shifts the locked buffer itself and reports the whole rectangle dirty).

◆ unlock_pixels

Callback invoked to unlock the pixel buffer.


The documentation for this struct was generated from the following file: