Merge pull request #1223 from odysseus654/pr/scripting-docs

Ensuring minimal documentation for classes declared in script-engine
This commit is contained in:
Kalila 2021-06-29 19:09:26 -04:00 committed by GitHub
commit 40f81e4866
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 211 additions and 63 deletions

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_AbstractScriptingServicesInterface_h #ifndef hifi_AbstractScriptingServicesInterface_h
#define hifi_AbstractScriptingServicesInterface_h #define hifi_AbstractScriptingServicesInterface_h
@ -23,3 +25,4 @@ public:
#endif // hifi_AbstractScriptingServicesInterface_h #endif // hifi_AbstractScriptingServicesInterface_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ArrayBufferClass_h #ifndef hifi_ArrayBufferClass_h
#define hifi_ArrayBufferClass_h #define hifi_ArrayBufferClass_h
@ -23,6 +25,7 @@
class ScriptEngine; class ScriptEngine;
/// Implements the <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer">ArrayBuffer</a></code> scripting class
class ArrayBufferClass : public QObject, public QScriptClass { class ArrayBufferClass : public QObject, public QScriptClass {
Q_OBJECT Q_OBJECT
public: public:
@ -58,3 +61,4 @@ private:
}; };
#endif // hifi_ArrayBufferClass_h #endif // hifi_ArrayBufferClass_h
/** @}*/

View file

@ -8,13 +8,16 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ArrayBufferPrototype_h #ifndef hifi_ArrayBufferPrototype_h
#define hifi_ArrayBufferPrototype_h #define hifi_ArrayBufferPrototype_h
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtScript/QScriptable> #include <QtScript/QScriptable>
/// The javascript functions associated with an <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer">ArrayBuffer</a></code> instance prototype
class ArrayBufferPrototype : public QObject, public QScriptable { class ArrayBufferPrototype : public QObject, public QScriptable {
Q_OBJECT Q_OBJECT
public: public:
@ -30,4 +33,5 @@ private:
QByteArray* thisArrayBuffer() const; QByteArray* thisArrayBuffer() const;
}; };
#endif // hifi_ArrayBufferPrototype_h #endif // hifi_ArrayBufferPrototype_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ArrayBufferViewClass_h #ifndef hifi_ArrayBufferViewClass_h
#define hifi_ArrayBufferViewClass_h #define hifi_ArrayBufferViewClass_h
@ -26,6 +28,7 @@ static const QString BUFFER_PROPERTY_NAME = "buffer";
static const QString BYTE_OFFSET_PROPERTY_NAME = "byteOffset"; static const QString BYTE_OFFSET_PROPERTY_NAME = "byteOffset";
static const QString BYTE_LENGTH_PROPERTY_NAME = "byteLength"; static const QString BYTE_LENGTH_PROPERTY_NAME = "byteLength";
/// The base class containing common code for ArrayBuffer views
class ArrayBufferViewClass : public QObject, public QScriptClass { class ArrayBufferViewClass : public QObject, public QScriptClass {
Q_OBJECT Q_OBJECT
public: public:
@ -50,3 +53,4 @@ protected:
}; };
#endif // hifi_ArrayBufferViewClass_h #endif // hifi_ArrayBufferViewClass_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#pragma once #pragma once
#ifndef hifi_AssetScriptingInterface_h #ifndef hifi_AssetScriptingInterface_h
@ -41,6 +43,7 @@
* @hifi-server-entity * @hifi-server-entity
* @hifi-assignment-client * @hifi-assignment-client
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Assets.html">Assets</a></code> scripting API
class AssetScriptingInterface : public BaseAssetScriptingInterface, QScriptable { class AssetScriptingInterface : public BaseAssetScriptingInterface, QScriptable {
Q_OBJECT Q_OBJECT
public: public:
@ -544,3 +547,4 @@ protected:
}; };
#endif // hifi_AssetScriptingInterface_h #endif // hifi_AssetScriptingInterface_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_AudioScriptingInterface_h #ifndef hifi_AudioScriptingInterface_h
#define hifi_AudioScriptingInterface_h #define hifi_AudioScriptingInterface_h
@ -19,6 +21,7 @@
class ScriptAudioInjector; class ScriptAudioInjector;
/// Provides the <code><a href="https://apidocs.vircadia.dev/Audio.html">Audio</a></code> scripting API
class AudioScriptingInterface : public QObject, public Dependency { class AudioScriptingInterface : public QObject, public Dependency {
Q_OBJECT Q_OBJECT
SINGLETON_DEPENDENCY SINGLETON_DEPENDENCY
@ -290,3 +293,4 @@ private:
void registerAudioMetaTypes(QScriptEngine* engine); void registerAudioMetaTypes(QScriptEngine* engine);
#endif // hifi_AudioScriptingInterface_h #endif // hifi_AudioScriptingInterface_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_BatchLoader_h #ifndef hifi_BatchLoader_h
#define hifi_BatchLoader_h #define hifi_BatchLoader_h
@ -23,6 +25,7 @@
#include <mutex> #include <mutex>
// Proxy object internal to <code>BatchLoader</code> to ensure threadsafety during loading actions
class ScriptCacheSignalProxy : public QObject { class ScriptCacheSignalProxy : public QObject {
Q_OBJECT Q_OBJECT
public: public:
@ -32,6 +35,7 @@ signals:
void contentAvailable(const QString& url, const QString& contents, bool isURL, bool success, const QString& status); void contentAvailable(const QString& url, const QString& contents, bool isURL, bool success, const QString& status);
}; };
/// Load one or more files for use by the scripting engine
class BatchLoader : public QObject { class BatchLoader : public QObject {
Q_OBJECT Q_OBJECT
public: public:
@ -54,3 +58,4 @@ private:
}; };
#endif // hifi_BatchLoader_h #endif // hifi_BatchLoader_h
/** @}*/

View file

@ -14,7 +14,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#pragma once #pragma once
#ifndef hifi_ConsoleScriptingInterface_h #ifndef hifi_ConsoleScriptingInterface_h
#define hifi_ConsoleScriptingInterface_h #define hifi_ConsoleScriptingInterface_h
@ -37,7 +39,7 @@
* @hifi-server-entity * @hifi-server-entity
* @hifi-assignment-client * @hifi-assignment-client
*/ */
// Scriptable interface of "console" object. Used exclusively in the JavaScript API /// Provides the <code><a href="https://apidocs.vircadia.dev/console.html">console</a></code> scripting API
class ConsoleScriptingInterface : public QObject, protected QScriptable { class ConsoleScriptingInterface : public QObject, protected QScriptable {
Q_OBJECT Q_OBJECT
public: public:
@ -220,3 +222,4 @@ private:
}; };
#endif // hifi_ConsoleScriptingInterface_h #endif // hifi_ConsoleScriptingInterface_h
/** @}*/

View file

@ -8,12 +8,15 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_DataViewClass_h #ifndef hifi_DataViewClass_h
#define hifi_DataViewClass_h #define hifi_DataViewClass_h
#include "ArrayBufferViewClass.h" #include "ArrayBufferViewClass.h"
/// Implements the <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView">DataView</a></code> scripting class
class DataViewClass : public ArrayBufferViewClass { class DataViewClass : public ArrayBufferViewClass {
Q_OBJECT Q_OBJECT
public: public:
@ -34,3 +37,4 @@ private:
#endif // hifi_DataViewClass_h #endif // hifi_DataViewClass_h
/** @}*/

View file

@ -8,13 +8,16 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_DataViewPrototype_h #ifndef hifi_DataViewPrototype_h
#define hifi_DataViewPrototype_h #define hifi_DataViewPrototype_h
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtScript/QScriptable> #include <QtScript/QScriptable>
/// The javascript functions associated with a <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView">DataView</a></code> instance prototype
class DataViewPrototype : public QObject, public QScriptable { class DataViewPrototype : public QObject, public QScriptable {
Q_OBJECT Q_OBJECT
public: public:
@ -65,4 +68,5 @@ private:
bool realOffset(qint32& offset, size_t size) const; bool realOffset(qint32& offset, size_t size) const;
}; };
#endif // hifi_DataViewPrototype_h #endif // hifi_DataViewPrototype_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_EventTypes_h #ifndef hifi_EventTypes_h
#define hifi_EventTypes_h #define hifi_EventTypes_h
@ -17,3 +19,4 @@
void registerEventTypes(QScriptEngine* engine); void registerEventTypes(QScriptEngine* engine);
#endif // hifi_EventTypes_h #endif // hifi_EventTypes_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_FileScriptingInterface_h #ifndef hifi_FileScriptingInterface_h
#define hifi_FileScriptingInterface_h #define hifi_FileScriptingInterface_h
@ -27,7 +29,7 @@
* @hifi-server-entity * @hifi-server-entity
* @hifi-assignment-client * @hifi-assignment-client
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/File.html">File</a></code> scripting API
class FileScriptingInterface : public QObject { class FileScriptingInterface : public QObject {
Q_OBJECT Q_OBJECT
@ -113,4 +115,5 @@ private:
}; };
#endif // hifi_FileScriptingInterface_h #endif // hifi_FileScriptingInterface_h
/** @}*/

View file

@ -8,13 +8,16 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_KeyEvent_h #ifndef hifi_KeyEvent_h
#define hifi_KeyEvent_h #define hifi_KeyEvent_h
#include <QKeyEvent> #include <QKeyEvent>
#include <QScriptValue> #include <QScriptValue>
/// Represents a keyboard event to the scripting engine. Exposed as <code><a href="https://apidocs.vircadia.dev/global.html#KeyEvent">KeyEvent</a></code>
class KeyEvent { class KeyEvent {
public: public:
KeyEvent(); KeyEvent();
@ -38,4 +41,5 @@ public:
Q_DECLARE_METATYPE(KeyEvent) Q_DECLARE_METATYPE(KeyEvent)
#endif // hifi_KeyEvent_h #endif // hifi_KeyEvent_h
/** @}*/

View file

@ -8,12 +8,15 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
#include <QtScript/QScriptEngine> * @{
*/
#ifndef hifi_MIDIEvent_h #ifndef hifi_MIDIEvent_h
#define hifi_MIDIEvent_h #define hifi_MIDIEvent_h
#include <QtScript/QScriptEngine>
/// Represents a MIDI protocol event to the scripting engine.
class MIDIEvent { class MIDIEvent {
public: public:
double deltaTime; double deltaTime;
@ -29,4 +32,5 @@ void registerMIDIMetaTypes(QScriptEngine* engine);
QScriptValue midiEventToScriptValue(QScriptEngine* engine, const MIDIEvent& event); QScriptValue midiEventToScriptValue(QScriptEngine* engine, const MIDIEvent& event);
void midiEventFromScriptValue(const QScriptValue &object, MIDIEvent& event); void midiEventFromScriptValue(const QScriptValue &object, MIDIEvent& event);
#endif // hifi_MIDIEvent_h #endif // hifi_MIDIEvent_h
/** @}*/

View file

@ -10,7 +10,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_Mat4_h #ifndef hifi_Mat4_h
#define hifi_Mat4_h #define hifi_Mat4_h
@ -35,8 +37,7 @@
* @hifi-server-entity * @hifi-server-entity
* @hifi-assignment-client * @hifi-assignment-client
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Mat4.html">Mat4</a></code> scripting interface
/// Scriptable Mat4 object. Used exclusively in the JavaScript API
class Mat4 : public QObject, protected QScriptable { class Mat4 : public QObject, protected QScriptable {
Q_OBJECT Q_OBJECT
@ -321,3 +322,4 @@ public slots:
}; };
#endif // hifi_Mat4_h #endif // hifi_Mat4_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_MenuItemProperties_h #ifndef hifi_MenuItemProperties_h
#define hifi_MenuItemProperties_h #define hifi_MenuItemProperties_h
@ -17,6 +19,7 @@
#include "KeyEvent.h" #include "KeyEvent.h"
/// Represents a menu item a script may declare and bind events to. Exposed as <code><a href="https://apidocs.vircadia.dev/Menu.html#.MenuItemProperties">MenuItemProperties</a></code>
class MenuItemProperties { class MenuItemProperties {
public: public:
MenuItemProperties() {} MenuItemProperties() {}
@ -56,3 +59,4 @@ void registerMenuItemProperties(QScriptEngine* engine);
#endif // hifi_MenuItemProperties_h #endif // hifi_MenuItemProperties_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ModelScriptingInterface_h #ifndef hifi_ModelScriptingInterface_h
#define hifi_ModelScriptingInterface_h #define hifi_ModelScriptingInterface_h
@ -32,6 +34,7 @@ class QScriptEngine;
* *
* @deprecated This API is deprecated. Use the {@link Graphics} API instead. * @deprecated This API is deprecated. Use the {@link Graphics} API instead.
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Model.html">Model</a></code> scripting interface
class ModelScriptingInterface : public QObject { class ModelScriptingInterface : public QObject {
Q_OBJECT Q_OBJECT
@ -97,3 +100,4 @@ private:
}; };
#endif // hifi_ModelScriptingInterface_h #endif // hifi_ModelScriptingInterface_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_MouseEvent_h #ifndef hifi_MouseEvent_h
#define hifi_MouseEvent_h #define hifi_MouseEvent_h
@ -17,6 +19,7 @@
class QScriptEngine; class QScriptEngine;
/// Represents a mouse event to the scripting engine. Exposed as <code><a href="https://apidocs.vircadia.dev/global.html#MouseEvent">MouseEvent</a></code>
class MouseEvent { class MouseEvent {
public: public:
MouseEvent(); MouseEvent();
@ -42,3 +45,4 @@ public:
Q_DECLARE_METATYPE(MouseEvent) Q_DECLARE_METATYPE(MouseEvent)
#endif // hifi_MouseEvent_h #endif // hifi_MouseEvent_h
/** @}*/

View file

@ -10,7 +10,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_Quat_h #ifndef hifi_Quat_h
#define hifi_Quat_h #define hifi_Quat_h
@ -51,8 +53,7 @@
* print(JSON.stringify(Quat.IDENTITY)); // { x: 0, y: 0, z: 0, w: 1 } * print(JSON.stringify(Quat.IDENTITY)); // { x: 0, y: 0, z: 0, w: 1 }
* print(JSON.stringify(Quat.safeEulerAngles(Quat.IDENTITY))); // { x: 0, y: 0, z: 0 } * print(JSON.stringify(Quat.safeEulerAngles(Quat.IDENTITY))); // { x: 0, y: 0, z: 0 }
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Quat.html">Quat</a></code> scripting interface
/// Scriptable interface a Quaternion helper class object. Used exclusively in the JavaScript API
class Quat : public QObject, protected QScriptable { class Quat : public QObject, protected QScriptable {
Q_OBJECT Q_OBJECT
Q_PROPERTY(glm::quat IDENTITY READ IDENTITY CONSTANT) Q_PROPERTY(glm::quat IDENTITY READ IDENTITY CONSTANT)
@ -470,3 +471,4 @@ private:
}; };
#endif // hifi_Quat_h #endif // hifi_Quat_h
/** @}*/

View file

@ -5,7 +5,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_RecordingScriptingInterface_h #ifndef hifi_RecordingScriptingInterface_h
#define hifi_RecordingScriptingInterface_h #define hifi_RecordingScriptingInterface_h
@ -34,6 +36,7 @@ class QScriptValue;
* @hifi-avatar * @hifi-avatar
* @hifi-assignment-client * @hifi-assignment-client
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Recording.html">Recording</a></code> scripting interface
class RecordingScriptingInterface : public QObject, public Dependency { class RecordingScriptingInterface : public QObject, public Dependency {
Q_OBJECT Q_OBJECT
@ -369,3 +372,4 @@ private:
}; };
#endif // hifi_RecordingScriptingInterface_h #endif // hifi_RecordingScriptingInterface_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_SceneScriptingInterface_h #ifndef hifi_SceneScriptingInterface_h
#define hifi_SceneScriptingInterface_h #define hifi_SceneScriptingInterface_h
@ -28,6 +30,7 @@
* @property {boolean} shouldRenderEntities - <code>true</code> if entities (domain, avatar, and local) are rendered, * @property {boolean} shouldRenderEntities - <code>true</code> if entities (domain, avatar, and local) are rendered,
* <code>false</code> if they aren't. * <code>false</code> if they aren't.
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Scene.html">Scene</a></code> scripting interface
class SceneScriptingInterface : public QObject, public Dependency { class SceneScriptingInterface : public QObject, public Dependency {
Q_OBJECT Q_OBJECT
SINGLETON_DEPENDENCY SINGLETON_DEPENDENCY
@ -69,3 +72,4 @@ protected:
}; };
#endif // hifi_SceneScriptingInterface_h #endif // hifi_SceneScriptingInterface_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ScriptAudioInjector_h #ifndef hifi_ScriptAudioInjector_h
#define hifi_ScriptAudioInjector_h #define hifi_ScriptAudioInjector_h
@ -35,6 +37,7 @@
* <em>Read-only.</em> * <em>Read-only.</em>
* @property {AudioInjector.AudioInjectorOptions} options - Configures how the injector plays the audio. * @property {AudioInjector.AudioInjectorOptions} options - Configures how the injector plays the audio.
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/AudioInjector.html">AudioInjector</a></code> scripting interface
class ScriptAudioInjector : public QObject { class ScriptAudioInjector : public QObject {
Q_OBJECT Q_OBJECT
@ -148,3 +151,4 @@ QScriptValue injectorToScriptValue(QScriptEngine* engine, ScriptAudioInjector* c
void injectorFromScriptValue(const QScriptValue& object, ScriptAudioInjector*& out); void injectorFromScriptValue(const QScriptValue& object, ScriptAudioInjector*& out);
#endif // hifi_ScriptAudioInjector_h #endif // hifi_ScriptAudioInjector_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ScriptCache_h #ifndef hifi_ScriptCache_h
#define hifi_ScriptCache_h #define hifi_ScriptCache_h
@ -32,7 +34,7 @@ public:
int maxRetries { MAX_RETRIES }; int maxRetries { MAX_RETRIES };
}; };
/// Interface for loading scripts /// Dependency for for loading and caching scripts
class ScriptCache : public QObject, public Dependency { class ScriptCache : public QObject, public Dependency {
Q_OBJECT Q_OBJECT
SINGLETON_DEPENDENCY SINGLETON_DEPENDENCY
@ -65,3 +67,4 @@ private:
}; };
#endif // hifi_ScriptCache_h #endif // hifi_ScriptCache_h
/** @}*/

View file

@ -9,7 +9,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ScriptEngine_h #ifndef hifi_ScriptEngine_h
#define hifi_ScriptEngine_h #define hifi_ScriptEngine_h
@ -133,6 +135,7 @@ public:
* <em>Read-only.</em> * <em>Read-only.</em>
* @property {Script.ResourceBuckets} ExternalPaths - External resource buckets. * @property {Script.ResourceBuckets} ExternalPaths - External resource buckets.
*/ */
/// The main class managing a scripting engine. Also provides the <code><a href="https://apidocs.vircadia.dev/Script.html">Script</a></code> scripting interface
class ScriptEngine : public BaseScriptEngine, public EntitiesScriptEngineProvider { class ScriptEngine : public BaseScriptEngine, public EntitiesScriptEngineProvider {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString context READ getContext) Q_PROPERTY(QString context READ getContext)
@ -1012,3 +1015,4 @@ ScriptEnginePointer scriptEngineFactory(ScriptEngine::Context context,
const QString& fileNameString); const QString& fileNameString);
#endif // hifi_ScriptEngine_h #endif // hifi_ScriptEngine_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ScriptEngineLogging_h #ifndef hifi_ScriptEngineLogging_h
#define hifi_ScriptEngineLogging_h #define hifi_ScriptEngineLogging_h
@ -19,4 +21,4 @@ Q_DECLARE_LOGGING_CATEGORY(scriptengine_module)
Q_DECLARE_LOGGING_CATEGORY(scriptengine_script) Q_DECLARE_LOGGING_CATEGORY(scriptengine_script)
#endif // hifi_ScriptEngineLogging_h #endif // hifi_ScriptEngineLogging_h
/** @}*/

View file

@ -5,7 +5,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ScriptEngines_h #ifndef hifi_ScriptEngines_h
#define hifi_ScriptEngines_h #define hifi_ScriptEngines_h
@ -49,7 +51,7 @@ class ScriptEngine;
* scripts directory of the Interface installation. * scripts directory of the Interface installation.
* <em>Read-only.</em> * <em>Read-only.</em>
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/ScriptDiscoveryService.html">ScriptDiscoveryService</a></code> scripting interface
class ScriptEngines : public QObject, public Dependency, public ScriptInitializerMixin<ScriptEnginePointer> { class ScriptEngines : public QObject, public Dependency, public ScriptInitializerMixin<ScriptEnginePointer> {
Q_OBJECT Q_OBJECT
@ -362,3 +364,4 @@ QString expandScriptPath(const QString& rawPath);
QUrl expandScriptUrl(const QUrl& rawScriptURL); QUrl expandScriptUrl(const QUrl& rawScriptURL);
#endif // hifi_ScriptEngine_h #endif // hifi_ScriptEngine_h
/** @}*/

View file

@ -8,12 +8,15 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef vircadia_ScriptGatekeeper_h #ifndef vircadia_ScriptGatekeeper_h
#define vircadia_ScriptGatekeeper_h #define vircadia_ScriptGatekeeper_h
#include <QtCore/QObject> #include <QtCore/QObject>
/// Manages script whitelisting in a domain
class ScriptGatekeeper : public QObject { class ScriptGatekeeper : public QObject {
Q_OBJECT Q_OBJECT
public: public:
@ -27,3 +30,4 @@ private:
}; };
#endif // vircadia_ScriptGatekeeper_h #endif // vircadia_ScriptGatekeeper_h
/** @}*/

View file

@ -10,7 +10,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ScriptUUID_h #ifndef hifi_ScriptUUID_h
#define hifi_ScriptUUID_h #define hifi_ScriptUUID_h
@ -32,8 +34,7 @@
* *
* @property {Uuid} NULL - The null UUID, <code>"{00000000-0000-0000-0000-000000000000}"</code>. * @property {Uuid} NULL - The null UUID, <code>"{00000000-0000-0000-0000-000000000000}"</code>.
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Uuid.html">Uuid</a></code> scripting interface
/// Scriptable interface for a UUID helper class object. Used exclusively in the JavaScript API
class ScriptUUID : public QObject, protected QScriptable { class ScriptUUID : public QObject, protected QScriptable {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString NULL READ NULL_UUID CONSTANT) // String for use in scripts. Q_PROPERTY(QString NULL READ NULL_UUID CONSTANT) // String for use in scripts.
@ -127,3 +128,4 @@ private:
}; };
#endif // hifi_ScriptUUID_h #endif // hifi_ScriptUUID_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ScriptsModel_h #ifndef hifi_ScriptsModel_h
#define hifi_ScriptsModel_h #define hifi_ScriptsModel_h
@ -119,6 +121,7 @@ public:
* print("Scripts:"); * print("Scripts:");
* printDirectory(null, 0, ""); // null index for the root directory. * printDirectory(null, 0, ""); // null index for the root directory.
*/ */
/// Provides script file information available from the <code><a href="https://apidocs.vircadia.dev/ScriptDiscoveryService.html">ScriptDiscoveryService</a></code> scripting interface
class ScriptsModel : public QAbstractItemModel { class ScriptsModel : public QAbstractItemModel {
Q_OBJECT Q_OBJECT
public: public:
@ -191,3 +194,4 @@ private:
}; };
#endif // hifi_ScriptsModel_h #endif // hifi_ScriptsModel_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_ScriptsModelFilter_h #ifndef hifi_ScriptsModelFilter_h
#define hifi_ScriptsModelFilter_h #define hifi_ScriptsModelFilter_h
@ -71,6 +73,7 @@
* print("Edit scripts:"); * print("Edit scripts:");
* printDirectory(null, 0, ""); // null index for the root directory. * printDirectory(null, 0, ""); // null index for the root directory.
*/ */
/// Provides script file information available from the <code><a href="https://apidocs.vircadia.dev/ScriptDiscoveryService.html">ScriptDiscoveryService</a></code> scripting interface
class ScriptsModelFilter : public QSortFilterProxyModel { class ScriptsModelFilter : public QSortFilterProxyModel {
Q_OBJECT Q_OBJECT
public: public:
@ -81,3 +84,4 @@ protected:
}; };
#endif // hifi_ScriptsModelFilter_h #endif // hifi_ScriptsModelFilter_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_SpatialEvent_h #ifndef hifi_SpatialEvent_h
#define hifi_SpatialEvent_h #define hifi_SpatialEvent_h
@ -17,6 +19,7 @@
#include <qscriptengine.h> #include <qscriptengine.h>
/// [unused] Represents a spatial event to the scripting engine
class SpatialEvent { class SpatialEvent {
public: public:
SpatialEvent(); SpatialEvent();
@ -33,4 +36,5 @@ public:
Q_DECLARE_METATYPE(SpatialEvent) Q_DECLARE_METATYPE(SpatialEvent)
#endif // hifi_SpatialEvent_h #endif // hifi_SpatialEvent_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#pragma once #pragma once
#ifndef hifi_StackTestScriptingInterface_h #ifndef hifi_StackTestScriptingInterface_h
@ -29,3 +31,4 @@ public:
}; };
#endif // hifi_StackTestScriptingInterface_h #endif // hifi_StackTestScriptingInterface_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_TouchEvent_h #ifndef hifi_TouchEvent_h
#define hifi_TouchEvent_h #define hifi_TouchEvent_h
@ -20,6 +22,7 @@
class QScriptValue; class QScriptValue;
class QScriptEngine; class QScriptEngine;
/// Represents a display or device event to the scripting engine. Exposed as <code><a href="https://apidocs.vircadia.dev/global.html#TouchEvent">TouchEvent</a></code>
class TouchEvent { class TouchEvent {
public: public:
TouchEvent(); TouchEvent();
@ -60,3 +63,4 @@ private:
Q_DECLARE_METATYPE(TouchEvent) Q_DECLARE_METATYPE(TouchEvent)
#endif // hifi_TouchEvent_h #endif // hifi_TouchEvent_h
/** @}*/

View file

@ -8,12 +8,15 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_TypedArrayPrototype_h #ifndef hifi_TypedArrayPrototype_h
#define hifi_TypedArrayPrototype_h #define hifi_TypedArrayPrototype_h
#include "ArrayBufferViewClass.h" #include "ArrayBufferViewClass.h"
/// The javascript functions associated with a <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray">TypedArray</a></code> instance prototype
class TypedArrayPrototype : public QObject, public QScriptable { class TypedArrayPrototype : public QObject, public QScriptable {
Q_OBJECT Q_OBJECT
public: public:
@ -30,4 +33,5 @@ private:
QByteArray* thisArrayBuffer() const; QByteArray* thisArrayBuffer() const;
}; };
#endif // hifi_TypedArrayPrototype_h #endif // hifi_TypedArrayPrototype_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_TypedArrays_h #ifndef hifi_TypedArrays_h
#define hifi_TypedArrays_h #define hifi_TypedArrays_h
@ -27,6 +29,7 @@ static const QString UINT_32_ARRAY_CLASS_NAME = "Uint32Array";
static const QString FLOAT_32_ARRAY_CLASS_NAME = "Float32Array"; static const QString FLOAT_32_ARRAY_CLASS_NAME = "Float32Array";
static const QString FLOAT_64_ARRAY_CLASS_NAME = "Float64Array"; static const QString FLOAT_64_ARRAY_CLASS_NAME = "Float64Array";
/// Implements the <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray">TypedArray</a></code> scripting class
class TypedArray : public ArrayBufferViewClass { class TypedArray : public ArrayBufferViewClass {
Q_OBJECT Q_OBJECT
public: public:
@ -146,3 +149,4 @@ public:
}; };
#endif // hifi_TypedArrays_h #endif // hifi_TypedArrays_h
/** @}*/

View file

@ -9,7 +9,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#pragma once #pragma once
#ifndef hifi_UsersScriptingInterface_h #ifndef hifi_UsersScriptingInterface_h
@ -38,6 +40,7 @@
* @property {BanFlags} BAN_BY_FINGERPRINT - Ban user by fingerprint. <em>Read-only.</em> * @property {BanFlags} BAN_BY_FINGERPRINT - Ban user by fingerprint. <em>Read-only.</em>
* @property {BanFlags} BAN_BY_IP - Ban user by IP address. <em>Read-only.</em> * @property {BanFlags} BAN_BY_IP - Ban user by IP address. <em>Read-only.</em>
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Users.html">Users</a></code> scripting interface
class UsersScriptingInterface : public QObject, public Dependency { class UsersScriptingInterface : public QObject, public Dependency {
Q_OBJECT Q_OBJECT
SINGLETON_DEPENDENCY SINGLETON_DEPENDENCY
@ -262,3 +265,4 @@ private:
#endif // hifi_UsersScriptingInterface_h #endif // hifi_UsersScriptingInterface_h
/** @}*/

View file

@ -10,7 +10,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#pragma once #pragma once
#ifndef hifi_Vec3_h #ifndef hifi_Vec3_h
#define hifi_Vec3_h #define hifi_Vec3_h
@ -71,8 +73,7 @@
* @property {Vec3} FRONT - <code>{ x: 0, y: 0, z: -1 }</code> : Unit vector in the "front" direction. Synonym for * @property {Vec3} FRONT - <code>{ x: 0, y: 0, z: -1 }</code> : Unit vector in the "front" direction. Synonym for
* <code>UNIT_NEG_Z</code>. <em>Read-only.</em> * <code>UNIT_NEG_Z</code>. <em>Read-only.</em>
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/Vec3.html">Vec3</a></code> scripting interface
/// Scriptable interface a Vec3ernion helper class object. Used exclusively in the JavaScript API
class Vec3 : public QObject, protected QScriptable { class Vec3 : public QObject, protected QScriptable {
Q_OBJECT Q_OBJECT
Q_PROPERTY(glm::vec3 UNIT_X READ UNIT_X CONSTANT) Q_PROPERTY(glm::vec3 UNIT_X READ UNIT_X CONSTANT)
@ -419,3 +420,4 @@ private:
}; };
#endif // hifi_Vec3_h #endif // hifi_Vec3_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_WebSocketClass_h #ifndef hifi_WebSocketClass_h
#define hifi_WebSocketClass_h #define hifi_WebSocketClass_h
@ -78,6 +80,7 @@
* webSocket.send("Test message"); * webSocket.send("Test message");
* }; * };
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/WebSocket.html">WebSocket</a></code> scripting interface
class WebSocketClass : public QObject { class WebSocketClass : public QObject {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString binaryType READ getBinaryType WRITE setBinaryType) Q_PROPERTY(QString binaryType READ getBinaryType WRITE setBinaryType)
@ -254,3 +257,4 @@ QScriptValue wscReadyStateToScriptValue(QScriptEngine* engine, const WebSocketCl
void wscReadyStateFromScriptValue(const QScriptValue& object, WebSocketClass::ReadyState& readyState); void wscReadyStateFromScriptValue(const QScriptValue& object, WebSocketClass::ReadyState& readyState);
#endif // hifi_WebSocketClass_h #endif // hifi_WebSocketClass_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_WebSocketServerClass_h #ifndef hifi_WebSocketServerClass_h
#define hifi_WebSocketServerClass_h #define hifi_WebSocketServerClass_h
@ -73,6 +75,7 @@
* webSocket.send(TEST_MESSAGE); * webSocket.send(TEST_MESSAGE);
* }; * };
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/WebSocketServer.html">WebSocketServer</a></code> scripting interface
class WebSocketServerClass : public QObject { class WebSocketServerClass : public QObject {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString url READ getURL) Q_PROPERTY(QString url READ getURL)
@ -118,3 +121,4 @@ signals:
}; };
#endif // hifi_WebSocketServerClass_h #endif // hifi_WebSocketServerClass_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_WheelEvent_h #ifndef hifi_WheelEvent_h
#define hifi_WheelEvent_h #define hifi_WheelEvent_h
@ -18,6 +20,7 @@
class QScriptValue; class QScriptValue;
class QScriptEngine; class QScriptEngine;
/// Represents a mouse wheel event to the scripting engine. Exposed as <code><a href="https://apidocs.vircadia.dev/global.html#WheelEvent">WheelEvent</a></code>
class WheelEvent { class WheelEvent {
public: public:
WheelEvent(); WheelEvent();
@ -42,3 +45,4 @@ public:
Q_DECLARE_METATYPE(WheelEvent) Q_DECLARE_METATYPE(WheelEvent)
#endif // hifi_WheelEvent_h #endif // hifi_WheelEvent_h
/** @}*/

View file

@ -8,7 +8,9 @@
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
// //
/** @addtogroup ScriptEngine
* @{
*/
#ifndef hifi_XMLHttpRequestClass_h #ifndef hifi_XMLHttpRequestClass_h
#define hifi_XMLHttpRequestClass_h #define hifi_XMLHttpRequestClass_h
@ -149,6 +151,7 @@ XMlHttpRequest.getResponseHeader(QString) function
* req.open("GET", URL); * req.open("GET", URL);
* req.send(); * req.send();
*/ */
/// Provides the <code><a href="https://apidocs.vircadia.dev/XMLHttpRequest.html">XMLHttpRequest</a></code> scripting interface
class XMLHttpRequestClass : public QObject { class XMLHttpRequestClass : public QObject {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QScriptValue response READ getResponse) Q_PROPERTY(QScriptValue response READ getResponse)
@ -374,3 +377,4 @@ private slots:
}; };
#endif // hifi_XMLHttpRequestClass_h #endif // hifi_XMLHttpRequestClass_h
/** @}*/