Files
windowmanager/utils/include/screen_info.h
T
xiaojianfeng 0145973871 Revert "Revert "modify screenInfo, screengroupinfo, displayInfo, screen, screengroup, display""
This reverts commit 12460515d1.

Signed-off-by: xiaojianfeng <xiaojianfeng3@huawei.com>
Change-Id: I1184ab3cd41d899759b83b1f8b865275bfd2db0b
2022-02-22 15:35:29 +08:00

52 lines
2.0 KiB
C++

/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing p ermissions and
* limitations under the License.
*/
#ifndef FOUNDATION_DMSERVER_SCREEN_INFO_H
#define FOUNDATION_DMSERVER_SCREEN_INFO_H
#include <parcel.h>
#include "class_var_definition.h"
#include "screen.h"
namespace OHOS::Rosen {
class ScreenInfo : public Parcelable {
friend class AbstractScreen;
public:
~ScreenInfo() = default;
ScreenInfo(const ScreenInfo&) = delete;
ScreenInfo(ScreenInfo&&) = delete;
ScreenInfo& operator=(const ScreenInfo&) = delete;
ScreenInfo& operator= (ScreenInfo&&) = delete;
virtual bool Marshalling(Parcel& parcel) const override;
static ScreenInfo* Unmarshalling(Parcel& parcel);
DEFINE_VAR_DEFAULT_FUNC_GET(ScreenId, ScreenId, id, SCREEN_ID_INVALID);
DEFINE_VAR_DEFAULT_FUNC_GET(uint32_t, VirtualWidth, virtualWidth, 0);
DEFINE_VAR_DEFAULT_FUNC_GET(uint32_t, VirtualHeight, virtualHeight, 0);
DEFINE_VAR_DEFAULT_FUNC_GET(float, VirtualPixelRatio, virtualPixelRatio, 0.0f);
DEFINE_VAR_DEFAULT_FUNC_GET(ScreenId, ParentId, parent, 0);
DEFINE_VAR_DEFAULT_FUNC_GET(bool, CanHasChild, canHasChild, false);
DEFINE_VAR_DEFAULT_FUNC_GET(Rotation, Rotation, rotation, Rotation::ROTATION_0);
DEFINE_VAR_DEFAULT_FUNC_GET_SET(uint32_t, ModeId, modeId, 0);
DEFINE_VAR_FUNC_GET(std::vector<sptr<SupportedScreenModes>>, Modes, modes);
protected:
ScreenInfo() = default;
bool InnerUnmarshalling(Parcel& parcel);
};
} // namespace OHOS::Rosen
#endif // FOUNDATION_DMSERVER_DISPLAY_INFO_H