20#ifndef ULTRALIGHT_CAPI_BUFFER_H
21#define ULTRALIGHT_CAPI_BUFFER_H
void(* ulDestroyBufferCallback)(void *user_data, void *data)
Definition CAPI_Buffer.h:29
ULExport size_t ulBufferGetSize(ULBuffer buffer)
Get the size in bytes.
ULExport ULBuffer ulCreateBuffer(void *data, size_t size, void *user_data, ulDestroyBufferCallback destruction_callback)
Create a Buffer from existing, user-owned data without any copies.
ULExport void * ulBufferGetData(ULBuffer buffer)
Get a pointer to the raw byte data.
ULExport void * ulBufferGetUserData(ULBuffer buffer)
Get the user data associated with this Buffer, if any.
ULExport ULBuffer ulCreateBufferFromCopy(const void *data, size_t size)
Create a Buffer from existing data, a deep copy of data will be made.
ULExport bool ulBufferOwnsData(ULBuffer buffer)
Check whether this Buffer owns its own data (Buffer was created via ulCreateBufferFromCopy).
ULExport void ulDestroyBuffer(ULBuffer buffer)
Destroy buffer (you should destroy any buffers you explicitly Create).
Various defines and utility functions for the C API.
#define ULExport
Definition CAPI_Defines.h:38
struct C_Buffer * ULBuffer
Definition CAPI_Defines.h:66