view Deprecated/Platforms/Wasm/WasmViewport.cpp @ 1441:0171302051fa loader-cache-refactoring

Branch work finished
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 26 May 2020 10:09:02 +0200
parents 419d0320c344
children 828a9b4ee1b7
line wrap: on
line source

#include "WasmViewport.h"

#include <vector>
#include <memory>

std::vector<std::shared_ptr<Deprecated::WidgetViewport>> wasmViewports;

void AttachWidgetToWasmViewport(const char* htmlCanvasId, Deprecated::IWidget* centralWidget) {
    std::shared_ptr<Deprecated::WidgetViewport> viewport(CreateWasmViewportFromCpp(htmlCanvasId));
    viewport->SetCentralWidget(centralWidget);

    wasmViewports.push_back(viewport);
}