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 NWEB_ACCESSIBILITY_ACCESSIBILITY_NODE_INFO_H 17 #define NWEB_ACCESSIBILITY_ACCESSIBILITY_NODE_INFO_H 18 19 #include <string> 20 21 #include "nweb_export.h" 22 23 namespace OHOS::NWeb { 24 struct OHOS_NWEB_EXPORT NWebAccessibilityNodeInfo { 25 public: 26 int64_t accessibilityId = -1; 27 size_t itemCounts = 0; 28 int32_t selectionStart = 0; 29 int32_t selectionEnd = 0; 30 int32_t inputType = -1; 31 int32_t liveRegion = -1; 32 std::string componentType; 33 std::string hint; 34 std::string content; 35 std::string error; 36 std::string descriptionInfo; 37 std::vector<int64_t> childIds; 38 int64_t parentId = -1; 39 int32_t gridRows = -1; 40 int32_t gridColumns = -1; 41 int32_t gridSelectedMode = -1; 42 int32_t gridItemRow = -1; 43 int32_t gridItemRowSpan = -1; 44 int32_t gridItemColumn = -1; 45 int32_t gridItemColumnSpan = -1; 46 std::vector<uint32_t> actions; 47 int32_t pageId = -1; 48 49 size_t rectX = 0; 50 size_t rectY = 0; 51 size_t rectWidth = 0; 52 size_t rectHeight = 0; 53 54 bool heading : 1; 55 bool checked : 1; 56 bool editable : 1; 57 bool enabled : 1; 58 bool focused : 1; 59 bool selected : 1; 60 bool checkable : 1; 61 bool clickable : 1; 62 bool focusable : 1; 63 bool scrollable : 1; 64 bool password : 1; 65 bool visible : 1; 66 bool hinting : 1; 67 bool pluralLineSupported : 1; 68 bool popupSupported : 1; 69 bool contentInvalid : 1; 70 bool deletable : 1; 71 bool accessibilityFocus : 1; 72 73 float rangeInfoMin = 0.0f; 74 float rangeInfoMax = 0.0f; 75 float rangeInfoCurrent = 0.0f; 76 }; 77 } // namespace OHOS::NWeb 78 79 #endif // NWEB_ACCESSIBILITY_ACCESSIBILITY_NODE_INFO_H