libGumball 0.0.1
C23-Based, libGimbal-powered UI Library
Loading...
Searching...
No Matches
gumball_texture.h
Go to the documentation of this file.
1#ifndef GUM_TEXTURE_H
2#define GUM_TEXTURE_H
3
4// View this file's documentation online: https://libgumball.psyops.studio/gumball__texture_8h.html
5
6/*! \file
7 * \ref GUM_Texture "GUM_Texture data structure and hierarchy graph"
8 * \ingroup types
9 *
10 * GUM_Texture is the backend-agnostic type that represents a texture
11 *
12 * \author 2025 Agustín Bellagamba
13 * \copyright MIT License
14*/
15
16#include <gimbal/gimbal_meta.h>
17#include <gumball/types/gumball_vector2.h>
18#include <gumball/ifaces/gumball_iresource.h>
19
20/*! \name Type System
21 * \brief Type UUID and cast operators
22 * @{
23*/
24#define GUM_TEXTURE_TYPE (GBL_TYPEID (GUM_Texture))
25#define GUM_TEXTURE(self) (GBL_CAST (GUM_Texture, self))
26#define GUM_TEXTURE_CLASS(klass) (GBL_CLASS_CAST (GUM_Texture, klass))
27#define GUM_TEXTURE_CLASSOF(self) (GBL_CLASSOF (GUM_Texture, self))
28//! @}
29
30#define GBL_SELF_TYPE GUM_Texture
31
32GBL_DECLS_BEGIN
33GBL_FORWARD_DECLARE_STRUCT(GUM_Texture);
34
35/*!
36 * \struct GUM_TextureClass
37 * \extends GblBoxClass
38 * \implements GUM_IResource
39 * \brief GUM_Texture structure
40 *
41 * GUM_TextureClass derives from GblBoxClass, adding nothing new.
42 * It also implements the GUM_IResource interface.
43*/
44GBL_CLASS_DERIVE_EMPTY(GUM_Texture, GblBox, GUM_IResource)
45
46/*!
47 * \class GUM_Texture
48 * \extends GblBox
49 * \brief Backend agnostic texture type
50*/
51GBL_INSTANCE_DERIVE_EMPTY(GUM_Texture, GblBox)
52
53//! \cond
54GblType GUM_Texture_type(void);
55//! \endcond
56
57//! Returns the size of the texture as a GUM_Vector2
59
60//! Returns a void pointer to the underlying backend specific texture
62
63GBL_DECLS_END
64
65#undef GBL_SELF_TYPE
66
67#endif // GUM_TEXTURE_H
GblBox GUM_Vector2 GUM_Texture_size(GBL_SELF)
Returns the size of the texture as a GUM_Vector2.
void * GUM_Texture_getTexture(GBL_SELF)
Returns a void pointer to the underlying backend specific texture.