• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License"),
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import rpc from "./@ohos.rpc";
17import WindowExtensionContext from "./application/WindowExtensionContext";
18import Want from './@ohos.app.ability.Want';
19import window from './@ohos.window';
20
21/**
22 * class of window extension ability.
23 *
24 * @since 9
25 * @syscap SystemCapability.WindowManager.WindowManager.Core
26 * @systemapi hide for inner use.
27 * @StageModelOnly
28 */
29export default class WindowExtensionAbility {
30    /**
31     * Indicates window extension ability context.
32     *
33     * @since 9
34     * @syscap SystemCapability.WindowManager.WindowManager.Core
35     * @systemapi hide for inner use.
36     * @StageModelOnly
37     */
38    context: WindowExtensionContext;
39
40    /**
41     * Called back when a window extension is first connected to an ability.
42     *
43     * @since 9
44     * @syscap SystemCapability.WindowManager.WindowManager.Core
45     * @param want Indicates connection information about the Window ability.
46     * @systemapi hide for inner use.
47     * @StageModelOnly
48     */
49    onConnect(want: Want): void;
50
51    /**
52     * Called back when all abilities connected to a window extension are disconnected.
53     *
54     * @since 9
55     * @syscap SystemCapability.WindowManager.WindowManager.Core
56     * @param want Indicates disconnection information about the window extension.
57     * @systemapi hide for inner use.
58     * @StageModelOnly
59     */
60    onDisconnect(want: Want): void;
61
62    /**
63     * Called back when window is created.
64     *
65     * @since 9
66     * @syscap SystemCapability.WindowManager.WindowManager.Core
67     * @systemapi hide for inner use.
68     * @StageModelOnly
69     */
70    onWindowReady(window: window.Window): void;
71}
72
73