blob: 35ced0c2ad7bc3a6093512e94eb77f18c929f3db [file] [log] [blame]
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.examples.shadertoy;
using fuchsia.images;
// ShadertoyFactory provides a number of methods for creating |Shadertoy|
// instances.
[Discoverable]
protocol ShadertoyFactory {
// Create a new Shadertoy that will present its rendered content to
// |image_pipe|.
NewImagePipeShadertoy(request<Shadertoy> toy, fuchsia.images.ImagePipe image_pipe);
// Create a new Shadertoy and a new view for it to render into.
// If |handle_input_events| is true, then mouse/touch events will be
// automatically handled by the Shadertoy; in this case, invocations of
// Shadertoy.SetMouse() will be ignored. Otherwise, the view will ignore
// input events, and SetMouse() will behave normally.
// TODO(SCN-227): not implemented.
NewViewShadertoy(request<Shadertoy> toy, handle<eventpair> view_token,
bool handle_input_events);
};