/**
 * @file events_context.h
 * @author Piotr Krygier (piotrkrygier@everyonencancode.xyz)
 * @brief Events context for Red Scarf Engine
 * @version 0.1
 * @date 2026-03-02
 *
 * @copyright Copyright (c) 2026
 *
 */

#ifndef EVENT_CONTEXT_H_
#define EVENT_CONTEXT_H_

#include "SDL3/SDL_mouse.h"
#include "utilities/commons.h"

enum EVENT_HANDLER {
    EVENT_HANDLER_QUIT,
    EVENT_HANDLER_MOUSE,
    EVENT_HANDLER_LAST
};

enum EVENT_SHOULD_STOP_ENGINE {
    EVENT_SHOULD_STOP_ENGINE_FALSE,
    EVENT_SHOULD_STOP_ENGINE_TRUE
};

struct mouse_event_data_t
{
    float x_pos;
    float y_pos;
    SDL_MouseButtonFlags mouse_buttons;
};

typedef rse_err_t (*rse_event_handler_t)(void*);

struct events_context_t
{
    enum EVENT_SHOULD_STOP_ENGINE should_stop;
    rse_event_handler_t event_handlers[EVENT_HANDLER_LAST];
};

#endif /* EVENT_CONTEXT_H_ */
