Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion depends/dfhooks
10 changes: 9 additions & 1 deletion library/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ DFhackCExport void dfhooks_update() {
DFhackCExport void dfhooks_prerender() {
if (disabled)
return;
// TODO: render overlay widgets that are not attached to a viewscreen
// TODO: potentially render overlay elements that are not attached to a viewscreen
}

// called from the main thread for each SDL event. if true is returned, then
Expand All @@ -62,6 +62,14 @@ DFhackCExport bool dfhooks_sdl_event(SDL_Event* event) {
return DFHack::Core::getInstance().DFH_SDL_Event(event);
}

// called from the main thread just after setting mouse state in gps and just
// before rendering the screen buffer to the screen.
DFhackCExport void dfhooks_sdl_loop() {
if (disabled)
return;
// TODO: wire this up to the new SDL-based console once it is merged
}

// called from the main thread for each utf-8 char read from the ncurses input
// key is positive for ncurses keys and negative for everything else
// if true is returned, then the event has been consumed and further processing
Expand Down
1 change: 1 addition & 0 deletions library/include/Hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ DFhackCExport void dfhooks_shutdown();
DFhackCExport void dfhooks_update();
DFhackCExport void dfhooks_prerender();
DFhackCExport bool dfhooks_sdl_event(SDL_Event* event);
DFhackCExport void dfhooks_sdl_loop();
DFhackCExport bool dfhooks_ncurses_key(int key);
Loading