1 /* 2 * Copyright (c) 2021 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 VIDEO_WINDOW_H 17 #define VIDEO_WINDOW_H 18 19 #include "videodisplaymanager.h" 20 #include "window_manager.h" 21 #include "window_manager_controller_client.h" 22 23 namespace OHOS { 24 class VideoWindow : public SubWindow, public RefBase { 25 public: 26 VideoWindow(InnerWindowInfo &winInfo); 27 virtual ~VideoWindow(); 28 static int32_t CreateLayer(InnerWindowInfo &winInfo, uint32_t &layerId, sptr<Surface> &surf); 29 static void DestroyLayer(uint32_t layerId); 30 int32_t Init(); 31 sptr<Surface> GetSurface(); 32 int32_t ZorderChange(uint32_t layerId, uint32_t zorder); 33 int32_t TransformChange(uint32_t layerId, TransformType type); 34 void Move(int32_t x, int32_t y); 35 void SetSubWindowSize(int32_t width, int32_t height); 36 37 private: 38 uint32_t layerId_; 39 sptr<Surface> surface_; 40 sptr<VideoDisplayManager> display; 41 sptr<IBufferProducer> producer; 42 }; 43 } // namespace OHOS 44 #endif // VIDEO_WINDOW_H 45