blob: 749bbc6c588350ff4f681bf4fd350a0ffbefec13 [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 fuchsia.ui.viewsv1token;
// ShadertoyFactory provides a number of methods for creating |Shadertoy|
// instances.
[Discoverable]
interface ShadertoyFactory {
// Create a new Shadertoy that will present its rendered content to
// |image_pipe|.
1: 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(MZ-227): not implemented.
2: NewViewShadertoy(request<Shadertoy> toy, handle<eventpair> view_token,
bool handle_input_events);
};