|
Ultralight C API 2.0.0
|
#include <Ultralight/CAPI/CAPI_Surface.h>
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). | |
Callback invoked when a Surface is created.
Callback invoked when a Surface is destroyed.
| 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.
| ULSurfaceDefinitionGetWidthCallback get_width |
Callback invoked to get the Surface width in pixels.
| ULSurfaceDefinitionLockPixelsCallback lock_pixels |
Callback invoked to lock the pixel buffer for reading/writing.
Callback invoked to resize the pixel buffer.
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).
| ULSurfaceDefinitionUnlockPixelsCallback unlock_pixels |
Callback invoked to unlock the pixel buffer.