1 /* 2 * Copyright (c) 2022-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 RS_VIRTUAL_SCREEN_RESOLUTION 17 #define RS_VIRTUAL_SCREEN_RESOLUTION 18 19 #include <cstdint> 20 #include <parcel.h> 21 22 #include "common/rs_macros.h" 23 24 namespace OHOS { 25 namespace Rosen { 26 class RSB_EXPORT RSVirtualScreenResolution : public Parcelable { 27 public: 28 RSVirtualScreenResolution() = default; 29 RSVirtualScreenResolution(uint32_t width, uint32_t height); 30 ~RSVirtualScreenResolution() noexcept = default; 31 32 RSVirtualScreenResolution(const RSVirtualScreenResolution& other); 33 RSVirtualScreenResolution& operator=(const RSVirtualScreenResolution& other); 34 35 bool Marshalling(Parcel &parcel) const override; 36 static RSVirtualScreenResolution *Unmarshalling(Parcel &parcel); 37 38 uint32_t GetVirtualScreenWidth() const; 39 uint32_t GetVirtualScreenHeight() const; 40 void SetVirtualScreenWidth(uint32_t width); 41 void SetVirtualScreenHeight(uint32_t height); 42 43 private: 44 uint32_t width_ = 0; 45 uint32_t height_ = 0; 46 }; 47 } // namespace Rosen 48 } // namespace OHOS 49 50 #endif // RS_VIRTUAL_SCREEN_RESOLUTION