| 1339 | } |
| 1340 | |
| 1341 | void widgetCreated() |
| 1342 | { |
| 1343 | if (module == nullptr) |
| 1344 | return; |
| 1345 | |
| 1346 | if (const CarlaHostHandle handle = module->fCarlaHostHandle) |
| 1347 | { |
| 1348 | const CardinalPluginContext* const pcontext = module->pcontext; |
| 1349 | |
| 1350 | char winIdStr[24]; |
| 1351 | std::snprintf(winIdStr, sizeof(winIdStr), "%llx", (ulonglong)pcontext->nativeWindowId); |
| 1352 | |
| 1353 | module->fCarlaHostDescriptor.uiParentId = pcontext->nativeWindowId; |
| 1354 | carla_set_engine_option(handle, ENGINE_OPTION_FRONTEND_WIN_ID, 0, winIdStr); |
| 1355 | |
| 1356 | if (pcontext->window != nullptr) |
| 1357 | carla_set_engine_option(handle, ENGINE_OPTION_FRONTEND_UI_SCALE, pcontext->window->pixelRatio*1000, nullptr); |
| 1358 | |
| 1359 | if (! idleCallbackActive) |
| 1360 | { |
| 1361 | idleCallbackActive = pcontext->addIdleCallback(this); |
| 1362 | } |
| 1363 | } |
| 1364 | } |
| 1365 | |
| 1366 | void widgetDestroyed() |
| 1367 | { |
nothing calls this directly
no test coverage detected