#define DALI_TOOLKIT_CONTROL_DATA_IMPL_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
Toolkit::Visual::Base visual;
bool enabled : 1;
bool pending : 1;
+ bool overideReadyTransition : 1;
RegisteredVisual(Property::Index aIndex, Toolkit::Visual::Base& aVisual, bool aEnabled, bool aPendingReplacement)
: index(aIndex),
visual(aVisual),
enabled(aEnabled),
- pending(aPendingReplacement)
+ pending(aPendingReplacement),
+ overideReadyTransition(false)
{
}
};
void LongPressDetected(Actor actor, const LongPressGesture& longPress);
/**
+ * @brief Called when resources of control are ready.
+ */
+ void ResourceReady();
+
+ /**
* @brief Called when a resource is ready.
* @param[in] object The visual whose resources are ready
* @note Overriding method in Visual::EventObserver.
bool IsVisualEnabled(Property::Index index) const;
/**
+ * @brief Sets the given visual to be ready transition
+ *
+ * @param[in] control The control
+ * @param[in] visual The visual to ready transition overriden
+ * @param[in] enable flag to set enabled or disabled.
+ */
+ void EnableReadyTransitionOverriden(Toolkit::Visual::Base& visual, bool enable);
+
+ /**
* @brief Stops observing the given visual.
* @param[in] visual The visual to stop observing
*/
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
*/
Toolkit::DevelControl::ControlAccessible* GetAccessibleObject();
+ /**
+ * @copydoc Dali::Toolkit::DevelControl::IsAccessibleCreated()
+ */
+ bool IsAccessibleCreated() const;
+
+ /**
+ * @copydoc Dali::Toolkit::DevelControl::EnableCreateAccessible()
+ */
+ void EnableCreateAccessible(bool enable);
+
+ /**
+ * @copydoc Dali::Toolkit::DevelControl::IsCreateAccessibleEnabled()
+ */
+ bool IsCreateAccessibleEnabled() const;
+
private:
/**
* Used as an alternative to boolean so that it is obvious whether a visual is enabled/disabled.
/**
* @brief Callbacks called on idle.
+ *
+ * @return True if we need to call this idle callback one more time.
*/
- void OnIdleCallback();
+ bool OnIdleCallback();
/**
* @brief Checks highlighted object geometry if it is showing or not
void RegisterAccessibilityPositionPropertyNotification();
/**
- * @brief Remove property notification added by RegisterPropertyNotification
+ * @brief Remove property notification added by RegisterAccessibilityPositionPropertyNotification
*/
void UnregisterAccessibilityPositionPropertyNotification();
+ /**
+ * @brief Register PropertySet signal to check highlighted object name and description
+ */
+ void RegisterAccessibilityPropertySetSignal();
+
+ /**
+ * @brief Remove PropertySet signal added by RegisterAccessibilityPropertySetSignal
+ */
+ void UnregisterAccessibilityPropertySetSignal();
+
+ /**
+ * @brief Signal callback of PropertySet when this object is become highlighted, so RegisterAccessibilityPropertySetSignal called.
+ *
+ * @param[in] handle Handle of the control.
+ * @param[in] index The index of property.
+ * @param[in] value The value of property.
+ */
+ void OnAccessibilityPropertySet(Dali::Handle& handle, Dali::Property::Index index, const Dali::Property::Value& value);
+
public:
Control& mControlImpl;
DevelControl::State mState;
std::string mAccessibilityName;
std::string mAccessibilityDescription;
std::string mAccessibilityTranslationDomain;
+ std::string mAutomationId;
bool mAccessibilityHighlightable = false;
bool mAccessibilityHidden = false;
+ bool mAccessibleCreatable = true;
Dali::Accessibility::Role mAccessibilityRole = Dali::Accessibility::Role::UNKNOWN;
bool mIsKeyboardNavigationSupported : 1; ///< Stores whether keyboard navigation is supported by the control.
bool mIsKeyboardFocusGroup : 1; ///< Stores whether the control is a focus group.
bool mIsEmittingResourceReadySignal : 1; ///< True during ResourceReady().
- bool mNeedToEmitResourceReady : 1; ///< True if need to emit the resource ready signal again.
+ bool mIdleCallbackRegistered : 1; ///< True if need to emit the resource ready signal again.
bool mDispatchKeyEvents : 1; ///< Whether the actor emits key event signals
RegisteredVisualContainer mRemoveVisuals; ///< List of visuals that are being replaced by another visual once ready
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.
bool mIsAccessibilityPositionPropertyNotificationSet{false};
+ bool mIsAccessibilityPropertySetSignalRegistered{false};
Dali::PropertyNotification mAccessibilityPositionNotification;
Dali::Accessibility::ScreenRelativeMoveType mAccessibilityLastScreenRelativeMoveType{Accessibility::ScreenRelativeMoveType::OUTSIDE};
};