-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibWrapper.h
More file actions
28 lines (23 loc) · 800 Bytes
/
LibWrapper.h
File metadata and controls
28 lines (23 loc) · 800 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
#pragma once
#include <string>
union SDL_Event;
typedef void (*dfhooks_init_fn)();
typedef void (*dfhooks_shutdown_fn)();
typedef void (*dfhooks_update_fn)();
typedef void (*dfhooks_prerender_fn)();
typedef bool (*dfhooks_sdl_event_fn)(SDL_Event* event);
typedef void (*dfhooks_sdl_loop_fn)();
typedef bool (*dfhooks_ncurses_key_fn)(int key);
struct LibWrapper {
void* handle = nullptr;
int32_t priority = 0;
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::string& fname);
virtual ~LibWrapper();
};