#pragma once

#include <memory>

class Keyboard;
class MouseEvent;
class KeyboardEvent;
class PaintEvent;

struct xcb_key_press_event_t;
struct xcb_button_press_event_t;

class XcbEventInterface
{
public:

    static std::unique_ptr<XcbEventInterface> Create();

    std::unique_ptr<KeyboardEvent> ConvertKeyPress(xcb_key_press_event_t* event, Keyboard* keyboard) const;

    std::unique_ptr<KeyboardEvent> ConvertKeyRelease(xcb_key_press_event_t* event, Keyboard* keyboard) const;

    std::unique_ptr<MouseEvent> ConvertButtonPress(xcb_button_press_event_t* event) const;

    std::unique_ptr<MouseEvent> ConvertButtonRelease(xcb_button_press_event_t* event) const;
};

using XcbEventInterfacePtr = std::unique_ptr<XcbEventInterface>;
