1 /*
2  * Copyright (c) 2023 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 
16 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_RENDER_EXT_SURFACE_CALLBACK_INTERFACE_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_RENDER_EXT_SURFACE_CALLBACK_INTERFACE_H
18 
19 #include <cstdint>
20 
21 #include "base/memory/ace_type.h"
22 
23 namespace OHOS::Ace::NG {
24 class ExtSurfaceCallbackInterface : public virtual AceType {
25 public:
26     /**
27      * @brief Process surface create event.
28      *
29      */
30     virtual void ProcessSurfaceCreate() = 0;
31 
32     /**
33      * @brief Process surface change event.
34      *
35      * @param width Indicates the surface's width currently
36      * @param height Indicates the surface's height currently
37      */
38     virtual void ProcessSurfaceChange(int32_t width, int32_t height) = 0;
39 
40     /**
41      * @brief Process surface destroy event.
42      *
43      */
44     virtual void ProcessSurfaceDestroy() = 0;
45 
46     /**
47      * @brief Process texture refresh event.
48      *
49      */
ProcessTextureRefresh(int32_t instanceId,int64_t textureId)50     virtual void ProcessTextureRefresh(int32_t instanceId, int64_t textureId) {};
51 };
52 } // namespace OHOS::Ace::NG
53 
54 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_RENDER_EXT_SURFACE_CALLBACK_INTERFACE_H
55