blob: ec6524f33235f02d1c855181de5b3e7ebf87a52b [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;
using zx;
// 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.ImagePipe2 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, zx.handle:EVENTPAIR view_token,
bool handle_input_events);
};