libGumball 0.0.1
C23-Based, libGimbal-powered UI Library
Loading...
Searching...
No Matches
gumball_event.h
Go to the documentation of this file.
1#ifndef GUM_EVENT_H
2#define GUM_EVENT_H
3
4// View this file's documentation online: https://libgumball.psyops.studio/gumball__event_8h.html
5
6/*! \file
7 * \ingroup types
8 *
9 * GUM_Event is the base event type used in libGumball.
10 *
11 * \author 2025 Agustín Bellagamba
12 * \copyright MIT License
13*/
14
15#include <gimbal/gimbal_meta.h>
16
17/*! \name Type System
18 * \brief Type UUID and Cast Operators
19 * @{
20*/
21#define GUM_EVENT_TYPE (GBL_TYPEID(GUM_Event)) //!< Returns the GUM_Event Type UUID
22#define GUM_EVENT(self) (GBL_CAST(GUM_Event, self)) //!< Casts an instance of a compatible element to a GUM_Event
23#define GUM_EVENT_CLASS(klass) (GBL_CLASS_CAST(GUM_Event, klass)) //!< Casts an class of a compatible element to a GUM_Event
24#define GUM_EVENT_CLASSOF(self) (GBL_CLASSOF(GUM_Event, self)) //!< Casts an instance of a compatible element to a GUM_Event
25//! @}
26
27#define GBL_SELF_TYPE GUM_Event
28
29GBL_DECLS_BEGIN
30GBL_FORWARD_DECLARE_STRUCT(GUM_Event);
31
32/*! \struct GUM_EventClass
33 * \extends GblEventClass
34 * \brief GUM_Event structure
35 *
36 * GUM_EventClass derives from GblEvent,
37 * adding nothing new.
38*/
39GBL_CLASS_DERIVE_EMPTY(GUM_Event, GblEvent)
40
41/*!
42 * \class GUM_Event
43 * \extends GblEvent
44 * \brief Basic event type
45 *
46*/
47GBL_INSTANCE_DERIVE_EMPTY(GUM_Event, GblEvent)
48
49//! \cond
50GblType GUM_Event_type(void);
51//! \endcond
52
53GBL_DECLS_END
54#undef GBL_SELF_TYPE
55
56#endif // GUM_EVENT_H