9#include <emscripten/bind.h>
15#include "tools/viewer/SampleSlide.h"
23 if (
name ==
"PathText") {
24 extern Sample* MakePathTextSample();
25 return sk_make_sp<SampleSlide>(MakePathTextSample);
27 if (
name ==
"TessellatedWedge") {
28 extern Sample* MakeTessellatedWedgeSample();
29 return sk_make_sp<SampleSlide>(MakeTessellatedWedgeSample);
35 auto stream = std::make_unique<SkMemoryStream>(skpData.data(), skpData.size(),
41 auto stream = std::make_unique<SkMemoryStream>(svgText.data(), svgText.size(),
50 class_<Slide>(
"Slide")
59 enum_<skui::InputState>(
"InputState")
65 enum_<skui::ModifierKey>(
"ModifierKey")
virtual bool onMouse(SkScalar x, SkScalar y, skui::InputState state, skui::ModifierKey modifiers)
virtual bool onChar(SkUnichar c)
virtual void load(SkScalar winWidth, SkScalar winHeight)
virtual bool animate(double nanos)
Dart_NativeFunction function
DEF_SWITCHES_START aot vmservice shared library name
EMSCRIPTEN_BINDINGS(Viewer)
static sk_sp< Slide > MakeSlide(std::string name)
static sk_sp< Slide > MakeSkpSlide(std::string name, std::string skpData)
static sk_sp< Slide > MakeSvgSlide(std::string name, std::string svgText)