1 /*
2  * Copyright (c) 2023-2024 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_BASE_PAGE_NODE_INFO_WRAP_H
17 #define FOUNDATION_ACE_FRAMEWORKS_BASE_PAGE_NODE_INFO_WRAP_H
18 
19 #include "base/geometry/ng/rect_t.h"
20 #include "base/memory/ace_type.h"
21 #include "base/view_data/ace_auto_fill_type.h"
22 
23 namespace OHOS::AbilityBase {
24 struct Rect;
25 struct PageNodeInfo;
26 } // namespace OHOS::AbilityBase
27 
28 namespace OHOS::Ace {
29 class PageNodeInfoWrap : public AceType {
30     DECLARE_ACE_TYPE(PageNodeInfoWrap, AceType);
31 
32 public:
33     static RefPtr<PageNodeInfoWrap> CreatePageNodeInfoWrap();
34 
SetId(int32_t id)35     virtual void SetId(int32_t id) {}
GetId()36     virtual int32_t GetId() const
37     {
38         return 0;
39     }
40 
SetDepth(int32_t depth)41     virtual void SetDepth(int32_t depth) {}
GetDepth()42     virtual int32_t GetDepth() const
43     {
44         return 0;
45     }
46 
SetAutoFillType(AceAutoFillType autoFillType)47     virtual void SetAutoFillType(AceAutoFillType autoFillType) {}
GetAutoFillType()48     virtual AceAutoFillType GetAutoFillType() const
49     {
50         return AceAutoFillType::ACE_UNSPECIFIED;
51     }
52 
SetTag(const std::string & tag)53     virtual void SetTag(const std::string& tag) {}
54     virtual const std::string& GetTag() const = 0;
55 
SetValue(const std::string & value)56     virtual void SetValue(const std::string& value) {}
57     virtual const std::string& GetValue() const = 0;
58 
SetPlaceholder(const std::string & placeholder)59     virtual void SetPlaceholder(const std::string& placeholder) {}
60     virtual const std::string& GetPlaceholder() const = 0;
61 
SetMetadata(const std::string & metadata)62     virtual void SetMetadata(const std::string& metadata) {}
63     virtual const std::string& GetMetadata() const = 0;
64 
SetPasswordRules(const std::string & passwordRules)65     virtual void SetPasswordRules(const std::string& passwordRules) {}
66     virtual const std::string& GetPasswordRules() const = 0;
67 
SetEnableAutoFill(bool enableAutoFill)68     virtual void SetEnableAutoFill(bool enableAutoFill) {}
GetEnableAutoFill()69     virtual bool GetEnableAutoFill() const
70     {
71         return false;
72     }
73 
SetIsFocus(bool isFocus)74     virtual void SetIsFocus(bool isFocus) {}
GetIsFocus()75     virtual bool GetIsFocus() const
76     {
77         return false;
78     }
79 
SetPageNodeRect(const NG::RectF & rect)80     virtual void SetPageNodeRect(const NG::RectF& rect) {}
81     virtual const NG::RectF& GetPageNodeRect() const = 0;
82 };
83 } // namespace OHOS::Ace
84 #endif // FOUNDATION_ACE_FRAMEWORKS_BASE_PAGE_NODE_INFO_WRAP_H