#define DALI_TOOLKIT_CONTROL_DEVEL_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
*/
COUNTER_CLOCKWISE_FOCUSABLE_ACTOR_ID,
+
+ /**
+ * @brief Identifier that allows the automation framework to find and interact with this element.
+ * @details Name "automationId", type Property::STRING.
+ * @note This is a string identifier (compared to @c Actor::Property::ID which is an integer).
+ * It will also appear in the AT-SPI tree under the key "automationId".
+ */
+ AUTOMATION_ID,
};
} // namespace Property
DALI_TOOLKIT_API void DoAction(Control& control, Dali::Property::Index visualIndex, Dali::Property::Index actionId, const Dali::Property::Value attributes);
/**
+ * @brief Perform an action on a visual registered to this control.
+ *
+ * Visuals will have actions, this API is used to perform one of these actions with the given attributes.
+ *
+ * @param[in] control The control.
+ * @param[in] visualIndex The Property index of the visual.
+ * @param[in] actionId The action to perform. See Visual to find supported actions.
+ * @param[in] attributes Optional attributes for the action.
+ */
+ DALI_TOOLKIT_API void DoActionExtension(Control& control, Dali::Property::Index visualIndex, Dali::Property::Index actionId, Dali::Any attributes);
+
+ /**
* @brief Set input method context.
*
* @param[in] control The control.
const PropertyRegistration Control::Impl::PROPERTY_23(typeRegistration, "accessibilityHidden", Toolkit::DevelControl::Property::ACCESSIBILITY_HIDDEN, Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty);
const PropertyRegistration Control::Impl::PROPERTY_24(typeRegistration, "clockwiseFocusableActorId", Toolkit::DevelControl::Property::CLOCKWISE_FOCUSABLE_ACTOR_ID, Property::INTEGER, &Control::Impl::SetProperty, &Control::Impl::GetProperty);
const PropertyRegistration Control::Impl::PROPERTY_25(typeRegistration, "counterClockwiseFocusableActorId", Toolkit::DevelControl::Property::COUNTER_CLOCKWISE_FOCUSABLE_ACTOR_ID, Property::INTEGER, &Control::Impl::SetProperty, &Control::Impl::GetProperty);
+const PropertyRegistration Control::Impl::PROPERTY_26(typeRegistration, "automationId", Toolkit::DevelControl::Property::AUTOMATION_ID, Property::STRING, &Control::Impl::SetProperty, &Control::Impl::GetProperty);
// clang-format on
}
}
+ void Control::Impl::DoActionExtension(Dali::Property::Index visualIndex, Dali::Property::Index actionId, Dali::Any attributes)
+ {
+ RegisteredVisualContainer::Iterator iter;
+ if(FindVisual(visualIndex, mVisuals, iter))
+ {
+ Toolkit::GetImplementation((*iter)->visual).DoActionExtension(actionId, attributes);
+ }
+ }
+
void Control::Impl::AppendAccessibilityAttribute(const std::string& key, const std::string value)
{
Property::Value* checkedValue = mAccessibilityAttributes.Find(key);
}
break;
}
+
+ case Toolkit::DevelControl::Property::AUTOMATION_ID:
+ {
+ std::string automationId;
+ if(value.Get(automationId))
+ {
+ controlImpl.mImpl->mAutomationId = automationId;
+ }
+ break;
+ }
}
}
}
value = controlImpl.mImpl->mCounterClockwiseFocusableActorId;
break;
}
+
+ case Toolkit::DevelControl::Property::AUTOMATION_ID:
+ {
+ value = controlImpl.mImpl->mAutomationId;
+ break;
+ }
}
}
void DoAction(Dali::Property::Index visualIndex, Dali::Property::Index actionId, const Dali::Property::Value attributes);
/**
+ * @copydoc Dali::Toolkit::DevelControl::DoActionExtension()
+ */
+ void DoActionExtension(Dali::Property::Index visualIndex, Dali::Property::Index actionId, Dali::Any attributes);
+
+ /**
* @brief Function used to set control properties.
* @param[in] object The object whose property to set
* @param[in] index The index of the property to set
std::string mAccessibilityName;
std::string mAccessibilityDescription;
std::string mAccessibilityTranslationDomain;
+ std::string mAutomationId;
bool mAccessibilityHighlightable = false;
bool mAccessibilityHidden = false;
static const PropertyRegistration PROPERTY_23;
static const PropertyRegistration PROPERTY_24;
static const PropertyRegistration PROPERTY_25;
+ static const PropertyRegistration PROPERTY_26;
private:
// Accessibility - notification for highlighted object to check if it is showing.