summaryrefslogtreecommitdiffstats
path: root/include/event.hpp
blob: b992852c9fa7d49dc9cc08ee9c9b96768ef00034 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <optional>

extern "C" {
#include <SDL2/SDL_events.h>
}

namespace wrapsdl2 {
    class event {
    public:
        using type = SDL_EventType;

        event(const SDL_Event& e);

        SDL_Event& sdl() { return m_event; }

    private:
        SDL_Event m_event;
    };


    std::optional<event> poll_event();
}