| 265 | } |
| 266 | |
| 267 | DFHACK_EXPORT bool DFHack::getClipboardTextCp437Multiline(vector<string> * lines) { |
| 268 | CHECK_NULL_POINTER(lines); |
| 269 | |
| 270 | if (!g_sdl_handle || g_SDL_HasClipboardText() != SDL_TRUE) |
| 271 | return false; |
| 272 | char *text = tabs_to_spaces(g_SDL_GetClipboardText()); |
| 273 | vector<string> utf8_lines; |
| 274 | split_string(&utf8_lines, normalize_newlines(text), "\n"); |
| 275 | DFHack::DFSDL::DFSDL_free(text); |
| 276 | |
| 277 | for (auto utf8_line : utf8_lines) |
| 278 | lines->emplace_back(UTF2DF(utf8_line)); |
| 279 | |
| 280 | return true; |
| 281 | } |
| 282 | |
| 283 | DFHACK_EXPORT bool DFHack::setClipboardTextCp437(string text) { |
| 284 | if (!g_sdl_handle) |
nothing calls this directly
no test coverage detected