MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / copyClipboard

Method copyClipboard

src/override/ModuleWidget.cpp:579–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579void ModuleWidget::copyClipboard() {
580 json_t* moduleJ = toJson();
581 engine::Module::jsonStripIds(moduleJ);
582
583 DEFER({json_decref(moduleJ);});
584 char* json = json_dumps(moduleJ, JSON_INDENT(2));
585 DEFER({std::free(json);});
586 glfwSetClipboardString(APP->window->win, json);
587}
588
589bool ModuleWidget::pasteClipboardAction() {
590 const char* json = glfwGetClipboardString(APP->window->win);

Callers 1

createContextMenuMethod · 0.45

Calls 1

glfwSetClipboardStringFunction · 0.50

Tested by

no test coverage detected