-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibWrapper.h
More file actions
31 lines (26 loc) · 989 Bytes
/
LibWrapper.h
File metadata and controls
31 lines (26 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include <string>
#include <filesystem>
union SDL_Event;
using dfhooks_preinit_fn = auto (std::filesystem::path) -> void;
using dfhooks_init_fn = auto () -> void;
using dfhooks_shutdown_fn = auto () -> void;
using dfhooks_update_fn = auto () -> void;
using dfhooks_prerender_fn = auto () -> void;
using dfhooks_sdl_event_fn = auto (SDL_Event* event) -> bool;
using dfhooks_sdl_loop_fn = auto () -> void;
using dfhooks_ncurses_key_fn = auto (int key) -> bool;
struct LibWrapper {
void* handle = nullptr;
int32_t priority = 0;
dfhooks_preinit_fn* preinit = nullptr;
dfhooks_init_fn* init = nullptr;
dfhooks_shutdown_fn* shutdown = nullptr;
dfhooks_update_fn* update = nullptr;
dfhooks_prerender_fn* prerender = nullptr;
dfhooks_sdl_event_fn* sdl_event = nullptr;
dfhooks_sdl_loop_fn* sdl_loop = nullptr;
dfhooks_ncurses_key_fn* ncurses_key = nullptr;
LibWrapper(const std::filesystem::path& fname);
virtual ~LibWrapper();
};