libGumball 0.0.2
C23-Based, libGimbal-powered UI Library
Loading...
Searching...
No Matches
gumball_event_key.h
Go to the documentation of this file.
1#ifndef GUM_EVENT_KEY_H
2#define GUM_EVENT_KEY_H
3
4// View this file's documentation online: https://libgumball.psyops.studio/gumball__event__key_8h.html
5
6/*! \file
7 * \ingroup events
8 *
9 * Event type for key events
10 *
11 * \author 2025 Agustín Bellagamba
12 * \copyright MIT License
13*/
14
16
17/*! \name Type System
18 * \brief Type UUID and Cast Operators
19 * @{
20*/
21#define GUM_EVENT_KEY_TYPE (GBL_TYPEID (GUM_Event_Key)) //!< Returns the GUM_Event_Key Type UUID
22#define GUM_EVENT_KEY(self) (GBL_CAST (GUM_Event_Key, self)) //!< Casts an instance of a compatible event to a GUM_Event_Key
23#define GUM_EVENT_KEY_CLASS(klass) (GBL_CLASS_CAST (GUM_Event_Key, klass)) //!< Casts a class of a compatible event to a GUM_Event_KeyClass
24#define GUM_EVENT_KEY_CLASSOF(self) (GBL_CLASSOF (GUM_Event_Key, self)) //!< Casts an instance of a compatible event to a GUM_Event_KeyClass
25//! @}
26
27#define GBL_SELF_TYPE GUM_Event_Key
28
29GBL_DECLS_BEGIN
30GBL_FORWARD_DECLARE_STRUCT(GUM_Event_Key);
31
32/*! \struct GUM_Event_KeyClass
33 * \extends GUM_EventClass
34 * \brief GUM_Event_Key structure
35 *
36 * GUM_Event_KeyClass derives from GUM_EventClass, adding nothing new.
37*/
38GBL_CLASS_DERIVE_EMPTY(GUM_Event_Key, GUM_Event_Input);
39
40/*!
41 * \class GUM_Event_Key
42 * \extends GUM_Event
43 * \brief Key event
44 *
45 * GUM_Event_Key represents any key event, such as pressing or releasing a key.
46 *
47*/
48GBL_INSTANCE_DERIVE(GUM_Event_Key, GUM_Event_Input)
49 // TODO: add flag modifier here (such as holding shift)
50GBL_INSTANCE_END
51
52#endif
GBL_INSTANCE_DERIVE(GUM_Event_Button, GUM_Event_Input) uint8_t controllerId
ID of the controller that generated the event.
GUM_Event_Button class.