mirror of https://gitlab.com/cppit/jucipp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
701 B
29 lines
701 B
|
5 years ago
|
#include "tooltips.hpp"
|
||
|
|
|
||
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||
|
|
const gchar *end;
|
||
|
|
if(!g_utf8_validate(reinterpret_cast<const char *>(data), size, &end))
|
||
|
|
return 0;
|
||
|
|
|
||
|
|
class Init {
|
||
|
|
Glib::RefPtr<Gtk::Application> app;
|
||
|
|
|
||
|
|
public:
|
||
|
|
Init() {
|
||
|
|
app = Gtk::Application::create();
|
||
|
|
Gsv::init();
|
||
|
|
}
|
||
|
|
};
|
||
|
|
static Init init;
|
||
|
|
static auto get_markdown_tooltip = [](const std::string &input) {
|
||
|
|
auto tooltip = std::make_unique<Tooltip>([&](Tooltip &tooltip) {
|
||
|
|
tooltip.insert_markdown(input);
|
||
|
|
});
|
||
|
|
tooltip->show();
|
||
|
|
return tooltip;
|
||
|
|
};
|
||
|
|
|
||
|
|
get_markdown_tooltip(std::string(reinterpret_cast<const char *>(data), size));
|
||
|
|
return 0;
|
||
|
|
}
|