namespace Dali
{
-
namespace Toolkit
{
-
namespace Internal DALI_INTERNAL
{
class AccessibilityManager;
class DALI_TOOLKIT_API AccessibilityManager : public BaseHandle
{
public:
-
// Typedefs
/**
* The connected signal callback should return true if handled.
* @SINCE_1_0.0
*/
- typedef Signal< bool ( AccessibilityManager& ) > AccessibilityActionSignalType; ///< Generic signal type @SINCE_1_0.0
- typedef Signal< bool ( AccessibilityManager&, const Dali::TouchData& )> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0
+ typedef Signal<bool(AccessibilityManager&)> AccessibilityActionSignalType; ///< Generic signal type @SINCE_1_0.0
+ typedef Signal<bool(AccessibilityManager&, const Dali::TouchEvent&)> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0
/**
* @brief Enumeration for accessibility that needs four information which will be read by screen-reader.
*/
enum AccessibilityAttribute
{
- ACCESSIBILITY_LABEL = 0, ///< Simple text which contained in ui-control @SINCE_1_0.0
- ACCESSIBILITY_TRAIT, ///< Description of ui-control trait @SINCE_1_0.0
- ACCESSIBILITY_VALUE, ///< Current value of ui-control (Optional) @SINCE_1_0.0
- ACCESSIBILITY_HINT, ///< Hint for action (Optional) @SINCE_1_0.0
+ ACCESSIBILITY_LABEL = 0, ///< Simple text which contained in ui-control @SINCE_1_0.0
+ ACCESSIBILITY_TRAIT, ///< Description of ui-control trait @SINCE_1_0.0
+ ACCESSIBILITY_VALUE, ///< Current value of ui-control (Optional) @SINCE_1_0.0
+ ACCESSIBILITY_HINT, ///< Hint for action (Optional) @SINCE_1_0.0
ACCESSIBILITY_ATTRIBUTE_NUM ///< Number of attributes @SINCE_1_0.0
};
- /**
+ /**
* @brief Enumeration for overshoot direction.
* @SINCE_1_0.0
*/
enum FocusOvershotDirection
{
OVERSHOT_PREVIOUS = -1, ///< Try to move previous of the first actor @SINCE_1_0.0
- OVERSHOT_NEXT = 1, ///< Try to move next of the last actor @SINCE_1_0.0
+ OVERSHOT_NEXT = 1, ///< Try to move next of the last actor @SINCE_1_0.0
};
- public:
-
+public:
/// @brief Focus changed signal
/// @SINCE_1_0.0
- typedef Signal< void ( Actor, Actor ) > FocusChangedSignalType;
+ typedef Signal<void(Actor, Actor)> FocusChangedSignalType;
/// @brief Focus overshooted signal
/// @SINCE_1_0.0
- typedef Signal< void ( Actor, FocusOvershotDirection ) > FocusOvershotSignalType;
+ typedef Signal<void(Actor, FocusOvershotDirection)> FocusOvershotSignalType;
/// @brief Focused actor activated signal
/// @SINCE_1_0.0
- typedef Signal< void ( Actor ) > FocusedActorActivatedSignalType;
+ typedef Signal<void(Actor)> FocusedActorActivatedSignalType;
/**
* @brief Creates an AccessibilityManager handle; this can be initialised with AccessibilityManager::New().
void SetAccessibilityAttribute(Actor actor, AccessibilityAttribute type, const std::string& text);
/**
+ * @brief Delete the information of the specified actor's accessibility attribute.
+ *
+ * @SINCE_1_9.36
+ * @param actor The actor to delete
+ */
+ void DeleteAccessibilityAttribute(Actor actor);
+
+ /**
* @brief Gets the text of the specified actor's accessibility attribute.
*
* @SINCE_1_0.0
*/
Vector2 GetReadPosition() const;
- public: // Signals
+ /**
+ * @brief Enables Accessibility or not.
+ * @param[in] enabled True if Accessibility should be enabled.
+ */
+ void EnableAccessibility( bool enabled );
/**
+ * @brief Query whether the accessibility(screen-reader) is enabled.
+ *
+ * The accessibility will be enabled by system setting.
+ * @return True if the accessibility(screen-reader) is enabled.
+ */
+ bool IsEnabled() const;
+
+public: // Signals
+ /**
* @brief This signal is emitted when the current focused actor is changed.
*
* A callback of the following type may be connected:
*/
FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
- public: // Accessibility action signals
-
+public: // Accessibility action signals
/**
* @brief This is emitted when accessibility(screen-reader) feature turned on or off.
*
*
* A callback of the following type may be connected:
* @code
- * bool YourCallback( AccessibilityManager& manager, const TouchData& event );
+ * bool YourCallback( AccessibilityManager& manager, const TouchEvent& event );
* @endcode
* @SINCE_1_0.0
* @return The signal to connect to
*/
AccessibilityActionScrollSignalType& ActionScrollSignal();
-public:
+ /**
+ * @brief This is emitted when accessibility action is received to forward the event
+ * to the application (by one finger double tap and hold).
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * bool YourCallback( AccessibilityManager& manager );
+ * @endcode
+ * @return The signal to connect to
+ */
+ AccessibilityActionSignalType& ActionForwardSignal();
- explicit DALI_INTERNAL AccessibilityManager( Internal::AccessibilityManager *impl );
+public:
+ explicit DALI_INTERNAL AccessibilityManager(Internal::AccessibilityManager* impl);
}; // class AccessibilityManager