From: Yoonsang Lee Date: Tue, 29 Dec 2015 05:34:36 +0000 (+0900) Subject: Fix a build error in MOBILE profile from accessibility impl code X-Git-Tag: dali_1.1.16~8^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbe127bc25ac610d78cd0657a067c9c459585830;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Fix a build error in MOBILE profile from accessibility impl code - 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 --- diff --git a/adaptors/mobile/accessibility-adaptor-impl-mobile.cpp b/adaptors/mobile/accessibility-adaptor-impl-mobile.cpp index 77c0f01..cedfb54 100644 --- a/adaptors/mobile/accessibility-adaptor-impl-mobile.cpp +++ b/adaptors/mobile/accessibility-adaptor-impl-mobile.cpp @@ -20,7 +20,11 @@ // EXTERNAL INCLUDES #include + +#ifndef WAYLAND #include +#endif + #include #include @@ -33,7 +37,9 @@ #include #include "system-settings.h" +#ifndef WAYLAND #define MSG_DOMAIN_CONTROL_ACCESS (int)ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL +#endif namespace Dali { @@ -153,6 +159,7 @@ bool AccessibilityAdaptorMobile::HandleActionNextEvent(bool allowEndFeedback) { bool ret = false; +#ifndef WAYLAND if( mIndicator && mIndicatorFocused ) { Elm_Access_Action_Info actionInfo; @@ -161,6 +168,9 @@ bool AccessibilityAdaptorMobile::HandleActionNextEvent(bool allowEndFeedback) ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo)); } else if( mActionHandler ) +#else + if( mActionHandler ) +#endif { ret = mActionHandler->AccessibilityActionNext(allowEndFeedback); } @@ -174,6 +184,7 @@ bool AccessibilityAdaptorMobile::HandleActionPreviousEvent(bool allowEndFeedback { bool ret = false; +#ifndef WAYLAND if( mIndicator && mIndicatorFocused ) { Elm_Access_Action_Info actionInfo; @@ -182,6 +193,9 @@ bool AccessibilityAdaptorMobile::HandleActionPreviousEvent(bool allowEndFeedback ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo)); } else if( mActionHandler ) +#else + if( mActionHandler ) +#endif { ret = mActionHandler->AccessibilityActionPrevious(allowEndFeedback); } @@ -195,6 +209,7 @@ bool AccessibilityAdaptorMobile::HandleActionActivateEvent() { bool ret = false; +#ifndef WAYLAND if( mIndicator && mIndicatorFocused ) { Elm_Access_Action_Info actionInfo; @@ -203,6 +218,9 @@ bool AccessibilityAdaptorMobile::HandleActionActivateEvent() ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo)); } else if( mActionHandler ) +#else + if( mActionHandler ) +#endif { ret = mActionHandler->AccessibilityActionActivate(); } @@ -255,12 +273,14 @@ bool AccessibilityAdaptorMobile::HandleActionReadEvent(unsigned int x, unsigned } 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; @@ -268,6 +288,7 @@ bool AccessibilityAdaptorMobile::HandleActionReadEvent(unsigned int x, unsigned // Send accessibility READ action information to Indicator if( mIndicatorFocused ) { +#ifndef WAYLAND Elm_Access_Action_Info actionInfo; actionInfo.x = mReadPosition.x; actionInfo.y = mReadPosition.y; @@ -284,6 +305,7 @@ bool AccessibilityAdaptorMobile::HandleActionReadEvent(unsigned int x, unsigned 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 } } @@ -302,6 +324,7 @@ bool AccessibilityAdaptorMobile::HandleActionReadNextEvent(bool allowEndFeedback { bool ret = false; +#ifndef WAYLAND if( mIndicator && mIndicatorFocused ) { Elm_Access_Action_Info actionInfo; @@ -310,6 +333,9 @@ bool AccessibilityAdaptorMobile::HandleActionReadNextEvent(bool allowEndFeedback ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo)); } else if( mActionHandler ) +#else + if( mActionHandler ) +#endif { ret = mActionHandler->AccessibilityActionReadNext(allowEndFeedback); } @@ -323,6 +349,7 @@ bool AccessibilityAdaptorMobile::HandleActionReadPreviousEvent(bool allowEndFeed { bool ret = false; +#ifndef WAYLAND if( mIndicator && mIndicatorFocused ) { Elm_Access_Action_Info actionInfo; @@ -331,6 +358,9 @@ bool AccessibilityAdaptorMobile::HandleActionReadPreviousEvent(bool allowEndFeed ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo)); } else if( mActionHandler ) +#else + if( mActionHandler ) +#endif { ret = mActionHandler->AccessibilityActionReadPrevious(allowEndFeedback); } @@ -344,6 +374,7 @@ bool AccessibilityAdaptorMobile::HandleActionUpEvent() { bool ret = false; +#ifndef WAYLAND if( mIndicator && mIndicatorFocused ) { Elm_Access_Action_Info actionInfo; @@ -352,6 +383,9 @@ bool AccessibilityAdaptorMobile::HandleActionUpEvent() ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo)); } else if( mActionHandler ) +#else + if( mActionHandler ) +#endif { ret = mActionHandler->AccessibilityActionUp(); } @@ -365,6 +399,7 @@ bool AccessibilityAdaptorMobile::HandleActionDownEvent() { bool ret = false; +#ifndef WAYLAND if( mIndicator && mIndicatorFocused ) { Elm_Access_Action_Info actionInfo; @@ -373,6 +408,9 @@ bool AccessibilityAdaptorMobile::HandleActionDownEvent() ret = mIndicator->SendMessage(MSG_DOMAIN_CONTROL_ACCESS, actionInfo.action_type, &actionInfo, sizeof(actionInfo)); } else if( mActionHandler ) +#else + if( mActionHandler ) +#endif { ret = mActionHandler->AccessibilityActionDown(); }