10 #ifndef hifi_Controllers_JSEndpoint_h
11 #define hifi_Controllers_JSEndpoint_h
13 #include "../Endpoint.h"
15 #include <QtQml/QJSValue>
16 #include <QtQml/QJSValueList>
18 namespace controller {
20 class JSEndpoint :
public Endpoint {
22 static std::shared_ptr<Endpoint> newEndpoint(
const QJSValue& callable) {
23 return std::shared_ptr<Endpoint>(
new JSEndpoint(callable));
26 using Endpoint::apply;
27 virtual AxisValue peek()
const override;
28 virtual void apply(AxisValue newValue,
const Pointer& source)
override;
31 JSEndpoint(
const QJSValue& callable)
32 : Endpoint(Input::INVALID_INPUT), _callable(callable) {
35 mutable QJSValue _callable;