8#ifndef ULTRALIGHT_CAPI_SURFACE_H
9#define ULTRALIGHT_CAPI_SURFACE_H
127typedef void* (*ULSurfaceDefinitionCreateCallback)(
unsigned int width,
unsigned int height);
172typedef void* (*ULSurfaceDefinitionLockPixelsCallback)(
void* user_data);
192 unsigned int height);
struct C_Surface * ULBitmapSurface
Definition CAPI_Defines.h:63
#define ULExport
Definition CAPI_Defines.h:27
struct C_Surface * ULSurface
Definition CAPI_Defines.h:62
struct C_Bitmap * ULBitmap
Definition CAPI_Defines.h:53
ULExport ULBitmap ulBitmapSurfaceGetBitmap(ULBitmapSurface surface)
Get the underlying Bitmap from the default Surface.
ULExport unsigned int ulSurfaceGetWidth(ULSurface surface)
Width (in pixels).
ULExport void ulSurfaceUnlockPixels(ULSurface surface)
Unlock the pixel buffer.
unsigned int(* ULSurfaceDefinitionGetRowBytesCallback)(void *user_data)
The callback invoked when a Surface's row bytes is requested.
Definition CAPI_Surface.h:157
ULExport void ulSurfaceResize(ULSurface surface, unsigned int width, unsigned int height)
Resize the pixel buffer to a certain width and height (both in pixels).
ULExport void * ulSurfaceLockPixels(ULSurface surface)
Lock the pixel buffer and get a pointer to the beginning of the data for reading/writing.
ULExport size_t ulSurfaceGetSize(ULSurface surface)
Size in bytes.
ULExport ULIntRect ulSurfaceGetDirtyBounds(ULSurface surface)
Get the dirty bounds.
ULExport unsigned int ulSurfaceGetRowBytes(ULSurface surface)
Number of bytes between rows (usually width * 4)
ULExport void ulSurfaceClearDirtyBounds(ULSurface surface)
Clear the dirty bounds.
ULExport unsigned int ulSurfaceGetHeight(ULSurface surface)
Height (in pixels).
void(* ULSurfaceDefinitionResizeCallback)(void *user_data, unsigned int width, unsigned int height)
The callback invoked when a Surface is requested to be resized to a certain width/height.
Definition CAPI_Surface.h:191
void *(* ULSurfaceDefinitionCreateCallback)(unsigned int width, unsigned int height)
The callback invoked when a Surface is created.
Definition CAPI_Surface.h:127
unsigned int(* ULSurfaceDefinitionGetWidthCallback)(void *user_data)
The callback invoked when a Surface's width (in pixels) is requested.
Definition CAPI_Surface.h:141
void(* ULSurfaceDefinitionDestroyCallback)(void *user_data)
The callback invoked when a Surface is destroyed.
Definition CAPI_Surface.h:134
ULExport void ulSurfaceSetDirtyBounds(ULSurface surface, ULIntRect bounds)
Set the dirty bounds to a certain value.
void(* ULSurfaceDefinitionUnlockPixelsCallback)(void *user_data)
The callback invoked when a Surface's pixel buffer is requested to be unlocked after previously being...
Definition CAPI_Surface.h:180
void *(* ULSurfaceDefinitionLockPixelsCallback)(void *user_data)
The callback invoked when a Surface's pixel buffer is requested to be locked for reading/writing (sho...
Definition CAPI_Surface.h:172
ULExport void * ulSurfaceGetUserData(ULSurface surface)
Get the underlying user data pointer (this is only valid if you have set a custom surface implementat...
size_t(* ULSurfaceDefinitionGetSizeCallback)(void *user_data)
The callback invoked when a Surface's size (in bytes) is requested.
Definition CAPI_Surface.h:164
unsigned int(* ULSurfaceDefinitionGetHeightCallback)(void *user_data)
The callback invoked when a Surface's height (in pixels) is requested.
Definition CAPI_Surface.h:148
Definition CAPI_Defines.h:242
Definition CAPI_Surface.h:194
ULSurfaceDefinitionGetSizeCallback get_size
Definition CAPI_Surface.h:200
ULSurfaceDefinitionGetRowBytesCallback get_row_bytes
Definition CAPI_Surface.h:199
ULSurfaceDefinitionUnlockPixelsCallback unlock_pixels
Definition CAPI_Surface.h:202
ULSurfaceDefinitionResizeCallback resize
Definition CAPI_Surface.h:203
ULSurfaceDefinitionLockPixelsCallback lock_pixels
Definition CAPI_Surface.h:201
ULSurfaceDefinitionGetWidthCallback get_width
Definition CAPI_Surface.h:197
ULSurfaceDefinitionDestroyCallback destroy
Definition CAPI_Surface.h:196
ULSurfaceDefinitionGetHeightCallback get_height
Definition CAPI_Surface.h:198
ULSurfaceDefinitionCreateCallback create
Definition CAPI_Surface.h:195