The 'mobile' version is different since it forwards events to the indicator.
There is currently no reason to have a different version for X11 vs Wayland.
Change-Id: I370b26763867beca7b8064a1b3e9b6a243f8a098
#include "accessibility-adaptor-impl.h"
// EXTERNAL INCLUDES
-#include <vconf.h>
-#include <Ecore.h>
-#include <Ecore_Wayland.h>
-#include <Elementary.h>
-
#include <dali/public-api/object/type-registry.h>
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/hover-event-integ.h>
#include <dali/integration-api/events/gesture-requests.h>
// INTERNAL INCLUDES
namespace Adaptor
{
+namespace // unnamed namespace
+{
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gAccessibilityAdaptorLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ACCESSIBILITY_ADAPTOR");
+#endif
+
+} // unnamed namespace
+
+AccessibilityAdaptor::AccessibilityAdaptor()
+: mReadPosition(),
+ mActionHandler( NULL ),
+ mIndicator( NULL ),
+ mIsEnabled( false ),
+ mIndicatorFocused( false )
+{
+ mAccessibilityGestureDetector = new AccessibilityGestureDetector();
+}
+
+void AccessibilityAdaptor::EnableAccessibility()
+{
+ if(mIsEnabled == false)
+ {
+ mIsEnabled = true;
+
+ if( mActionHandler )
+ {
+ mActionHandler->ChangeAccessibilityStatus();
+ }
+ }
+}
+
+void AccessibilityAdaptor::DisableAccessibility()
+{
+ if(mIsEnabled == true)
+ {
+ mIsEnabled = false;
+
+ if( mActionHandler )
+ {
+ mActionHandler->ChangeAccessibilityStatus();
+ }
+
+ // Destroy the TtsPlayer if exists.
+ if ( Adaptor::IsAvailable() )
+ {
+ Dali::Adaptor& adaptor = Dali::Adaptor::Get();
+ Adaptor& adaptorImpl = Adaptor::GetImplementation( adaptor );
+ adaptorImpl.DestroyTtsPlayer( Dali::TtsPlayer::SCREEN_READER );
+ }
+ }
+}
+
+bool AccessibilityAdaptor::IsEnabled() const
+{
+ return mIsEnabled;
+}
+
+Vector2 AccessibilityAdaptor::GetReadPosition() const
+{
+ return mReadPosition;
+}
+
+void AccessibilityAdaptor::SetActionHandler(AccessibilityActionHandler& handler)
+{
+ mActionHandler = &handler;
+}
+
+void AccessibilityAdaptor::SetGestureHandler(AccessibilityGestureHandler& handler)
+{
+ if( mAccessibilityGestureDetector )
+ {
+ mAccessibilityGestureDetector->SetGestureHandler(handler);
+ }
+}
+
+void AccessibilityAdaptor::SetIndicator(IndicatorInterface* indicator)
+{
+ mIndicator = indicator;
+}
+
bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
{
bool ret = false;
mReadPosition.x = x;
mReadPosition.y = y;
- Dali::AccessibilityAdaptor handle( this );
-
- bool indicatorFocused = false;
-
- // Check whether the Indicator is focused
- if( mIndicator && mIndicator->IsConnected() )
- {
- // Check the position and size of Indicator actor
- Dali::Actor indicatorActor = mIndicator->GetActor();
- Vector3 position = Vector3(0.0f, 0.0f, 0.0f);
- Vector3 size = indicatorActor.GetCurrentSize();
-
- if(mReadPosition.x >= position.x &&
- mReadPosition.x <= position.x + size.width &&
- mReadPosition.y >= position.y &&
- mReadPosition.y <= position.y + size.height)
- {
- indicatorFocused = true;
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] Indicator area!!!!\n", __FUNCTION__, __LINE__);
- }
- }
-
- if( mIndicator )
- {
- if( !mIndicatorFocused && indicatorFocused )
- {
- // If Indicator is focused, the focus should be cleared in Dali focus chain.
- if( mActionHandler )
- {
- mActionHandler->ClearAccessibilityFocus();
- }
- }
- else if( mIndicatorFocused && !indicatorFocused )
- {
- }
-
- mIndicatorFocused = indicatorFocused;
-
- // Send accessibility READ action information to Indicator
- if( mIndicatorFocused )
- {
- }
- }
-
- if( mActionHandler && !mIndicatorFocused)
+ if( mActionHandler )
{
- // If Indicator is not focused, the accessibility actions should be handled by the registered
- // accessibility action handler (e.g. focus manager)
- ret = mActionHandler->AccessibilityActionRead(allowReadAgain);
+ ret = mActionHandler->AccessibilityActionRead( allowReadAgain );
DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
}
{
bool ret = false;
- Dali::AccessibilityAdaptor handle( this );
-
if( mActionHandler )
{
ret = mActionHandler->AccessibilityActionReadNext(allowEndFeedback);
{
bool ret = false;
- Dali::AccessibilityAdaptor handle( this );
-
if( mActionHandler )
{
ret = mActionHandler->AccessibilityActionDown();
return ret;
}
+bool AccessibilityAdaptor::HandleActionClearFocusEvent()
+{
+ bool ret = false;
+
+ if( mActionHandler )
+ {
+ ret = mActionHandler->ClearAccessibilityFocus();
+ }
+
+ DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+ return ret;
+}
+
+bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+ bool ret = false;
+
+ // We always need to emit a scroll signal, whether it's only a hover or not,
+ // so always send the action to the action handler.
+ if( mActionHandler )
+ {
+ Dali::TouchEvent event(timeStamp);
+ event.points.push_back(point);
+ ret = mActionHandler->AccessibilityActionScroll( event );
+ }
+
+ Integration::TouchEvent touchEvent;
+ Integration::HoverEvent hoverEvent;
+ Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
+ if( type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth ) // hover event is ignored
+ {
+ // Process the touch event in accessibility gesture detector
+ if( mAccessibilityGestureDetector )
+ {
+ mAccessibilityGestureDetector->SendEvent( touchEvent );
+ ret = true;
+ }
+ }
+
+ return ret;
+}
+
+bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
+{
+ bool ret = false;
+
+ Dali::TouchEvent touchEvent(timeStamp);
+ touchEvent.points.push_back(point);
+
+ if( mActionHandler )
+ {
+ ret = mActionHandler->AccessibilityActionTouch(touchEvent);
+ }
+ return ret;
+}
+
+bool AccessibilityAdaptor::HandleActionBackEvent()
+{
+ bool ret = false;
+
+ if( mActionHandler )
+ {
+ ret = mActionHandler->AccessibilityActionBack();
+ }
+
+ DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
+
+ return ret;
+}
+
+void AccessibilityAdaptor::HandleActionEnableEvent()
+{
+ EnableAccessibility();
+}
+
+void AccessibilityAdaptor::HandleActionDisableEvent()
+{
+ DisableAccessibility();
+}
+
bool AccessibilityAdaptor::HandleActionScrollUpEvent()
{
bool ret = false;
return ret;
}
+AccessibilityAdaptor::~AccessibilityAdaptor()
+{
+ // Do any platform specific clean-up in OnDestroy()
+ OnDestroy();
+}
+
} // namespace Adaptor
} // namespace Internal
{
public:
- // Creation
-
/**
* Constructor.
*/
AccessibilityAdaptor();
/**
- * Get an instance of the AccessibilityAdaptor.
+ * @brief Get an instance of the AccessibilityAdaptor.
+ *
+ * @note This singleton-style getter can be reimplemented for different platforms.
* @return The instance of the AccessibilityAdaptor.
*/
static Dali::AccessibilityAdaptor Get();
- // Public API
-
/**
* Turn on accessibility action
* This method should be called by vconf callback
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionNextEvent()
*/
- bool HandleActionNextEvent(bool allowEndFeedback = true);
+ virtual bool HandleActionNextEvent( bool allowEndFeedback = true);
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionPreviousEvent()
*/
- bool HandleActionPreviousEvent(bool allowEndFeedback = true);
+ virtual bool HandleActionPreviousEvent( bool allowEndFeedback = true);
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionActivateEvent()
*/
- bool HandleActionActivateEvent();
+ virtual bool HandleActionActivateEvent();
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionReadEvent()
*/
- bool HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain);
+ virtual bool HandleActionReadEvent( unsigned int x, unsigned int y, bool allowReadAgain );
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionReadNextEvent()
*/
- bool HandleActionReadNextEvent(bool allowEndFeedback = true);
+ virtual bool HandleActionReadNextEvent( bool allowEndFeedback = true);
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionReadPreviousEvent()
*/
- bool HandleActionReadPreviousEvent(bool allowEndFeedback = true);
+ virtual bool HandleActionReadPreviousEvent( bool allowEndFeedback = true);
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionUpEvent()
*/
- bool HandleActionUpEvent();
+ virtual bool HandleActionUpEvent();
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionDownEvent()
*/
- bool HandleActionDownEvent();
+ virtual bool HandleActionDownEvent();
/**
* @copydoc Dali::AccessibilityAdaptor::HandleActionClearFocusEvent()
*/
bool HandleActionStartStopEvent();
-private:
-
- // Destruction
+protected:
/**
* Destructor.
*/
virtual ~AccessibilityAdaptor();
+private:
+
+ /**
+ * @brief Called when the singleton is destroyed.
+ *
+ * @note This can be reimplemented for different platforms.
+ * @return The instance of the AccessibilityAdaptor.
+ */
+ static void OnDestroy();
+
// Undefined
AccessibilityAdaptor( const AccessibilityAdaptor& );
AccessibilityAdaptor& operator=( AccessibilityAdaptor& );
-private:
+protected:
Dali::Integration::TouchEventCombiner mCombiner; ///< Combines multi-touch events.
- bool mIsEnabled; ///< enable/disable the accessibility action
Vector2 mReadPosition; ///< ActionRead position
AccessibilityActionHandler* mActionHandler; ///< The pointer of accessibility action handler
AccessibilityGestureDetectorPtr mAccessibilityGestureDetector; ///< The accessibility gesture detector
IndicatorInterface* mIndicator; ///< The indicator
- bool mIndicatorFocused; ///< Whether the Indicator is focused
+
+ bool mIsEnabled : 1; ///< enable/disable the accessibility action
+ bool mIndicatorFocused : 1; ///< Whether the Indicator is focused
public:
adaptor_common_internal_src_files = \
$(adaptor_common_dir)/abort-handler.cpp \
+ $(adaptor_common_dir)/accessibility-adaptor-impl.cpp \
$(adaptor_common_dir)/accessibility-gesture-detector.cpp \
$(adaptor_common_dir)/adaptor.cpp \
$(adaptor_common_dir)/adaptor-impl.cpp \
*/
// CLASS HEADER
-#include "accessibility-adaptor-impl.h"
+#include "accessibility-adaptor-impl-mobile.h"
// EXTERNAL INCLUDES
#include <vconf.h>
#include <Ecore_X.h>
#include <Elementary.h>
+#include <vconf.h>
+#include <dali/public-api/object/type-registry.h>
+#include <dali/integration-api/debug.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/events/gesture-requests.h>
// INTERNAL INCLUDES
+#include <singleton-service-impl.h>
#include "system-settings.h"
#define MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL
namespace Adaptor
{
-namespace {
+namespace // unnamed namespace
+{
+
#if defined(DEBUG_ENABLED)
Debug::Filter* gAccessibilityAdaptorLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ACCESSIBILITY_ADAPTOR");
#endif
+
+const char * DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_DBUS_TTS = "db/setting/accessibility/atspi";
+
+bool GetEnabledVConf()
+{
+ int isEnabled = 0;
+ vconf_get_bool( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_DBUS_TTS, &isEnabled );
+
+ if( isEnabled == 0 )
+ {
+ vconf_get_bool( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &isEnabled );
+ }
+
+ return (bool)isEnabled;
+}
+
+
+void AccessibilityOnOffNotification(keynode_t* node, void* data)
+{
+ AccessibilityAdaptor* adaptor = static_cast<AccessibilityAdaptor*>( data );
+
+ bool isEnabled = GetEnabledVConf();
+
+ DALI_LOG_INFO( gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled ? "ENABLED" : "DISABLED" );
+
+ if( isEnabled )
+ {
+ adaptor->EnableAccessibility();
+ }
+ else
+ {
+ adaptor->DisableAccessibility();
+ }
+}
+
+BaseHandle Create()
+{
+ BaseHandle handle( AccessibilityAdaptor::Get() );
+
+ if ( !handle )
+ {
+ Dali::SingletonService service( SingletonService::Get() );
+ if ( service )
+ {
+ Dali::AccessibilityAdaptor adaptor = Dali::AccessibilityAdaptor( new AccessibilityAdaptorMobile() );
+ AccessibilityAdaptorMobile& adaptorImpl = AccessibilityAdaptorMobile::GetImplementation( adaptor );
+
+ bool isEnabled = GetEnabledVConf();
+
+ if( isEnabled )
+ {
+ adaptorImpl.EnableAccessibility();
+ }
+ DALI_LOG_INFO( gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled ? "ENABLED" : "DISABLED" );
+
+ vconf_notify_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_DBUS_TTS, AccessibilityOnOffNotification, &adaptorImpl );
+ vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification, &adaptorImpl );
+
+ service.Register( typeid( adaptor ), adaptor );
+ handle = adaptor;
+ }
+ }
+
+ return handle;
+}
+
+TypeRegistration ACCESSIBILITY_ADAPTOR_TYPE( typeid(Dali::AccessibilityAdaptor), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
+
} // unnamed namespace
-bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
+Dali::AccessibilityAdaptor AccessibilityAdaptor::Get()
+{
+ Dali::AccessibilityAdaptor adaptor;
+
+ Dali::SingletonService service( SingletonService::Get() );
+ if ( service )
+ {
+ // Check whether the singleton is already created
+ Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::AccessibilityAdaptor ) );
+ if(handle)
+ {
+ // If so, downcast the handle
+ adaptor = Dali::AccessibilityAdaptor( dynamic_cast< AccessibilityAdaptor* >( handle.GetObjectPtr() ) );
+ }
+ }
+
+ return adaptor;
+}
+
+void AccessibilityAdaptor::OnDestroy()
+{
+ vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification );
+ vconf_ignore_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_DBUS_TTS, AccessibilityOnOffNotification );
+}
+
+AccessibilityAdaptorMobile::AccessibilityAdaptorMobile()
+{
+}
+
+bool AccessibilityAdaptorMobile::HandleActionNextEvent(bool allowEndFeedback)
{
bool ret = false;
return ret;
}
-bool AccessibilityAdaptor::HandleActionPreviousEvent(bool allowEndFeedback)
+bool AccessibilityAdaptorMobile::HandleActionPreviousEvent(bool allowEndFeedback)
{
bool ret = false;
return ret;
}
-bool AccessibilityAdaptor::HandleActionActivateEvent()
+bool AccessibilityAdaptorMobile::HandleActionActivateEvent()
{
bool ret = false;
return ret;
}
-bool AccessibilityAdaptor::HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain)
+bool AccessibilityAdaptorMobile::HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain)
{
bool ret = false;
return ret;
}
-bool AccessibilityAdaptor::HandleActionReadNextEvent(bool allowEndFeedback)
+bool AccessibilityAdaptorMobile::HandleActionReadNextEvent(bool allowEndFeedback)
{
bool ret = false;
return ret;
}
-bool AccessibilityAdaptor::HandleActionReadPreviousEvent(bool allowEndFeedback)
+bool AccessibilityAdaptorMobile::HandleActionReadPreviousEvent(bool allowEndFeedback)
{
bool ret = false;
return ret;
}
-bool AccessibilityAdaptor::HandleActionUpEvent()
+bool AccessibilityAdaptorMobile::HandleActionUpEvent()
{
bool ret = false;
return ret;
}
-bool AccessibilityAdaptor::HandleActionDownEvent()
+bool AccessibilityAdaptorMobile::HandleActionDownEvent()
{
bool ret = false;
return ret;
}
-bool AccessibilityAdaptor::HandleActionScrollUpEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionScrollUp();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-
-bool AccessibilityAdaptor::HandleActionScrollDownEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionScrollDown();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPageLeftEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPageLeft();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPageRightEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPageRight();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPageUpEvent()
+AccessibilityAdaptorMobile::~AccessibilityAdaptorMobile()
{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPageUp();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPageDownEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPageDown();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionMoveToFirstEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionMoveToFirst();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionMoveToLastEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionMoveToLast();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadFromTopEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadFromTop();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadFromNextEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadFromNext();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionZoomEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionZoom();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadIndicatorInformationEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadIndicatorInformation();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadPauseResumeEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadPauseResume();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionStartStopEvent()
-{
- bool ret = false;
-
- if( mIndicator && mIndicatorFocused )
- {
- // TODO: Send message to indicator with the correct action type
- }
- else if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionStartStop();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
}
} // namespace Adaptor
--- /dev/null
+#ifndef __DALI_INTERNAL_ACCESSIBILITY_ADAPTOR_MOBILE_H__
+#define __DALI_INTERNAL_ACCESSIBILITY_ADAPTOR_MOBILE_H__
+
+/*
+ * Copyright (c) 2015 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <accessibility-adaptor.h>
+#include <accessibility-action-handler.h>
+#include <accessibility-gesture-handler.h>
+#include <indicator-interface.h>
+#include <accessibility-gesture-detector.h>
+#include <accessibility-adaptor-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * This mobile version is different since it forwards events to the indicator.
+ */
+class AccessibilityAdaptorMobile : public AccessibilityAdaptor
+{
+public:
+
+ /**
+ * Constructor.
+ */
+ AccessibilityAdaptorMobile();
+
+ // From AccessibilityAdaptor base class
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::HandleActionNextEvent()
+ */
+ virtual bool HandleActionNextEvent( bool allowEndFeedback );
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::HandleActionPreviousEvent()
+ */
+ virtual bool HandleActionPreviousEvent( bool allowEndFeedback );
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::HandleActionActivateEvent()
+ */
+ virtual bool HandleActionActivateEvent();
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::HandleActionReadEvent()
+ */
+ virtual bool HandleActionReadEvent( unsigned int x, unsigned int y, bool allowReadAgain );
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::HandleActionReadNextEvent()
+ */
+ virtual bool HandleActionReadNextEvent( bool allowEndFeedback );
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::HandleActionReadPreviousEvent()
+ */
+ virtual bool HandleActionReadPreviousEvent( bool allowEndFeedback );
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::HandleActionUpEvent()
+ */
+ virtual bool HandleActionUpEvent();
+
+ /**
+ * @copydoc Dali::AccessibilityAdaptor::HandleActionDownEvent()
+ */
+ virtual bool HandleActionDownEvent();
+
+private:
+
+ /**
+ * Destructor.
+ */
+ virtual ~AccessibilityAdaptorMobile();
+
+ // Undefined
+ AccessibilityAdaptorMobile( const AccessibilityAdaptorMobile& );
+ AccessibilityAdaptorMobile& operator=( AccessibilityAdaptorMobile& );
+
+public:
+
+ // Helpers for public-api forwarding methods
+
+ inline static Internal::Adaptor::AccessibilityAdaptorMobile& GetImplementation(Dali::AccessibilityAdaptor& adaptor)
+ {
+ DALI_ASSERT_ALWAYS( adaptor && "AccessibilityAdaptorMobile handle is empty" );
+
+ BaseObject& handle = adaptor.GetBaseObject();
+
+ return static_cast<Internal::Adaptor::AccessibilityAdaptorMobile&>(handle);
+ }
+
+ inline static const Internal::Adaptor::AccessibilityAdaptorMobile& GetImplementation(const Dali::AccessibilityAdaptor& adaptor)
+ {
+ DALI_ASSERT_ALWAYS( adaptor && "AccessibilityAdaptorMobile handle is empty" );
+
+ const BaseObject& handle = adaptor.GetBaseObject();
+
+ return static_cast<const Internal::Adaptor::AccessibilityAdaptorMobile&>(handle);
+ }
+
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_ACCESSIBILITY_ADAPTOR_MOBILE_H__
# mobile profile internal files
adaptor_common_internal_mobile_profile_src_files = \
+ $(adaptor_mobile_dir)/accessibility-adaptor-impl-mobile.cpp \
$(adaptor_mobile_dir)/pixmap-render-surface-factory.cpp \
$(adaptor_mobile_dir)/mobile-system-settings.cpp \
$(adaptor_mobile_dir)/mobile-color-controller-impl.cpp
#include <dali/public-api/object/type-registry.h>
#include <dali/integration-api/debug.h>
-#include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/hover-event-integ.h>
-#include <dali/integration-api/events/gesture-requests.h>
// INTERNAL INCLUDES
#include <singleton-service-impl.h>
namespace
{
-// TODO: Update vconf-key.h ?
const char * DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_DBUS_TTS = "db/setting/accessibility/atspi";
bool GetEnabledVConf()
if ( service )
{
Dali::AccessibilityAdaptor adaptor = Dali::AccessibilityAdaptor( new AccessibilityAdaptor() );
+ AccessibilityAdaptor& adaptorImpl = AccessibilityAdaptor::GetImplementation( adaptor );
+
+ bool isEnabled = GetEnabledVConf();
+
+ if( isEnabled )
+ {
+ adaptorImpl.EnableAccessibility();
+ }
+ DALI_LOG_INFO( gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, isEnabled ? "ENABLED" : "DISABLED" );
+
+ vconf_notify_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_DBUS_TTS, AccessibilityOnOffNotification, &adaptorImpl );
+ vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification, &adaptorImpl );
+
service.Register( typeid( adaptor ), adaptor );
handle = adaptor;
}
return handle;
}
+
TypeRegistration ACCESSIBILITY_ADAPTOR_TYPE( typeid(Dali::AccessibilityAdaptor), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
} // unnamed namespace
return adaptor;
}
-Vector2 AccessibilityAdaptor::GetReadPosition() const
-{
- return mReadPosition;
-}
-
-void AccessibilityAdaptor::SetActionHandler(AccessibilityActionHandler& handler)
-{
- mActionHandler = &handler;
-}
-
-void AccessibilityAdaptor::SetGestureHandler(AccessibilityGestureHandler& handler)
-{
- if( mAccessibilityGestureDetector )
- {
- mAccessibilityGestureDetector->SetGestureHandler(handler);
- }
-}
-
-bool AccessibilityAdaptor::HandleActionClearFocusEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->ClearAccessibilityFocus();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
-{
- bool ret = false;
-
- // We always need to emit a scroll signal, whether it's only a hover or not,
- // so always send the action to the action handler.
- if( mActionHandler )
- {
- Dali::TouchEvent event(timeStamp);
- event.points.push_back(point);
- ret = mActionHandler->AccessibilityActionScroll( event );
- }
-
- Integration::TouchEvent touchEvent;
- Integration::HoverEvent hoverEvent;
- Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
- if(type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth) // hover event is ignored
- {
- // Process the touch event in accessibility gesture detector
- if( mAccessibilityGestureDetector )
- {
- mAccessibilityGestureDetector->SendEvent(touchEvent);
- ret = true;
- }
- }
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
-{
- bool ret = false;
-
- Dali::TouchEvent touchEvent(timeStamp);
- touchEvent.points.push_back(point);
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionTouch(touchEvent);
- }
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionBackEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionBack();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-void AccessibilityAdaptor::HandleActionEnableEvent()
-{
- EnableAccessibility();
-}
-
-void AccessibilityAdaptor::HandleActionDisableEvent()
-{
- DisableAccessibility();
-}
-
-void AccessibilityAdaptor::EnableAccessibility()
-{
- if(mIsEnabled == false)
- {
- mIsEnabled = true;
-
- if( mActionHandler )
- {
- mActionHandler->ChangeAccessibilityStatus();
- }
- }
-}
-
-void AccessibilityAdaptor::DisableAccessibility()
-{
- if(mIsEnabled == true)
- {
- mIsEnabled = false;
-
- if( mActionHandler )
- {
- mActionHandler->ChangeAccessibilityStatus();
- }
-
- // Destroy the TtsPlayer if exists.
- if ( Adaptor::IsAvailable() )
- {
- Dali::Adaptor& adaptor = Dali::Adaptor::Get();
- Adaptor& adaptorIpml = Adaptor::GetImplementation( adaptor );
- adaptorIpml.DestroyTtsPlayer( Dali::TtsPlayer::SCREEN_READER );
- }
- }
-}
-
-bool AccessibilityAdaptor::IsEnabled() const
-{
- return mIsEnabled;
-}
-
-void AccessibilityAdaptor::SetIndicator(IndicatorInterface* indicator)
-{
- mIndicator = indicator;
-}
-
-AccessibilityAdaptor::AccessibilityAdaptor()
-: mIsEnabled( false ),
- mReadPosition(),
- mActionHandler( NULL ),
- mIndicator( NULL),
- mIndicatorFocused( false )
-{
- mIsEnabled = GetEnabledVConf();
- DALI_LOG_INFO( gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, mIsEnabled ? "ENABLED" : "DISABLED" );
-
- vconf_notify_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_DBUS_TTS, AccessibilityOnOffNotification, this );
- vconf_notify_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification, this );
-
- mAccessibilityGestureDetector = new AccessibilityGestureDetector();
-}
-
-AccessibilityAdaptor::~AccessibilityAdaptor()
+void AccessibilityAdaptor::OnDestroy()
{
vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, AccessibilityOnOffNotification );
vconf_ignore_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_DBUS_TTS, AccessibilityOnOffNotification );
# tizen
adaptor_tizen_internal_src_files = \
- $(adaptor_tizen_dir)/accessibility-adaptor-impl-tizen.cpp \
$(adaptor_tizen_dir)/adaptor-impl-tizen.cpp \
$(adaptor_tizen_dir)/framework-tizen.cpp \
$(adaptor_tizen_dir)/vsync-monitor-tizen.cpp \
$(adaptor_tizen_dir)/tilt-sensor-impl-tizen.cpp \
$(adaptor_tizen_dir)/tts-player-impl-tizen.cpp
+
+# common to tizen platforms except not for mobile
+adaptor_tizen_internal_non_mobile_src_files = \
+ $(adaptor_tizen_dir)/accessibility-adaptor-impl-tizen.cpp
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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/object/type-registry.h>
-#include <dali/integration-api/debug.h>
-#include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/integration-api/events/hover-event-integ.h>
-#include <dali/integration-api/events/gesture-requests.h>
// INTERNAL INCLUDES
#include <singleton-service-impl.h>
-#include "system-settings.h"
namespace Dali
{
namespace Adaptor
{
-namespace
+namespace // unnamed namespace
{
-#if defined(DEBUG_ENABLED)
-Debug::Filter* gAccessibilityAdaptorLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_ACCESSIBILITY_ADAPTOR");
-#endif
BaseHandle Create()
{
return handle;
}
+
TypeRegistration ACCESSIBILITY_ADAPTOR_TYPE( typeid(Dali::AccessibilityAdaptor), typeid(Dali::BaseHandle), Create, true /* Create Instance At Startup */ );
} // unnamed namespace
return adaptor;
}
-Vector2 AccessibilityAdaptor::GetReadPosition() const
-{
- return mReadPosition;
-}
-
-void AccessibilityAdaptor::SetActionHandler(AccessibilityActionHandler& handler)
-{
- mActionHandler = &handler;
-}
-
-void AccessibilityAdaptor::SetGestureHandler(AccessibilityGestureHandler& handler)
-{
- if( mAccessibilityGestureDetector )
- {
- mAccessibilityGestureDetector->SetGestureHandler(handler);
- }
-}
-
-bool AccessibilityAdaptor::HandleActionClearFocusEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->ClearAccessibilityFocus();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp)
-{
- bool ret = false;
-
- // We always need to emit a scroll signal, whether it's only a hover or not,
- // so always send the action to the action handler.
- if( mActionHandler )
- {
- Dali::TouchEvent event(timeStamp);
- event.points.push_back(point);
- ret = mActionHandler->AccessibilityActionScroll( event );
- }
-
- Integration::TouchEvent touchEvent;
- Integration::HoverEvent hoverEvent;
- Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
- if( type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth ) // hover event is ignored
- {
- // Process the touch event in accessibility gesture detector
- if( mAccessibilityGestureDetector )
- {
- mAccessibilityGestureDetector->SendEvent( touchEvent );
- ret = true;
- }
- }
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
-{
- bool ret = false;
-
- Dali::TouchEvent touchEvent(timeStamp);
- touchEvent.points.push_back(point);
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionTouch(touchEvent);
- }
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionBackEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionBack();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-void AccessibilityAdaptor::HandleActionEnableEvent()
-{
- EnableAccessibility();
-}
-
-void AccessibilityAdaptor::HandleActionDisableEvent()
-{
- DisableAccessibility();
-}
-
-void AccessibilityAdaptor::EnableAccessibility()
-{
- if(mIsEnabled == false)
- {
- mIsEnabled = true;
-
- if( mActionHandler )
- {
- mActionHandler->ChangeAccessibilityStatus();
- }
- }
-}
-
-void AccessibilityAdaptor::DisableAccessibility()
-{
- if(mIsEnabled == true)
- {
- mIsEnabled = false;
-
- if( mActionHandler )
- {
- mActionHandler->ChangeAccessibilityStatus();
- }
-
- // Destroy the TtsPlayer if exists.
- if ( Adaptor::IsAvailable() )
- {
- Dali::Adaptor& adaptor = Dali::Adaptor::Get();
- Adaptor::GetImplementation( adaptor ).DestroyTtsPlayer( Dali::TtsPlayer::SCREEN_READER );
- }
- }
-}
-
-bool AccessibilityAdaptor::IsEnabled() const
-{
- return mIsEnabled;
-}
-
-void AccessibilityAdaptor::SetIndicator(IndicatorInterface* indicator)
-{
- mIndicator = indicator;
-}
-
-AccessibilityAdaptor::AccessibilityAdaptor()
-: mIsEnabled( false ),
- mReadPosition(),
- mActionHandler( NULL ),
- mIndicator( NULL ),
- mIndicatorFocused( false )
+void AccessibilityAdaptor::OnDestroy()
{
- mAccessibilityGestureDetector = new AccessibilityGestureDetector();
-}
-
-AccessibilityAdaptor::~AccessibilityAdaptor()
-{
-}
-
-bool AccessibilityAdaptor::HandleActionNextEvent(bool allowEndFeedback)
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionNext(allowEndFeedback);
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPreviousEvent(bool allowEndFeedback)
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPrevious(allowEndFeedback);
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionActivateEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionActivate();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain)
-{
- bool ret = false;
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %d , %d\n", __FUNCTION__, __LINE__, x, y);
-
- mReadPosition.x = x;
- mReadPosition.y = y;
-
- bool indicatorFocused = false;
-
- // Check whether the Indicator is focused
- if( mIndicator && mIndicator->IsConnected() )
- {
- // Check the position and size of Indicator actor
- Dali::Actor indicatorActor = mIndicator->GetActor();
- Vector3 position = Vector3(0.0f, 0.0f, 0.0f);
- Vector3 size = indicatorActor.GetCurrentSize();
-
- if(mReadPosition.x >= position.x &&
- mReadPosition.x <= position.x + size.width &&
- mReadPosition.y >= position.y &&
- mReadPosition.y <= position.y + size.height)
- {
- indicatorFocused = true;
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] Indicator area!!!!\n", __FUNCTION__, __LINE__);
- }
- }
-
- if( mIndicator )
- {
- if( !mIndicatorFocused && indicatorFocused )
- {
- // If Indicator is focused, the focus should be cleared in Dali focus chain.
- if( mActionHandler )
- {
- mActionHandler->ClearAccessibilityFocus();
- }
- }
-
- mIndicatorFocused = indicatorFocused;
-
- // Send accessibility READ action information to Indicator
- if( mIndicatorFocused )
- {
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] Send READ message to indicator!!!!\n", __FUNCTION__, __LINE__);
- }
- }
-
- if( mActionHandler && !mIndicatorFocused)
- {
- // If Indicator is not focused, the accessibility actions should be handled by the registered
- // accessibility action handler (e.g. focus manager)
- ret = mActionHandler->AccessibilityActionRead( allowReadAgain );
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
- }
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadNextEvent(bool allowEndFeedback)
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadNext(allowEndFeedback);
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadPreviousEvent(bool allowEndFeedback)
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadPrevious(allowEndFeedback);
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionUpEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionUp();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionDownEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionDown();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionScrollUpEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionScrollUp();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-
-bool AccessibilityAdaptor::HandleActionScrollDownEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionScrollDown();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPageLeftEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPageLeft();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPageRightEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPageRight();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPageUpEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPageUp();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionPageDownEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionPageDown();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionMoveToFirstEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionMoveToFirst();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionMoveToLastEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionMoveToLast();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadFromTopEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadFromTop();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadFromNextEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadFromNext();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionZoomEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionZoom();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadIndicatorInformationEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadIndicatorInformation();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionReadPauseResumeEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionReadPauseResume();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
-}
-
-bool AccessibilityAdaptor::HandleActionStartStopEvent()
-{
- bool ret = false;
-
- if( mActionHandler )
- {
- ret = mActionHandler->AccessibilityActionStartStop();
- }
-
- DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
-
- return ret;
+ // Nothing to do here
}
} // namespace Adaptor
# wayland
adaptor_wayland_tizen_internal_src_files = \
- $(adaptor_wayland_dir)/accessibility-adaptor-impl-wl.cpp \
$(adaptor_wayland_dir)/clipboard-impl-wl.cpp \
$(adaptor_wayland_dir)/display-connection-impl-wl.cpp \
$(adaptor_wayland_dir)/framework-wl.cpp \
adaptor_x11_tizen_internal_src_files = \
$(_adaptor_x11_internal_src_files) \
- $(adaptor_x11_dir)/accessibility-adaptor-impl-x.cpp \
$(adaptor_x11_dir)/framework-x.cpp \
$(adaptor_x11_dir)/key-mapping-x.cpp \
$(adaptor_x11_dir)/window-extensions.cpp
adaptor_x11_tv_internal_src_files = \
$(_adaptor_x11_internal_src_files) \
- $(adaptor_x11_dir)/accessibility-adaptor-impl-x.cpp \
$(adaptor_x11_dir)/framework-x.cpp
adaptor_x11_internal_default_profile_src_files = \
$(adaptor_common_internal_default_profile_src_files) \
$(adaptor_ecore_common_internal_src_files) \
$(adaptor_tizen_internal_src_files) \
+ $(adaptor_tizen_internal_non_mobile_src_files) \
$(static_libraries_libunibreak_src_files)
if WAYLAND
$(adaptor_common_internal_tv_profile_src_files) \
$(adaptor_ecore_common_internal_src_files) \
$(adaptor_tizen_internal_src_files) \
+ $(adaptor_tizen_internal_non_mobile_src_files) \
$(static_libraries_libunibreak_src_files)
if WAYLAND
adaptor_internal_src_files += $(adaptor_wayland_tizen_internal_src_files)