summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
198ced6)
- Sends the current position of the focused actor to dbus.
- Even though user's finger presses a place other than the focused position,
the behavior of accessibility has to work well.
e.g. double tap and hold gesture
Change-Id: I6e992775cfc5ccbdae0fa31b43a6a1e087fed82a
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).SetGestureHandler(handler);
}
Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).SetGestureHandler(handler);
}
+void AccessibilityAdaptor::SetFocusedActorPosition(Vector2 currentPosition)
+{
+ Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).SetFocusedActorPosition(currentPosition);
+}
+
bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
{
return Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).HandleActionNextEvent(allowEndFeedback);
bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
{
return Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).HandleActionNextEvent(allowEndFeedback);
void SetGestureHandler(AccessibilityGestureHandler& 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).
*
* @brief Handle the accessibility action to move focus to the next focusable actor
* (by one finger flick down).
*
AccessibilityAdaptor::AccessibilityAdaptor()
: mReadPosition(),
AccessibilityAdaptor::AccessibilityAdaptor()
: mReadPosition(),
+ mFocusedActorPosition(),
mActionHandler( NULL ),
mIsEnabled( false ),
mIsForced( false )
mActionHandler( NULL ),
mIsEnabled( false ),
mIsForced( false )
+void AccessibilityAdaptor::SetFocusedActorPosition(Vector2 currentPosition)
+{
+ mFocusedActorPosition = currentPosition;
+}
+
+Vector2 AccessibilityAdaptor::GetFocusedActorPosition() const
+{
+ return mFocusedActorPosition;
+}
+
bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
{
bool ret = false;
bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
{
bool ret = false;
void SetGestureHandler(AccessibilityGestureHandler& handler);
/**
void SetGestureHandler(AccessibilityGestureHandler& handler);
/**
+ * @copydoc Dali::AccessibilityAdaptor::SetFocusedActorPosition()
+ */
+ void SetFocusedActorPosition(Vector2 currentPosition);
+
+ /**
+ * @brief Returns the current position of the focused actor.
+ * @return The current position of the focused actor
+ */
+ Vector2 GetFocusedActorPosition() const;
+
+ /**
* @copydoc Dali::AccessibilityAdaptor::HandleActionNextEvent()
*/
virtual bool HandleActionNextEvent( bool allowEndFeedback = true);
* @copydoc Dali::AccessibilityAdaptor::HandleActionNextEvent()
*/
virtual bool HandleActionNextEvent( bool allowEndFeedback = true);
Dali::Integration::TouchEventCombiner mCombiner; ///< Combines multi-touch events.
Vector2 mReadPosition; ///< ActionRead position
Dali::Integration::TouchEventCombiner mCombiner; ///< Combines multi-touch events.
Vector2 mReadPosition; ///< ActionRead position
+ Vector2 mFocusedActorPosition; ///< Focused actor position
AccessibilityActionHandler* mActionHandler; ///< The pointer of accessibility action handler
AccessibilityActionHandler* mActionHandler; ///< The pointer of accessibility action handler
+ // When gesture is ONE_FINGER_SINGLE_TAP, the gesture value is 15.
+ // When the state is aborted, the state of accessibility info is 3.
+ if( info.gestureValue == 15 && info.state == 3 )
+ {
+ Vector2 localPosition = accessibilityAdaptor->GetFocusedActorPosition();
+
+ eldbus_proxy_call( info.proxy, "HighlightedObjectInfo", NULL, NULL, -1, "ii", static_cast<int>( localPosition.x ), static_cast<int>( localPosition.y ) );
+ }
+
// Create a touch point object.
PointState::Type touchPointState( PointState::DOWN );
if( info.state == 0 )
// Create a touch point object.
PointState::Type touchPointState( PointState::DOWN );
if( info.state == 0 )
#include <dali/internal/window-system/common/rotation-event.h>
#include <dali/internal/graphics/gles/egl-implementation.h>
#include <dali/internal/window-system/common/rotation-event.h>
#include <dali/internal/graphics/gles/egl-implementation.h>
+#ifdef DALI_ELDBUS_AVAILABLE
+#include <Eldbus.h>
+#endif
+
namespace Dali
{
namespace Internal
namespace Dali
{
namespace Internal
int state;
int eventTime;
unsigned char quickpanelInfo; // to retrieve quick panel information for Accessibility
int state;
int eventTime;
unsigned char quickpanelInfo; // to retrieve quick panel information for Accessibility
+ #ifdef DALI_ELDBUS_AVAILABLE
+ Eldbus_Proxy* proxy;
+ #endif // DALI_ELDBUS_AVAILABLE
+ // Save dbus proxy on init.
+ mAccessibilityInfo.proxy = manager;
+
if( !eldbus_proxy_signal_handler_add( manager, "GestureDetected", EcoreElDBusAccessibilityNotification, this ) )
{
DALI_LOG_ERROR( "No signal handler returned\n" );
if( !eldbus_proxy_signal_handler_add( manager, "GestureDetected", EcoreElDBusAccessibilityNotification, this ) )
{
DALI_LOG_ERROR( "No signal handler returned\n" );