Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
Event.hpp File Reference
#include <Core/Core.hpp>

Go to the source code of this file.

Classes

class  Event
 

Macros

#define ENIGMA_EVENT_H
 
#define EVENT_CLASS_TYPE(type)
 
#define EVENT_CLASS_CATEGORY(category)    virtual std::uint32_t GetCategoryFlags() const override { return static_cast<std::uint32_t>(category); }
 

Enumerations

enum class  EventType : std::uint32_t {
  NONE = 0 , WINDOW_CLOSE , WINDOW_RESIZE , WINDOW_FOCUS ,
  WINDOW_LOST_FOCUS , WINDOW_MOVED , WINDOW_MAXIMIZED , WINDOW_FILE_DROP ,
  FRAME_BUFFER_RESIZE , APP_TICK , APP_UPDATE , APP_RENDER ,
  KEY_PRESSED , KEY_RELEASED , KEY_TYPED , MOUSE_BUTTON_PRESSED ,
  MOUSE_BUTTON_RELEASED , MOUSE_MOTION , MOUSE_WHEEL , JOYSTICK_CONNECTED ,
  JOYSTICK_DISCONNECTED
}
 
enum class  EventCategory : std::uint32_t {
  NONE = 0 , APPLICATION = BIT(0) , INPUT = BIT(1) , KEYBOARD = BIT(2) ,
  MOUSE = BIT(3) , MOUSE_BUTTON = BIT(4) , JOYSTICK = BIT(5)
}
 

Functions

std::uint32_t operator| (const EventType a, const EventType b)
 
std::uint32_t operator& (const EventType a, const EventType b)
 
std::uint32_t operator| (const EventCategory a, const EventCategory b)
 
std::uint32_t operator& (const EventCategory a, const EventCategory b)
 
std::ostream & operator<< (std::ostream &os, const Event &e)
 

Macro Definition Documentation

◆ ENIGMA_EVENT_H

#define ENIGMA_EVENT_H

Definition at line 3 of file Event.hpp.

◆ EVENT_CLASS_CATEGORY

#define EVENT_CLASS_CATEGORY (   category)     virtual std::uint32_t GetCategoryFlags() const override { return static_cast<std::uint32_t>(category); }

Definition at line 63 of file Event.hpp.

◆ EVENT_CLASS_TYPE

#define EVENT_CLASS_TYPE (   type)
Value:
static EventType GetStaticType() { return type; } \
virtual EventType GetEventType() const override { return GetStaticType(); } \
virtual const char *GetName() const override { return #type; }
EventType
Definition: Event.hpp:9

Definition at line 59 of file Event.hpp.

Enumeration Type Documentation

◆ EventCategory

enum EventCategory : std::uint32_t
strong
Enumerator
NONE 
APPLICATION 
INPUT 
KEYBOARD 
MOUSE 
MOUSE_BUTTON 
JOYSTICK 

Definition at line 47 of file Event.hpp.

◆ EventType

enum EventType : std::uint32_t
strong
Enumerator
NONE 
WINDOW_CLOSE 
WINDOW_RESIZE 
WINDOW_FOCUS 
WINDOW_LOST_FOCUS 
WINDOW_MOVED 
WINDOW_MAXIMIZED 
WINDOW_FILE_DROP 
FRAME_BUFFER_RESIZE 
APP_TICK 
APP_UPDATE 
APP_RENDER 
KEY_PRESSED 
KEY_RELEASED 
KEY_TYPED 
MOUSE_BUTTON_PRESSED 
MOUSE_BUTTON_RELEASED 
MOUSE_MOTION 
MOUSE_WHEEL 
JOYSTICK_CONNECTED 
JOYSTICK_DISCONNECTED 

Definition at line 9 of file Event.hpp.

Function Documentation

◆ operator&() [1/2]

std::uint32_t operator& ( const EventCategory  a,
const EventCategory  b 
)
inline

Definition at line 57 of file Event.hpp.

◆ operator&() [2/2]

std::uint32_t operator& ( const EventType  a,
const EventType  b 
)
inline

Definition at line 45 of file Event.hpp.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const Event e 
)
inline

Definition at line 85 of file Event.hpp.

◆ operator|() [1/2]

std::uint32_t operator| ( const EventCategory  a,
const EventCategory  b 
)
inline

Definition at line 56 of file Event.hpp.

◆ operator|() [2/2]

std::uint32_t operator| ( const EventType  a,
const EventType  b 
)
inline

Definition at line 44 of file Event.hpp.