// EXTERNAL INCLUDES
#include <vconf.h>
+
+#ifndef WAYLAND
#include <Ecore_X.h>
#include <Elementary.h>
+#endif
+
#include <vconf.h>
#include <dali/public-api/object/type-registry.h>
#include <singleton-service-impl.h>
#include "system-settings.h"
+#ifndef WAYLAND
#define MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL
+#endif
namespace Dali
{
}
}
-BaseHandle Create()
+} // unnamed namespace
+
+Dali::AccessibilityAdaptor AccessibilityAdaptor::Get()
{
- BaseHandle handle( AccessibilityAdaptor::Get() );
+ Dali::AccessibilityAdaptor adaptor;
- if ( !handle )
+ Dali::SingletonService service( SingletonService::Get() );
+ if ( service )
{
- 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() ) );
+ }
+ else
{
- Dali::AccessibilityAdaptor adaptor = Dali::AccessibilityAdaptor( new AccessibilityAdaptorMobile() );
+ adaptor = Dali::AccessibilityAdaptor( new AccessibilityAdaptorMobile() );
AccessibilityAdaptorMobile& adaptorImpl = AccessibilityAdaptorMobile::GetImplementation( adaptor );
bool isEnabled = GetEnabledVConf();
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
-
-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() ) );
}
}
{
bool ret = false;
+#ifndef WAYLAND
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionNext(allowEndFeedback);
}
{
bool ret = false;
+#ifndef WAYLAND
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionPrevious(allowEndFeedback);
}
{
bool ret = false;
+#ifndef WAYLAND
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionActivate();
}
}
else if( mIndicatorFocused && !indicatorFocused )
{
+#ifndef WAYLAND
Elm_Access_Action_Info actionInfo;
actionInfo.action_type = ELM_ACCESS_ACTION_UNHIGHLIGHT;
// Indicator should be unhighlighted
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] Send unhighlight message to indicator!!!!\n", __FUNCTION__, __LINE__);
+#endif
}
mIndicatorFocused = indicatorFocused;
// Send accessibility READ action information to Indicator
if( mIndicatorFocused )
{
+#ifndef WAYLAND
Elm_Access_Action_Info actionInfo;
actionInfo.x = mReadPosition.x;
actionInfo.y = mReadPosition.y;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
DALI_LOG_INFO(gAccessibilityAdaptorLogFilter, Debug::General, "[%s:%d] Send READ message to indicator!!!!\n", __FUNCTION__, __LINE__);
+#endif
}
}
{
bool ret = false;
+#ifndef WAYLAND
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionReadNext(allowEndFeedback);
}
{
bool ret = false;
+#ifndef WAYLAND
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionReadPrevious(allowEndFeedback);
}
{
bool ret = false;
+#ifndef WAYLAND
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionUp();
}
{
bool ret = false;
+#ifndef WAYLAND
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionDown();
}