3 #include <ossia/detail/dylib_loader.hpp>
7 #include <suil-0/suil/suil.h>
12 decltype(&::suil_init) init{};
13 decltype(&::suil_host_new) host_new{};
14 decltype(&::suil_host_set_touch_func) host_set_touch_func{};
15 decltype(&::suil_host_free) host_free{};
16 decltype(&::suil_ui_supported) ui_supported{};
17 decltype(&::suil_instance_new) instance_new{};
18 decltype(&::suil_instance_free) instance_free{};
19 decltype(&::suil_instance_get_handle) instance_get_handle{};
20 decltype(&::suil_instance_get_widget) instance_get_widget{};
21 decltype(&::suil_instance_port_event) instance_port_event{};
22 decltype(&::suil_instance_extension_data) instance_extension_data{};
24 static const libsuil& instance()
31 ossia::dylib_loader library;
34 : library(
"libsuil-0.so.0")
36 init = library.symbol<decltype(&::suil_init)>(
"suil_init");
37 host_new = library.symbol<decltype(&::suil_host_new)>(
"suil_host_new");
38 host_set_touch_func = library.symbol<decltype(&::suil_host_set_touch_func)>(
39 "suil_host_set_touch_func");
40 host_free = library.symbol<decltype(&::suil_host_free)>(
"suil_host_free");
41 ui_supported = library.symbol<decltype(&::suil_ui_supported)>(
"suil_ui_supported");
42 instance_new = library.symbol<decltype(&::suil_instance_new)>(
"suil_instance_new");
44 = library.symbol<decltype(&::suil_instance_free)>(
"suil_instance_free");
45 instance_get_handle = library.symbol<decltype(&::suil_instance_get_handle)>(
46 "suil_instance_get_handle");
47 instance_get_widget = library.symbol<decltype(&::suil_instance_get_widget)>(
48 "suil_instance_get_widget");
49 instance_port_event = library.symbol<decltype(&::suil_instance_port_event)>(
50 "suil_instance_port_event");
51 instance_extension_data = library.symbol<decltype(&::suil_instance_extension_data)>(
52 "suil_instance_extension_data");
56 assert(host_set_touch_func);
60 assert(instance_free);
61 assert(instance_get_handle);
62 assert(instance_get_widget);
63 assert(instance_port_event);
64 assert(instance_extension_data);