- There is no reason to have a different version for X11 vs Wayland, as
Paul mentioned in his patch (https://review.tizen.org/gerrit/#/c/54601/).
- But it's not true CURRENTLY, as EFL on Wayland has not been
implemented of full accessibility features.
- So on Wayland, we need to cut out some of features working on X11
including sending message to the indicator.
- That's what has been done by previous version of accessibility impl
files - accessibility-adaptor-impl-x.cpp & accessibility-adaptor-impl-wl.cpp.
- Currently no need to have ..-x.cpp & -wl.cpp again, because accessibility
features anyway should be implemented, and then we will only need one
impl file.
- Instead in this patch, #ifndef WAYLAND is used to decide whether current build configure is
for wayland or not. I believe this is acceptable for those difference
between X11 & Wayland supporting that would not be long-lasting.
Change-Id: Ia587261dbc343f5199a9fba7427bc30021b22979
// EXTERNAL INCLUDES
#include <vconf.h>
// EXTERNAL INCLUDES
#include <vconf.h>
#include <Elementary.h>
#include <vconf.h>
#include <Elementary.h>
#include <vconf.h>
#include <singleton-service-impl.h>
#include "system-settings.h"
#include <singleton-service-impl.h>
#include "system-settings.h"
#define MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL
#define MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionNext(allowEndFeedback);
}
{
ret = mActionHandler->AccessibilityActionNext(allowEndFeedback);
}
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionPrevious(allowEndFeedback);
}
{
ret = mActionHandler->AccessibilityActionPrevious(allowEndFeedback);
}
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionActivate();
}
{
ret = mActionHandler->AccessibilityActionActivate();
}
}
else if( mIndicatorFocused && !indicatorFocused )
{
}
else if( mIndicatorFocused && !indicatorFocused )
{
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__);
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__);
}
mIndicatorFocused = indicatorFocused;
}
mIndicatorFocused = indicatorFocused;
// Send accessibility READ action information to Indicator
if( mIndicatorFocused )
{
// Send accessibility READ action information to Indicator
if( mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
actionInfo.x = mReadPosition.x;
actionInfo.y = mReadPosition.y;
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__);
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__);
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionReadNext(allowEndFeedback);
}
{
ret = mActionHandler->AccessibilityActionReadNext(allowEndFeedback);
}
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionReadPrevious(allowEndFeedback);
}
{
ret = mActionHandler->AccessibilityActionReadPrevious(allowEndFeedback);
}
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionUp();
}
{
ret = mActionHandler->AccessibilityActionUp();
}
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
if( mIndicator && mIndicatorFocused )
{
Elm_Access_Action_Info actionInfo;
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo));
}
else if( mActionHandler )
+#else
+ if( mActionHandler )
+#endif
{
ret = mActionHandler->AccessibilityActionDown();
}
{
ret = mActionHandler->AccessibilityActionDown();
}