The **WindowAnimationManager** module provides APIs to listen for application start/exit events and window minimization/maximization events and associate animations with these events.
> **NOTE**
>
> The APIs of this module are supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version.
>
> The APIs provided by this module are system APIs.
console.log('onWindowAnimationTargetsUpdate, the fullScreenWindowTarget is: '+fullScreenWindowTarget);
console.log('onWindowAnimationTargetsUpdate, the floatingWindowTargets are: '+floatingWindowTargets);
}
...
...
@@ -83,7 +84,7 @@ Minimizes the window that displays the animation. This API uses an asynchronous
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| windowTarget | [WindowAnimationTarget](#windowanimationtarget) | Yes| Target window to minimize.|
| callback | AsyncCallback<[WindowAnimationFinishedCallback](#windowanimationfinishedcallback)> | Yes| Callback invoked when the animation is finished.|
| callback | AsyncCallback<[WindowAnimationFinishedCallback](#windowanimationfinishedcallback)> | Yes| Callback used to return the result. If the target window is minimized, **err** is **undefined** and **data** is the **WindowAnimationFinishedCallback** obtained; otherwise, **err.code** is **-1** and **data** is **undefined**.|
**Example**
...
...
@@ -92,52 +93,59 @@ let target: WindowAnimationTarget = undefined;
console.error('Failed to minimize the window target. Cause: '+JSON.stringify(err));
return;
}
finishedCallback=data;
});
finishedCallback.onAnimationFinish();
// After the callback is received, the window starts to play the animation. After the animation is finished, the **onAnimationFinish** callback is invoked.