#define DALI_ACCESSIBILITY_ADAPTOR_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
*
*/
-
// EXTERNAL INCLUDES
-#include <dali/public-api/events/touch-event.h>
-#include <dali/public-api/object/base-handle.h>
+#include <dali/devel-api/events/touch-point.h>
#include <dali/public-api/dali-adaptor-common.h>
+#include <dali/public-api/object/base-handle.h>
namespace Dali
{
-
namespace Internal DALI_INTERNAL
{
namespace Adaptor
{
class AccessibilityAdaptor;
}
-}
+} // namespace DALI_INTERNAL
class AccessibilityActionHandler;
class AccessibilityGestureHandler;
-class TouchPoint;
+struct TouchPoint;
/**
* @brief The AccessibilityAdaptor provides communication to the accessibility manager interface (implemented in toolkit).
class DALI_ADAPTOR_API AccessibilityAdaptor : public BaseHandle
{
public:
-
/**
* @brief Create an uninitialized handle.
*
Vector2 GetReadPosition() const;
/**
+ * @brief Enables Accessibility action or not.
+ * @param[in] enabled True if Accessibility action should be enabled.
+ */
+ void EnableAccessibility( bool enabled );
+
+ /**
* @brief Query whether the accessibility(screen-reader) is enabled.
*
* The accessibility will be enabled by system setting.
bool IsEnabled() const;
/**
+ * @brief Sets Accessibility enabled forcibly.
+ * @param forced Whether accessibility sets enabled forcibly
+ */
+ void SetForcedEnable( bool forced );
+
+ /**
* @brief Set the handler to handle accessibility actions.
*
* @param[in] handler The Accessibility action handler.
void SetGestureHandler(AccessibilityGestureHandler& handler);
/**
+ * @brief Sets the position of the focused actor.
+ * @param currentPosition The position of the focused actor
+ */
+ void SetFocusedActorPosition(Vector2 currentPosition);
+
+ /**
* @brief Handle the accessibility action to move focus to the next focusable actor
* (by one finger flick down).
*
bool HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp);
/**
- * @brief Handle the accessibility action to move for the current focused actor
- * (by 1 finger tap & hold and move).
- *
- * @param[in] point The touch point information.
- * @param[in] timeStamp The time the touch occurred.
- * @return Whether the action is performed successfully or not.
- */
- bool HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp);
-
- /**
* @brief Handle the accessibility action to navigate back (by two fingers circle draw).
* @return Whether the action is performed successfully or not.
*/
bool HandleActionStartStopEvent();
public: // Not intended for application developers
-
/**
* @brief Creates a handle using the Adaptor::Internal implementation.
*
* @param[in] adaptor The AccessibilityAdaptor implementation.
*/
- DALI_INTERNAL AccessibilityAdaptor( Internal::Adaptor::AccessibilityAdaptor& adaptor );
+ DALI_INTERNAL AccessibilityAdaptor(Internal::Adaptor::AccessibilityAdaptor& adaptor);
/**
* @brief This constructor is used by AccessibilityAdaptor::Get().
*
* @param[in] adaptor A pointer to the accessibility adaptor.
*/
- explicit DALI_INTERNAL AccessibilityAdaptor( Internal::Adaptor::AccessibilityAdaptor* adaptor );
+ explicit DALI_INTERNAL AccessibilityAdaptor(Internal::Adaptor::AccessibilityAdaptor* adaptor);
};
} // namespace Dali