diff --git a/api/@ohos.arkui.UIContext.d.ts b/api/@ohos.arkui.UIContext.d.ts index b90219797df2486db8d1c2e0737fdb46c7dfae88..1ca94525566a9b0931428fdae42e173cd51a75fb 100644 --- a/api/@ohos.arkui.UIContext.d.ts +++ b/api/@ohos.arkui.UIContext.d.ts @@ -4423,6 +4423,20 @@ export declare class UIContext { * @arkts 1.2 */ setUIStates(callback: VoidCallback): void; + + /** + * Retrieves the UIContext corresponding to the UI instance of the currently focused window. + * Returns undefined if it does not exist. + * + * @returns { UIContext | undefined } The focused UIContext, or undefined if it does not exist. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + static getFocusedUIContext(): UIContext | undefined; } /**