libGumball 0.0.1
C23-Based, libGimbal-powered UI Library
Loading...
Searching...
No Matches
gumball_iresource.h File Reference

Go to the source code of this file.

Macros

Type system

Type UUID and cast operators

#define GUM_IRESOURCE_TYPE
#define GUM_IRESOURCE(instance)
#define GUM_IRESOURCE_CLASS(klass)
#define GUM_IRESOURCE_CLASSOF(instance)

Functions

GBL_EXPORT GUM_IResourceGUM_IResource_ref (GBL_SELF) GBL_NOEXCEPT
GBL_EXPORT GblRefCount GUM_IResource_unref (GBL_SELF) GBL_NOEXCEPT
GBL_EXPORT void * GUM_IResource_data (GBL_CSELF) GBL_NOEXCEPT
GBL_EXPORT void GUM_IResource_setData (GBL_SELF, void *pValue) GBL_NOEXCEPT

Detailed Description

GUM_IResource data structure and hierarchy graph

GUM_IResource is the base interface for all resources in libGumball, such as textures and fonts.

Macro Definition Documentation

◆ GUM_IRESOURCE_TYPE

#define GUM_IRESOURCE_TYPE

Returns the GUM_IResource Type UUID.

◆ GUM_IRESOURCE

#define GUM_IRESOURCE ( instance)

Casts an instance of a compatible element to a GUM_IResource.

◆ GUM_IRESOURCE_CLASS

#define GUM_IRESOURCE_CLASS ( klass)

Casts an class of a compatible element to a GUM_IResource.

◆ GUM_IRESOURCE_CLASSOF

#define GUM_IRESOURCE_CLASSOF ( instance)

Casts an instance of a compatible element to a GUM_IResource.

Function Documentation

◆ GUM_IResource_ref()

GBL_EXPORT GUM_IResource * GUM_IResource_ref ( GBL_SELF )

Returns a new reference to a GUM_IResource, increasing the reference count.

◆ GUM_IResource_unref()

GBL_EXPORT GblRefCount GUM_IResource_unref ( GBL_SELF )

Decrements the reference count for the passed GUM_IResource.

Note
The GUM_Manager holds a reference to the resource, so to free the resource, call GUM_Manager_unload()

◆ GUM_IResource_data()

GBL_EXPORT void * GUM_IResource_data ( GBL_CSELF )

Returns the backend-specific data of the resource as a void*.

◆ GUM_IResource_setData()

GBL_EXPORT void GUM_IResource_setData ( GBL_SELF ,
void * pValue )

Sets the backend-specific data of the resource to the passed void*.

Note
Don't use this function unless you know what you're doing!