From 483688a6e1625a201f6c51129086c2d039ee8ed0 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 28 Feb 2018 08:40:36 +1300 Subject: [PATCH] Web entity EventBridge functions JSDoc --- .../entities/src/EntityScriptingInterface.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index d4ae83087d..e0e699f7d4 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -1242,6 +1242,14 @@ public slots: */ Q_INVOKABLE bool wantsHandControllerPointerEvents(QUuid id); + /**jsdoc + * Send a script event over a {@link Entities.EntityType|"Web"} entity's EventBridge to the Web + * page's scripts. + * @function Entities.emitScriptEvent + * @param {Uuid} entityID - The ID of the {@link Entities.EntityType|"Web"} entity. + * @param {string} message - The message to send. + * @todo This function is currently not implemented. + */ Q_INVOKABLE void emitScriptEvent(const EntityItemID& entityID, const QVariant& message); /**jsdoc @@ -1663,6 +1671,14 @@ signals: */ void debitEnergySource(float value); + /**jsdoc + * Triggered in when a script in a {@link Entities.EntityType|"Web"} entity's Web page script sends an event + * over the script's EventBridge. + * @function Entities.webEventReceived + * @param {Uuid} entityID - The ID of the entity that event was received from. + * @param {string} message - The message received. + * @returns {Signal} + */ void webEventReceived(const EntityItemID& entityItemID, const QVariant& message); protected: