Skip to content

Commit ec1e6bc

Browse files
committed
Merge branch 'DOC-55-C' into api-docs
2 parents 050c6e2 + 00bd81b commit ec1e6bc

24 files changed

+614
-249
lines changed

interface/src/Application.cpp

+10-3
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,17 @@ class ApplicationMeshProvider : public scriptable::ModelProviderFactory {
693693
* </thead>
694694
* <tbody>
695695
* <tr><td><code>CameraFirstPerson</code></td><td>number</td><td>number</td><td>The camera is in first-person mode.
696-
* </td></tr>
696+
* <em>Legacy first person camera mode.</em></td></tr>
697+
* <tr><td><code>CameraFirstPersonLookAt</code></td><td>number</td><td>number</td><td>The camera is in first-person mode.
698+
* <em>Default first person camera mode.</em></td></tr>
697699
* <tr><td><code>CameraThirdPerson</code></td><td>number</td><td>number</td><td>The camera is in third-person mode.
698-
* </td></tr>
699-
* <tr><td><code>CameraFSM</code></td><td>number</td><td>number</td><td>The camera is in full screen mirror mode.</td></tr>
700+
* <em>Legacy third person camera mode.</em></td></tr>
701+
* <tr><td><code>CameraLookAt</code></td><td>number</td><td>number</td><td>The camera is in third-person mode.
702+
* <em>Default third person camera mode.</em></td></tr>
703+
* <tr><td><code>CameraFSM</code></td><td>number</td><td>number</td><td>The camera is in full screen mirror mode.
704+
* <em>Legacy "look at myself" behavior.</em></td></tr>
705+
* <tr><td><code>CameraSelfie</code></td><td>number</td><td>number</td><td>The camera is in selfie mode.
706+
* <em>Default "look at myself" camera mode.</em></td></tr>
700707
* <tr><td><code>CameraIndependent</code></td><td>number</td><td>number</td><td>The camera is in independent mode.</td></tr>
701708
* <tr><td><code>CameraEntity</code></td><td>number</td><td>number</td><td>The camera is in entity mode.</td></tr>
702709
* <tr><td><code>InHMD</code></td><td>number</td><td>number</td><td>The user is in HMD mode.</td></tr>

interface/src/AvatarBookmarks.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void AvatarBookmarks::updateAvatarEntities(const QVariantList &avatarEntities) {
187187
* @property {number} avatarScale - The target scale of the avatar.
188188
* @property {Array<Object<"properties",Entities.EntityProperties>>} [avatarEntites] - The avatar entities included with the
189189
* bookmark.
190-
* @property {MyAvatar.AttachmentData[]} [attachments] - The attachments included with the bookmark.
190+
* @property {AttachmentData[]} [attachments] - The attachments included with the bookmark.
191191
* <p class="important">Deprecated: Use avatar entities instead.
192192
*/
193193

interface/src/avatar/MyAvatar.h

+90-84
Large diffs are not rendered by default.

interface/src/raypick/PickScriptingInterface.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@
5252
* <em>Read-only.</em>
5353
* <p><strong>Warning:</strong> Not yet implemented.</p>
5454
*
55-
* @property {FilterFlags} PICK_BYPASS_IGNORE - Allows pick to intersect entities even when their ignorePickIntersection property is 'true'.
56-
* For debug purposes. <em>Read-only.</em>
55+
* @property {FilterFlags} PICK_BYPASS_IGNORE - Allows pick to intersect entities even when their
56+
* <code>ignorePickIntersection</code> property value is <code>true</code>. For debug purposes.
57+
* <em>Read-only.</em>
5758
*
5859
* @property {IntersectionType} INTERSECTED_NONE - Intersected nothing. <em>Read-only.</em>
5960
* @property {IntersectionType} INTERSECTED_ENTITY - Intersected an entity. <em>Read-only.</em>

interface/src/raypick/PointerScriptingInterface.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class PointerScriptingInterface : public QObject, public Dependency {
167167
* of the pointer, see {@link Pointers.getPointerProperties}.
168168
* @function Pointers.getPointerScriptParameters
169169
* @param {number} id - The ID of the pointer.
170-
* @returns {Pointers.RayPointerProperties|Picks.ParabolaPointerProperties|Picks.StylusPointerProperties}
170+
* @returns {Pointers.RayPointerProperties|Pointers.ParabolaPointerProperties|Pointers.StylusPointerProperties}
171171
* Script-provided properties, per the pointer <code>type</code>.
172172
*/
173173
Q_INVOKABLE QVariantMap getPointerScriptParameters(unsigned int uid) const;

interface/src/scripting/DesktopScriptingInterface.cpp

+10-36
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,6 @@
3030
* @property {InteractiveWindow.DockArea} LEFT - Dock to the left edge of the Interface window.
3131
* @property {InteractiveWindow.DockArea} RIGHT - Dock to the right edge of the Interface window.
3232
*/
33-
/**jsdoc
34-
* <p>A docking location of an <code>InteractiveWindow</code>.</p>
35-
* <table>
36-
* <thead>
37-
* <tr><th>Value</th><th>Name</th><th>Description</th></tr>
38-
* </thead>
39-
* <tbody>
40-
* <tr><td><code>0</code></td><td>TOP</td><td>Dock to the top edge of the Interface window.</td></tr>
41-
* <tr><td><code>1</code></td><td>BOTTOM</td><td>Dock to the bottom edge of the Interface window.</td></tr>
42-
* <tr><td><code>2</code></td><td>LEFT</td><td>Dock to the left edge of the Interface window.</td></tr>
43-
* <tr><td><code>3</code></td><td>RIGHT</td><td>Dock to the right edge of the Interface window.</td></tr>
44-
* <tbody>
45-
* </table>
46-
* @typedef {number} InteractiveWindow.DockArea
47-
*/
4833
static const QVariantMap DOCK_AREA {
4934
{ "TOP", DockArea::TOP },
5035
{ "BOTTOM", DockArea::BOTTOM },
@@ -53,13 +38,17 @@ static const QVariantMap DOCK_AREA {
5338
};
5439

5540
/**jsdoc
56-
* The possible "relative position anchors" of an <code>InteractiveWindow</code>. Used when defining the `relativePosition` property of an `InteractiveWindow`.
41+
* The possible relative position anchors of an <code>InteractiveWindow</code> relative to the Interface window.
5742
* @typedef {object} InteractiveWindow.RelativePositionAnchors
58-
* @property {InteractiveWindow.RelativePositionAnchor} NO_ANCHOR - Specifies that the position of the `InteractiveWindow` will not be relative to any part of the Interface window.
59-
* @property {InteractiveWindow.RelativePositionAnchor} TOP_LEFT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the top left of the Interface window.
60-
* @property {InteractiveWindow.RelativePositionAnchor} TOP_RIGHT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the top right of the Interface window.
61-
* @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_RIGHT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the bottom right of the Interface window.
62-
* @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_LEFT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the bottom left of the Interface window.
43+
* @property {InteractiveWindow.RelativePositionAnchor} NO_ANCHOR - Position is not relative to any part of the Interface
44+
* window.
45+
* @property {InteractiveWindow.RelativePositionAnchor} TOP_LEFT - Position is offset from the top left of the Interface window.
46+
* @property {InteractiveWindow.RelativePositionAnchor} TOP_RIGHT - Position is offset from the top right of the Interface
47+
* window.
48+
* @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_RIGHT - Position offset from the bottom right of the Interface
49+
* window.
50+
* @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_LEFT - Position is offset from the bottom left of the Interface
51+
* window.
6352
*/
6453
static const QVariantMap RELATIVE_POSITION_ANCHOR {
6554
{ "NO_ANCHOR", RelativePositionAnchor::NO_ANCHOR },
@@ -89,21 +78,6 @@ int DesktopScriptingInterface::getHeight() {
8978
* @property {InteractiveWindow.PresentationMode} NATIVE - The window is displayed separately from the Interface window, as its
9079
* own separate window.
9180
*/
92-
/**jsdoc
93-
* <p>A display mode for an <code>InteractiveWindow</code>.</p>
94-
* <table>
95-
* <thead>
96-
* <tr><th>Value</th><th>Name</th><th>Description</th></tr>
97-
* </thead>
98-
* <tbody>
99-
* <tr><td><code>0</code></td><td>VIRTUAL</td><td>The window is displayed inside Interface: in the desktop window in
100-
* desktop mode or on the HUD surface in HMD mode.</td></tr>
101-
* <tr><td><code>1</code></td><td>NATIVE</td><td>The window is displayed separately from the Interface window, as its
102-
* own separate window.</td></tr>
103-
* <tbody>
104-
* </table>
105-
* @typedef {number} InteractiveWindow.PresentationMode
106-
*/
10781
QVariantMap DesktopScriptingInterface::getPresentationMode() {
10882
static QVariantMap presentationModes {
10983
{ "VIRTUAL", Virtual },

interface/src/scripting/DesktopScriptingInterface.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
* @property {InteractiveWindow.DockAreas} DockArea - The possible docking locations of an {@link InteractiveWindow}: top,
4343
* bottom, left, or right of the Interface window.
4444
* <em>Read-only.</em>
45-
* @property {InteractiveWindow.RelativePositionAnchors} RelativePositionAnchor - The possible "relative position anchors" for an {@link InteractiveWindow}: top left,
46-
* top right, bottom right, or bottom left of the Interface window.
45+
* @property {InteractiveWindow.RelativePositionAnchors} RelativePositionAnchor - The possible relative position anchors for an
46+
* {@link InteractiveWindow}: none, top left, top right, bottom right, or bottom left of the Interface window.
4747
* <em>Read-only.</em>
4848
*/
4949
class DesktopScriptingInterface : public QObject, public Dependency {
@@ -84,7 +84,7 @@ class DesktopScriptingInterface : public QObject, public Dependency {
8484
* @param {string} url - The QML file that specifies the window content. The QML file can use a <code>WebView</code>
8585
* control (defined by "WebView.qml" included in the Interface install) to embed an HTML web page (complete with
8686
* <code>EventBridge</code> object).
87-
* @param {InteractiveWindow.Properties} [properties] - Initial window properties.
87+
* @param {InteractiveWindow.WindowProperties} [properties] - Initial window properties.
8888
* @returns {InteractiveWindow} A new window object.
8989
* @example <caption>Open a dialog in its own window separate from Interface.</caption>
9090
* var nativeWindow = Desktop.createWindow(Script.resourcesPath() + 'qml/OverlayWindowTest.qml', {

interface/src/scripting/WindowScriptingInterface.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -818,8 +818,12 @@ private slots:
818818
/**jsdoc
819819
* Triggered when "minimized" state of the Interface window changes.
820820
* @function Window.minimizedChanged
821-
* @param {bool} isMinimized - true if the Interface window is now minimized; false otherwise.
821+
* @param {boolean} isMinimized - <code>true</code> if the Interface window is minimized, <code>false</code> if it isn't.
822822
* @returns {Signal}
823+
* @example <caption>Report the "minimized" state of the Interface window when it changes.</caption>
824+
* function onWindowMinimizedChanged(minimized) {
825+
* print("Window minimized: " + minimized);
826+
* }
823827
*
824828
* Window.minimizedChanged.connect(onWindowMinimizedChanged);
825829
*/

interface/src/ui/InteractiveWindow.cpp

+31-8
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ void InteractiveWindow::emitMainWindowResizeEvent() {
129129
}
130130

131131
/**jsdoc
132-
* A set of properties used when creating an <code>InteractiveWindow</code>.
133-
* @typedef {object} InteractiveWindow.Properties
132+
* Property values used when creating an <code>InteractiveWindow</code>.
133+
* @typedef {object} InteractiveWindow.WindowProperties
134134
* @property {string} [title="InteractiveWindow] - The title of the window.
135135
* @property {Vec2} [position] - The initial position of the window, in pixels.
136136
* @property {Vec2} [size] - The initial size of the window, in pixels
@@ -142,13 +142,36 @@ void InteractiveWindow::emitMainWindowResizeEvent() {
142142
* @property {InteractiveWindow.PresentationWindowInfo} [presentationWindowInfo] - Controls how a <code>NATIVE</code> window is
143143
* displayed. If used, the window is docked to the specified edge of the Interface window, otherwise the window is
144144
* displayed as its own separate window.
145-
* @property {InteractiveWindow.AdditionalFlags} [additionalFlags=0] - Window behavior flags in addition to "native window flags" (minimize/maximize/close),
146-
* set at window creation. Possible flag values are provided as {@link Desktop|Desktop.ALWAYS_ON_TOP} and {@link Desktop|Desktop.CLOSE_BUTTON_HIDES}.
147-
* Additional flag values can be found on Qt's website at https://doc.qt.io/qt-5/qt.html#WindowType-enum.
148-
* @property {InteractiveWindow.OverrideFlags} [overrideFlags=0] - Window behavior flags instead of the default window flags.
149-
* Set at window creation. Possible flag values are provided as {@link Desktop|Desktop.ALWAYS_ON_TOP} and {@link Desktop|Desktop.CLOSE_BUTTON_HIDES}.
150-
* Additional flag values can be found on Qt's website at https://doc.qt.io/qt-5/qt.html#WindowType-enum.
145+
* @property {InteractiveWindow.Flags} [additionalFlags=0] - Customizes window behavior.
146+
* @property {InteractiveWindow.OverrideFlags} [overrideFlags=0] - Customizes window controls.
147+
148+
* @property {InteractiveWindow.RelativePositionAnchor} [relativePositionAnchor] - he anchor for the
149+
* <code>relativePosition</code>, if used.
150+
* @property {Vec2} [relativePosition] - The position of the window, relative to the <code>relativePositionAnchor</code>, in
151+
* pixels. Excludes the window frame.
152+
* @property {boolean} [isFullScreenWindow] - <code>true</code> to make the window full screen.
151153
*/
154+
/**jsdoc
155+
* <p>A set of flags customizing <code>InteractiveWindow</code> controls. The value is constructed by using the <code>|</code>
156+
* (bitwise OR) operator on the individual flag values.</code>.</p>
157+
* <table>
158+
* <thead>
159+
* <tr><th>Value</th><th>Name</th><th>Description</th></tr>
160+
* </thead>
161+
* <tbody>
162+
* <tr><td><code>0x00000001</code></td><td>Window</td><td>Displays the window as a window rather than a dialog.</td></tr>
163+
* <tr><td><code>0x00001000</code></td><td>WindowTitleHint</td><td>Adds a title bar.</td><td>
164+
* <tr><td><code>0x00002000</code></td><td>WindowSystemMenuHint</td><td>Adds a window system menu.</td><td>
165+
* <tr><td><code>0x00004000</code></td><td>WindowMinimizeButtonHint</td><td>Adds a minimize button.</td><td>
166+
* <tr><td><code>0x00008000</code></td><td>WindowMaximizeButtonHint</td><td>Adds a maximize button.</td><td>
167+
* <tr><td><code>0x00040000</code></td><td>WindowStaysOnTopHint</td><td>The window stays on top of other windows.
168+
* <em>Not used on Windows.</em>
169+
* <tr><td><code>0x08000000</code></td><td>WindowCloseButtonHint</td><td>Adds a close button.</td><td>
170+
* <tbody>
171+
* </table>
172+
* @typedef {number} InteractiveWindow.OverrideFlags
173+
*/
174+
// OverrideFlags is per InteractiveWindow.qml.
152175
InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap& properties, bool restricted) {
153176
InteractiveWindowPresentationMode presentationMode = InteractiveWindowPresentationMode::Native;
154177

interface/src/ui/InteractiveWindow.h

+53-1
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,42 @@ namespace InteractiveWindowEnums {
7676
};
7777
Q_ENUM_NS(InteractiveWindowFlags);
7878

79+
/**jsdoc
80+
* <p>A display mode for an <code>InteractiveWindow</code>.</p>
81+
* <table>
82+
* <thead>
83+
* <tr><th>Value</th><th>Name</th><th>Description</th></tr>
84+
* </thead>
85+
* <tbody>
86+
* <tr><td><code>0</code></td><td>VIRTUAL</td><td>The window is displayed inside Interface: in the desktop window in
87+
* desktop mode or on the HUD surface in HMD mode.</td></tr>
88+
* <tr><td><code>1</code></td><td>NATIVE</td><td>The window is displayed separately from the Interface window, as its
89+
* own separate window.</td></tr>
90+
* <tbody>
91+
* </table>
92+
* @typedef {number} InteractiveWindow.PresentationMode
93+
*/
7994
enum InteractiveWindowPresentationMode {
8095
Virtual,
8196
Native
8297
};
8398
Q_ENUM_NS(InteractiveWindowPresentationMode);
8499

100+
/**jsdoc
101+
* <p>A docking location of an <code>InteractiveWindow</code>.</p>
102+
* <table>
103+
* <thead>
104+
* <tr><th>Value</th><th>Name</th><th>Description</th></tr>
105+
* </thead>
106+
* <tbody>
107+
* <tr><td><code>0</code></td><td>TOP</td><td>Dock to the top edge of the Interface window.</td></tr>
108+
* <tr><td><code>1</code></td><td>BOTTOM</td><td>Dock to the bottom edge of the Interface window.</td></tr>
109+
* <tr><td><code>2</code></td><td>LEFT</td><td>Dock to the left edge of the Interface window.</td></tr>
110+
* <tr><td><code>3</code></td><td>RIGHT</td><td>Dock to the right edge of the Interface window.</td></tr>
111+
* <tbody>
112+
* </table>
113+
* @typedef {number} InteractiveWindow.DockArea
114+
*/
85115
enum DockArea {
86116
TOP,
87117
BOTTOM,
@@ -90,6 +120,24 @@ namespace InteractiveWindowEnums {
90120
};
91121
Q_ENUM_NS(DockArea);
92122

123+
/**jsdoc
124+
* <p>The anchor for a relative position of an <code>InteractiveWindow</code>.</p>
125+
* <table>
126+
* <thead>
127+
* <tr><th>Value</th><th>Name</th><th>Description</th></tr>
128+
* </thead>
129+
* <tbody>
130+
* <tr><td><code>0</code></td><td>NO_ANCHOR</td><td>Position is not relative to any part of the Interface window.</td></tr>
131+
* <tr><td><code>1</code></td><td>TOP_LEFT</td><td>Position is offset from the top left of the Interface window.</td></tr>
132+
* <tr><td><code>2</code></td><td>TOP_RIGHT</td><td>Position is offset from the top right of the Interface window.</td></tr>
133+
* <tr><td><code>3</code></td><td>BOTTOM_RIGHT</td><td>Position offset from the bottom right of the Interface
134+
* window.</td></tr>
135+
* <tr><td><code>4</code></td><td>BOTTOM_LEFFT</td><td>Position is offset from the bottom left of the Interface
136+
* window.</td></tr>
137+
* <tbody>
138+
* </table>
139+
* @typedef {number} InteractiveWindow.RelativePositionAnchor
140+
*/
93141
enum RelativePositionAnchor {
94142
NO_ANCHOR,
95143
TOP_LEFT,
@@ -117,7 +165,11 @@ using namespace InteractiveWindowEnums;
117165
* @hifi-avatar
118166
*
119167
* @property {string} title - The title of the window.
120-
* @property {Vec2} position - The position of the window, in pixels.
168+
* @property {Vec2} position - The absolute position of the window, in pixels.
169+
* @property {InteractiveWindow.RelativePositionAnchor} relativePositionAnchor - The anchor for the
170+
* <code>relativePosition</code>, if used.
171+
* @property {Vec2} relativePosition - The position of the window, relative to the <code>relativePositionAnchor</code>, in
172+
* pixels. Excludes the window frame.
121173
* @property {Vec2} size - The size of the window, in pixels.
122174
* @property {boolean} visible - <code>true</code> if the window is visible, <code>false</code> if it isn't.
123175
* @property {InteractiveWindow.PresentationMode} presentationMode - The presentation mode of the window:

libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1920,6 +1920,13 @@ void Avatar::setParentJointIndex(quint16 parentJointIndex) {
19201920
}
19211921
}
19221922

1923+
/**jsdoc
1924+
* Information about a joint in an avatar's skeleton hierarchy.
1925+
* @typedef {object} SkeletonJoint
1926+
* @property {string} name - Joint name.
1927+
* @property {number} index - Joint index.
1928+
* @property {number} parentIndex - Index of this joint's parent (-1 if no parent).
1929+
*/
19231930
QList<QVariant> Avatar::getSkeleton() {
19241931
SkeletonModelPointer skeletonModel = _skeletonModel;
19251932
if (skeletonModel) {

0 commit comments

Comments
 (0)