libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gimbal_event.h File Reference

Go to the source code of this file.

Data Structures

struct  GblEventClass
 
struct  GblEvent
 

Macros

Type System

Type UUID and cast operators

#define GBL_EVENT_TYPE
 
#define GBL_EVENT(self)
 
#define GBL_EVENT_CLASS(klass)
 
#define GBL_EVENT_CLASSOF(self)
 

Typedefs

typedef GblEnum GBL_EVENT_STATE
 

Enumerations

enum  GBL_EVENT_STATE
 

Functions

GblType GblEvent_type (void)
 
GblEventGblEvent_create (GblType type)
 
GBL_RESULT GblEvent_construct (GblEvent *pSelf, GblType type)
 
GBL_EVENT_STATE GblEvent_state (const GblEvent *pSelf)
 
GBL_RESULT GblEvent_accept (GblEvent *pSelf)
 
void GblEvent_reset (GblEvent *pSelf)
 

Detailed Description

GblEvent base type and basic API.

Todo:
  • maybe give them timestamps?
  • maybe give them virtuals for onAccept/onReject/onReset?
  • maybe give them source objects?
  • extra extended creation args + default values
Author
2023 Falco Girgis

Definition in file gimbal_event.h.

Macro Definition Documentation

◆ GBL_EVENT_TYPE

#define GBL_EVENT_TYPE

Returns the GblType for GblEvent.

Definition at line 24 of file gimbal_event.h.

◆ GBL_EVENT

#define GBL_EVENT (   self)

Casts a GblInstance to GblEvent.

Definition at line 25 of file gimbal_event.h.

◆ GBL_EVENT_CLASS

#define GBL_EVENT_CLASS (   klass)

Casts a GblClass to GblEventClass.

Definition at line 26 of file gimbal_event.h.

◆ GBL_EVENT_CLASSOF

#define GBL_EVENT_CLASSOF (   self)

Gets a GblEventClass from GblInstance.

Definition at line 27 of file gimbal_event.h.

Typedef Documentation

◆ GBL_EVENT_STATE

typedef GblEnum GBL_EVENT_STATE

Definition at line 34 of file gimbal_event.h.

Enumeration Type Documentation

◆ GBL_EVENT_STATE

enum GBL_EVENT_STATE

Definition at line 34 of file gimbal_event.h.

34 {
35 GBL_EVENT_STATE_PENDING,
36 GBL_EVENT_STATE_ACCEPTED,
37 GBL_EVENT_STATE_IGNORED
38};