7#include <unordered_map>
25 std::unordered_map<
SystemEvent, std::vector<BackendCallback>>*
Interface for backend system implementations handling low-level events.
Definition i_backend_system.h:20
virtual float frames_per_second() const =0
Retrieves the frames per second (FPS) based on the updated frame time.
virtual void set_cursor_to_wait()=0
Sets the cursor to the wait (hourglass) shape.
double freq_
Definition i_backend_system.h:102
uint64_t last_
Definition i_backend_system.h:101
float accumulated_time_
Definition i_backend_system.h:107
virtual float delta_time() const =0
Retrieves the time elapsed since the last frame.
virtual std::string get_clipboard_text()=0
Sets the current text to the system clipboard.
virtual void poll_events()=0
Polls for new events from the backend system.
virtual ~IBackendSystem()=default
virtual void update_frame_time(float time_scale)=0
Updates the frame time based on the elapsed time since the last frame.
virtual void set_cursor_to_crosshair()=0
Sets the cursor to the crosshair shape.
int frame_count_
Definition i_backend_system.h:105
virtual void set_cursor_to_hand()=0
Sets the cursor to the hand shape.
float fps_
Definition i_backend_system.h:106
virtual void initialize_listeners(std::unordered_map< SystemEvent, std::vector< BackendCallback > > *listeners)=0
virtual void init_frame_timer()=0
Initializes the internal timer for frame time calculation.
virtual void set_cursor_to_ibeam()=0
Sets the cursor to the I-beam shape.
float delta_time_
Definition i_backend_system.h:103
virtual void set_cursor_to_arrow()=0
Sets the cursor to the standard arrow shape.
std::function< void(void *event_data)> BackendCallback
Definition i_backend_system.h:10
SystemEvent
Definition system_event.h:5