9500a4d976d048eb1f1b595e290fa20746d7d62f
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / accessibility-manager / accessibility-manager-impl.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include "accessibility-manager-impl.h"
20
21 // EXTERNAL INCLUDES
22 #include <cstring> // for strcmp
23 #include <dali/public-api/actors/layer.h>
24 #include <dali/devel-api/adaptor-framework/accessibility-adaptor.h>
25 #include <dali/devel-api/adaptor-framework/sound-player.h>
26 #include <dali/public-api/animation/constraints.h>
27 #include <dali/devel-api/events/hit-test-algorithm.h>
28 #include <dali/devel-api/events/pan-gesture-devel.h>
29 #include <dali/integration-api/debug.h>
30
31 // INTERNAL INCLUDES
32 #include <dali-toolkit/devel-api/asset-manager/asset-manager.h>
33 #include <dali-toolkit/public-api/controls/control.h>
34 #include <dali-toolkit/public-api/controls/control-impl.h>
35 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
36
37 namespace Dali
38 {
39
40 namespace Toolkit
41 {
42
43 namespace Internal
44 {
45
46 namespace // unnamed namespace
47 {
48
49 // Signals
50
51 const char* const SIGNAL_FOCUS_CHANGED =           "focusChanged";
52 const char* const SIGNAL_FOCUS_OVERSHOT =          "focusOvershot";
53 const char* const SIGNAL_FOCUSED_ACTOR_ACTIVATED = "focusedActorActivated";
54
55 #if defined(DEBUG_ENABLED)
56 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_FOCUS_MANAGER");
57 #endif
58
59 const char* const ACTOR_FOCUSABLE("focusable");
60 const char* const IS_FOCUS_GROUP("isFocusGroup");
61
62 const char* FOCUS_BORDER_IMAGE_FILE_NAME = "B16-8_TTS_focus.9.png";
63
64 const char* FOCUS_SOUND_FILE_NAME = "Focus.ogg";
65 const char* FOCUS_CHAIN_END_SOUND_FILE_NAME = "End_of_List.ogg";
66
67 /**
68  * The function to be used in the hit-test algorithm to check whether the actor is hittable.
69  */
70 bool IsActorFocusableFunction(Actor actor, Dali::HitTestAlgorithm::TraverseType type)
71 {
72   bool hittable = false;
73
74   switch (type)
75   {
76     case Dali::HitTestAlgorithm::CHECK_ACTOR:
77     {
78       // Check whether the actor is visible and not fully transparent.
79       if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE )
80        && actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f) // not FULLY_TRANSPARENT
81       {
82         // Check whether the actor is focusable
83         Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
84         if(propertyActorFocusable != Property::INVALID_INDEX)
85         {
86           hittable = actor.GetProperty<bool>(propertyActorFocusable);
87         }
88       }
89       break;
90     }
91     case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE:
92     {
93       if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ) // Actor is visible, if not visible then none of its children are visible.
94       {
95         hittable = true;
96       }
97       break;
98     }
99     default:
100     {
101       break;
102     }
103   }
104
105   return hittable;
106 };
107
108 }
109
110 AccessibilityManager::AccessibilityManager()
111 : mCurrentFocusActor(FocusIDPair(0, 0)),
112   mCurrentGesturedActor(),
113   mFocusIndicatorActor(),
114   mPreviousPosition( 0.0f, 0.0f ),
115   mRecursiveFocusMoveCounter(0),
116   mFocusSoundFilePath(),
117   mFocusChainEndSoundFilePath(),
118   mIsWrapped(false),
119   mIsFocusWithinGroup(false),
120   mIsEndcapFeedbackEnabled(false),
121   mIsEndcapFeedbackPlayed(false),
122   mIsAccessibilityTtsEnabled(false),
123   mTtsCreated(false),
124   mIsFocusIndicatorEnabled(false),
125   mContinuousPlayMode(false),
126   mIsFocusSoundFilePathSet(false),
127   mIsFocusChainEndSoundFilePathSet(false)
128 {
129 }
130
131 AccessibilityManager::~AccessibilityManager()
132 {
133 }
134
135 void AccessibilityManager::Initialise()
136 {
137   AccessibilityAdaptor adaptor = AccessibilityAdaptor::Get();
138   adaptor.SetActionHandler(*this);
139   adaptor.SetGestureHandler(*this);
140
141   ChangeAccessibilityStatus();
142 }
143
144 AccessibilityManager::ActorAdditionalInfo AccessibilityManager::GetActorAdditionalInfo(const unsigned int actorID) const
145 {
146   ActorAdditionalInfo data;
147   IDAdditionalInfoConstIter iter = mIDAdditionalInfoContainer.find(actorID);
148   if(iter != mIDAdditionalInfoContainer.end())
149   {
150     data = (*iter).second;
151   }
152
153   return data;
154 }
155
156 void AccessibilityManager::SynchronizeActorAdditionalInfo(const unsigned int actorID, const unsigned int order)
157 {
158   ActorAdditionalInfo actorInfo = GetActorAdditionalInfo(actorID);
159   actorInfo.mFocusOrder = order;
160   mIDAdditionalInfoContainer.erase(actorID);
161   mIDAdditionalInfoContainer.insert(IDAdditionalInfoPair(actorID, actorInfo));
162 }
163
164 void AccessibilityManager::SetAccessibilityAttribute(Actor actor, Toolkit::AccessibilityManager::AccessibilityAttribute type, const std::string& text)
165 {
166   if(actor)
167   {
168     unsigned int actorID = actor.GetProperty< int >( Actor::Property::ID );
169
170     ActorAdditionalInfo info = GetActorAdditionalInfo(actorID);
171     info.mAccessibilityAttributes[type] = text;
172
173     mIDAdditionalInfoContainer.erase(actorID);
174     mIDAdditionalInfoContainer.insert(IDAdditionalInfoPair(actorID, info));
175   }
176 }
177
178 void AccessibilityManager::DeleteAccessibilityAttribute(Actor actor)
179 {
180   if(actor)
181   {
182     unsigned int actorID = actor.GetProperty< int >( Actor::Property::ID );
183     mIDAdditionalInfoContainer.erase(actorID);
184   }
185 }
186
187 std::string AccessibilityManager::GetAccessibilityAttribute(Actor actor, Toolkit::AccessibilityManager::AccessibilityAttribute type) const
188 {
189   std::string text;
190
191   if(actor)
192   {
193     ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ));
194     text = data.mAccessibilityAttributes[type];
195   }
196
197   return text;
198 }
199
200 void AccessibilityManager::SetFocusOrder(Actor actor, const unsigned int order)
201 {
202   // Do nothing if the focus order of the actor is not changed.
203   if(actor && GetFocusOrder(actor) != order)
204   {
205     // Firstly delete the actor from the focus chain if it's already there with a different focus order.
206     mFocusIDContainer.erase(GetFocusOrder(actor));
207
208     // Create/retrieve actor focusable property
209     Property::Index propertyActorFocusable = actor.RegisterProperty( ACTOR_FOCUSABLE, true, Property::READ_WRITE );
210
211     if(order == 0)
212     {
213       // The actor is not focusable without a defined focus order.
214       actor.SetProperty(propertyActorFocusable, false);
215
216       // If the actor is currently being focused, it should clear the focus
217       if(actor == GetCurrentFocusActor())
218       {
219         ClearFocus();
220       }
221     }
222     else // Insert the actor to the focus chain
223     {
224       // Check whether there is another actor in the focus chain with the same focus order already.
225       FocusIDIter focusIDIter = mFocusIDContainer.find(order);
226       if(focusIDIter != mFocusIDContainer.end())
227       {
228         // We need to increase the focus order of that actor and all the actors followed it
229         // in the focus chain.
230         FocusIDIter lastIter = mFocusIDContainer.end();
231         --lastIter;//We want forward iterator to the last element here
232         mFocusIDContainer.insert(FocusIDPair((*lastIter).first + 1, (*lastIter).second));
233
234         // Update the actor's focus order in its additional data
235         SynchronizeActorAdditionalInfo((*lastIter).second, (*lastIter).first + 1);
236
237         for(FocusIDIter iter = lastIter; iter != focusIDIter; iter--)
238         {
239           FocusIDIter previousIter = iter;
240           --previousIter;//We want forward iterator to the previous element here
241           unsigned int actorID = (*previousIter).second;
242           (*iter).second = actorID;
243
244           // Update the actor's focus order in its additional data
245           SynchronizeActorAdditionalInfo(actorID, (*iter).first);
246         }
247
248         mFocusIDContainer.erase(order);
249       }
250
251       // The actor is focusable
252       actor.SetProperty(propertyActorFocusable, true);
253
254       // Now we insert the actor into the focus chain with the specified focus order
255       mFocusIDContainer.insert(FocusIDPair(order, actor.GetProperty< int >( Actor::Property::ID )));
256     }
257
258     // Update the actor's focus order in its additional data
259     SynchronizeActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ), order);
260   }
261 }
262
263 unsigned int AccessibilityManager::GetFocusOrder(Actor actor) const
264 {
265   unsigned int focusOrder = 0;
266
267   if(actor)
268   {
269     ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ));
270     focusOrder = data.mFocusOrder;
271   }
272
273   return focusOrder;
274 }
275
276 unsigned int AccessibilityManager::GenerateNewFocusOrder() const
277 {
278   unsigned int order = 1;
279   FocusIDContainer::const_reverse_iterator iter = mFocusIDContainer.rbegin();
280
281   if(iter != mFocusIDContainer.rend())
282   {
283     order = (*iter).first + 1;
284   }
285
286   return order;
287 }
288
289 Actor AccessibilityManager::GetActorByFocusOrder(const unsigned int order)
290 {
291   Actor actor = Actor();
292
293   FocusIDIter focusIDIter = mFocusIDContainer.find(order);
294   if(focusIDIter != mFocusIDContainer.end())
295   {
296     Actor rootActor = Stage::GetCurrent().GetRootLayer();
297     actor = rootActor.FindChildById(mFocusIDContainer[order]);
298   }
299
300   return actor;
301 }
302
303 bool AccessibilityManager::SetCurrentFocusActor(Actor actor)
304 {
305   if(actor)
306   {
307     return DoSetCurrentFocusActor(actor.GetProperty< int >( Actor::Property::ID ));
308   }
309
310   return false;
311 }
312
313 bool AccessibilityManager::DoSetCurrentFocusActor(const unsigned int actorID)
314 {
315   Actor rootActor = Stage::GetCurrent().GetRootLayer();
316
317   // If the group mode is enabled, check which focus group the current focused actor belongs to
318   Actor focusGroup;
319   if(mIsFocusWithinGroup)
320   {
321     focusGroup = GetFocusGroup(GetCurrentFocusActor());
322   }
323
324   if(!focusGroup)
325   {
326     focusGroup = rootActor;
327   }
328
329   Actor actor = focusGroup.FindChildById(actorID);
330
331   // Check whether the actor is in the stage
332   if(actor)
333   {
334     // Check whether the actor is focusable
335     bool actorFocusable = false;
336     Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
337     if(propertyActorFocusable != Property::INVALID_INDEX)
338     {
339       actorFocusable = actor.GetProperty<bool>(propertyActorFocusable);
340     }
341
342     // Go through the actor's hierarchy to check whether the actor is visible
343     bool actorVisible = actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE );
344     Actor parent = actor.GetParent();
345     while (actorVisible && parent && parent != rootActor)
346     {
347       actorVisible = parent.GetCurrentProperty< bool >( Actor::Property::VISIBLE );
348       parent = parent.GetParent();
349     }
350
351     // Check whether the actor is fully transparent
352     bool actorOpaque = actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f;
353
354     // Set the focus only when the actor is focusable and visible and not fully transparent
355     if(actorVisible && actorFocusable && actorOpaque)
356     {
357       // Draw the focus indicator upon the focused actor
358       if( mIsFocusIndicatorEnabled )
359       {
360         actor.Add( GetFocusIndicatorActor() );
361       }
362
363       // Send notification for the change of focus actor
364       mFocusChangedSignal.Emit( GetCurrentFocusActor(), actor );
365
366       // Save the current focused actor
367       mCurrentFocusActor = FocusIDPair(GetFocusOrder(actor), actorID);
368
369       if(mIsAccessibilityTtsEnabled)
370       {
371         Dali::SoundPlayer soundPlayer = Dali::SoundPlayer::Get();
372         if(soundPlayer)
373         {
374           if (!mIsFocusSoundFilePathSet)
375           {
376             const std::string soundDirPath = AssetManager::GetDaliSoundPath();
377             mFocusSoundFilePath = soundDirPath + FOCUS_SOUND_FILE_NAME;
378             mIsFocusSoundFilePathSet = true;
379           }
380           soundPlayer.PlaySound(mFocusSoundFilePath);
381         }
382
383         // Play the accessibility attributes with the TTS player.
384         Dali::TtsPlayer player = Dali::TtsPlayer::Get(Dali::TtsPlayer::SCREEN_READER);
385
386         // Combine attribute texts to one text
387         std::string informationText;
388         for(int i = 0; i < Toolkit::AccessibilityManager::ACCESSIBILITY_ATTRIBUTE_NUM; i++)
389         {
390           if(!GetActorAdditionalInfo(actorID).mAccessibilityAttributes[i].empty())
391           {
392             if( i > 0 )
393             {
394               informationText += ", "; // for space time between each information
395             }
396             informationText += GetActorAdditionalInfo(actorID).mAccessibilityAttributes[i];
397           }
398         }
399         player.Play(informationText);
400       }
401
402       return true;
403     }
404   }
405
406   DALI_LOG_WARNING("[%s:%d] FAILED\n", __FUNCTION__, __LINE__);
407   return false;
408 }
409
410 Actor AccessibilityManager::GetCurrentFocusActor()
411 {
412   Actor rootActor = Stage::GetCurrent().GetRootLayer();
413   return rootActor.FindChildById(mCurrentFocusActor.second);
414 }
415
416 Actor AccessibilityManager::GetCurrentFocusGroup()
417 {
418   return GetFocusGroup(GetCurrentFocusActor());
419 }
420
421 unsigned int AccessibilityManager::GetCurrentFocusOrder()
422 {
423   return mCurrentFocusActor.first;
424 }
425
426 bool AccessibilityManager::MoveFocusForward()
427 {
428   bool ret = false;
429   mRecursiveFocusMoveCounter = 0;
430
431   FocusIDIter focusIDIter = mFocusIDContainer.find(mCurrentFocusActor.first);
432   if(focusIDIter != mFocusIDContainer.end())
433   {
434     DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] focus order : %d\n", __FUNCTION__, __LINE__, (*focusIDIter).first);
435     ret = DoMoveFocus(focusIDIter, true, mIsWrapped);
436   }
437   else
438   {
439     // TODO: if there is not focused actor, move first actor
440     if(!mFocusIDContainer.empty())
441     {
442       //if there is not focused actor, move 1st actor
443       focusIDIter = mFocusIDContainer.begin(); // TODO: I'm not sure it was sorted.
444       DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] focus order : %d\n", __FUNCTION__, __LINE__, (*focusIDIter).first);
445       ret = DoSetCurrentFocusActor((*focusIDIter).second);
446     }
447   }
448
449   DALI_LOG_INFO( gLogFilter, Debug::General, "[%s] %s\n", __FUNCTION__, ret?"SUCCEED!!!":"FAILED!!!");
450
451   return ret;
452 }
453
454 bool AccessibilityManager::MoveFocusBackward()
455 {
456   bool ret = false;
457   mRecursiveFocusMoveCounter = 0;
458
459   FocusIDIter focusIDIter = mFocusIDContainer.find(mCurrentFocusActor.first);
460   if(focusIDIter != mFocusIDContainer.end())
461   {
462     DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] focus order : %d\n", __FUNCTION__, __LINE__, (*focusIDIter).first);
463     ret = DoMoveFocus(focusIDIter, false, mIsWrapped);
464   }
465   else
466   {
467     // TODO: if there is not focused actor, move last actor
468     if(!mFocusIDContainer.empty())
469     {
470       //if there is not focused actor, move last actor
471       focusIDIter = mFocusIDContainer.end();
472       --focusIDIter;//We want forward iterator to the last element here
473       DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] focus order : %d\n", __FUNCTION__, __LINE__, (*focusIDIter).first);
474       ret = DoSetCurrentFocusActor((*focusIDIter).second);
475     }
476   }
477
478   DALI_LOG_INFO( gLogFilter, Debug::General, "[%s] %s\n", __FUNCTION__, ret?"SUCCEED!!!":"FAILED!!!");
479
480   return ret;
481 }
482
483 void AccessibilityManager::DoActivate(Actor actor)
484 {
485   if(actor)
486   {
487     Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
488     if(control)
489     {
490       // Notify the control that it is activated
491       GetImplementation( control ).AccessibilityActivate();
492     }
493
494     // Send notification for the activation of focused actor
495     mFocusedActorActivatedSignal.Emit(actor);
496   }
497 }
498
499 void AccessibilityManager::ClearFocus()
500 {
501   Actor actor = GetCurrentFocusActor();
502   if( actor && mFocusIndicatorActor )
503   {
504     actor.Remove( mFocusIndicatorActor );
505   }
506
507   mCurrentFocusActor = FocusIDPair(0, 0);
508
509   // Send notification for the change of focus actor
510   mFocusChangedSignal.Emit(actor, Actor());
511
512   if(mIsAccessibilityTtsEnabled)
513   {
514     // Stop the TTS playing if any
515     Dali::TtsPlayer player = Dali::TtsPlayer::Get(Dali::TtsPlayer::SCREEN_READER);
516     player.Stop();
517   }
518 }
519
520 void AccessibilityManager::Reset()
521 {
522   ClearFocus();
523   mFocusIDContainer.clear();
524   mIDAdditionalInfoContainer.clear();
525 }
526
527 void AccessibilityManager::SetFocusGroup(Actor actor, bool isFocusGroup)
528 {
529   if(actor)
530   {
531     // Create/Set focus group property.
532     actor.RegisterProperty( IS_FOCUS_GROUP, isFocusGroup, Property::READ_WRITE );
533   }
534 }
535
536 bool AccessibilityManager::IsFocusGroup(Actor actor) const
537 {
538   // Check whether the actor is a focus group
539   bool isFocusGroup = false;
540
541   if(actor)
542   {
543     Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP);
544     if(propertyIsFocusGroup != Property::INVALID_INDEX)
545     {
546       isFocusGroup = actor.GetProperty<bool>(propertyIsFocusGroup);
547     }
548   }
549
550   return isFocusGroup;
551 }
552
553 Actor AccessibilityManager::GetFocusGroup(Actor actor)
554 {
555   // Go through the actor's hierarchy to check which focus group the actor belongs to
556   while (actor && !IsFocusGroup(actor))
557   {
558     actor = actor.GetParent();
559   }
560
561   return actor;
562 }
563
564 Vector2 AccessibilityManager::GetReadPosition() const
565 {
566   AccessibilityAdaptor adaptor = AccessibilityAdaptor::Get();
567   return adaptor.GetReadPosition();
568 }
569
570 void AccessibilityManager::EnableAccessibility(bool enabled)
571 {
572   DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] Set Enabled Forcibly : %d \n", __FUNCTION__, __LINE__, enabled );
573   AccessibilityAdaptor adaptor = AccessibilityAdaptor::Get();
574   adaptor.EnableAccessibility(enabled);
575 }
576
577 bool AccessibilityManager::IsEnabled() const
578 {
579   AccessibilityAdaptor adaptor = AccessibilityAdaptor::Get();
580   return adaptor.IsEnabled();
581 }
582
583 void AccessibilityManager::SetGroupMode(bool enabled)
584 {
585   mIsFocusWithinGroup = enabled;
586 }
587
588 bool AccessibilityManager::GetGroupMode() const
589 {
590   return mIsFocusWithinGroup;
591 }
592
593 void AccessibilityManager::SetWrapMode(bool wrapped)
594 {
595   mIsWrapped = wrapped;
596 }
597
598 bool AccessibilityManager::GetWrapMode() const
599 {
600   return mIsWrapped;
601 }
602
603 void AccessibilityManager::SetFocusIndicatorActor(Actor indicator)
604 {
605   if( mFocusIndicatorActor != indicator )
606   {
607     Actor currentFocusActor = GetCurrentFocusActor();
608     if( currentFocusActor )
609     {
610       // The new focus indicator should be added to the current focused actor immediately
611       if( mFocusIndicatorActor )
612       {
613         currentFocusActor.Remove( mFocusIndicatorActor );
614       }
615
616       if( indicator )
617       {
618         currentFocusActor.Add( indicator );
619       }
620     }
621
622     mFocusIndicatorActor = indicator;
623   }
624 }
625
626 Actor AccessibilityManager::GetFocusIndicatorActor()
627 {
628   if( ! mFocusIndicatorActor )
629   {
630     // Create the default if it hasn't been set and one that's shared by all the keyboard focusable actors
631     const std::string imageDirPath = AssetManager::GetDaliImagePath();
632     const std::string focusBorderImagePath = imageDirPath + FOCUS_BORDER_IMAGE_FILE_NAME;
633
634     mFocusIndicatorActor = Toolkit::ImageView::New(focusBorderImagePath);
635     mFocusIndicatorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
636     mFocusIndicatorActor.SetProperty( Actor::Property::POSITION_Z,  1.0f );
637
638     // Apply size constraint to the focus indicator
639     mFocusIndicatorActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
640   }
641
642   return mFocusIndicatorActor;
643 }
644
645 bool AccessibilityManager::DoMoveFocus(FocusIDIter focusIDIter, bool forward, bool wrapped)
646 {
647   DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] %d focusable actors\n", __FUNCTION__, __LINE__, mFocusIDContainer.size());
648   DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] focus order : %d\n", __FUNCTION__, __LINE__, (*focusIDIter).first);
649
650   if( (forward && ++focusIDIter == mFocusIDContainer.end())
651     || (!forward && focusIDIter-- == mFocusIDContainer.begin()) )
652   {
653     if(mIsEndcapFeedbackEnabled)
654     {
655       if(mIsEndcapFeedbackPlayed == false)
656       {
657         // play sound & skip moving once
658         Dali::SoundPlayer soundPlayer = Dali::SoundPlayer::Get();
659         if(soundPlayer)
660         {
661           if (!mIsFocusChainEndSoundFilePathSet)
662           {
663             const std::string soundDirPath = AssetManager::GetDaliSoundPath();
664             mFocusChainEndSoundFilePath = soundDirPath + FOCUS_CHAIN_END_SOUND_FILE_NAME;
665             mIsFocusChainEndSoundFilePathSet = true;
666           }
667           soundPlayer.PlaySound(mFocusChainEndSoundFilePath);
668         }
669
670         mIsEndcapFeedbackPlayed = true;
671         return true;
672       }
673       mIsEndcapFeedbackPlayed = false;
674     }
675
676     if(wrapped)
677     {
678       if(forward)
679       {
680         focusIDIter = mFocusIDContainer.begin();
681       }
682       else
683       {
684         focusIDIter = mFocusIDContainer.end();
685         --focusIDIter;//We want forward iterator to the last element here
686       }
687     }
688     else
689     {
690       DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] Overshot\n", __FUNCTION__, __LINE__);
691       // Send notification for handling overshooted situation
692       mFocusOvershotSignal.Emit(GetCurrentFocusActor(), forward ? Toolkit::AccessibilityManager::OVERSHOT_NEXT : Toolkit::AccessibilityManager::OVERSHOT_PREVIOUS);
693
694       return false; // Try to move the focus out of the scope
695     }
696   }
697
698   // Invalid focus.
699   if( focusIDIter == mFocusIDContainer.end() )
700   {
701     return false;
702   }
703
704   // Note: This function performs the focus change.
705   if( !DoSetCurrentFocusActor( (*focusIDIter).second ) )
706   {
707     mRecursiveFocusMoveCounter++;
708     if(mRecursiveFocusMoveCounter > mFocusIDContainer.size())
709     {
710       // We've attempted to focus all the actors in the whole focus chain and no actor
711       // can be focused successfully.
712       DALI_LOG_WARNING("[%s] There is no more focusable actor in %d focus chains\n", __FUNCTION__, mRecursiveFocusMoveCounter);
713
714       return false;
715     }
716     else
717     {
718       return DoMoveFocus(focusIDIter, forward, wrapped);
719     }
720   }
721
722   return true;
723 }
724
725 void AccessibilityManager::SetFocusable(Actor actor, bool focusable)
726 {
727   if(actor)
728   {
729     // Create/Set actor focusable property.
730     actor.RegisterProperty( ACTOR_FOCUSABLE, focusable, Property::READ_WRITE );
731   }
732 }
733
734 bool AccessibilityManager::ChangeAccessibilityStatus()
735 {
736   AccessibilityAdaptor adaptor = AccessibilityAdaptor::Get();
737   mIsAccessibilityTtsEnabled = adaptor.IsEnabled();
738   Dali::Toolkit::AccessibilityManager handle( this );
739
740   DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] TtsEnabled : %d \n", __FUNCTION__, __LINE__, mIsAccessibilityTtsEnabled );
741
742   if(mIsAccessibilityTtsEnabled)
743   {
744     // Show indicator when tts turned on if there is focused actor.
745     Actor actor = GetCurrentFocusActor();
746     if(actor)
747     {
748       actor.Add( GetFocusIndicatorActor() );
749     }
750     mIsFocusIndicatorEnabled = true;
751
752     // Connect a signal to the TTS player to implement continuous reading mode.
753     Dali::TtsPlayer player = Dali::TtsPlayer::Get( Dali::TtsPlayer::SCREEN_READER );
754     player.StateChangedSignal().Connect( this, &AccessibilityManager::TtsStateChanged );
755     mTtsCreated = true;
756   }
757   else
758   {
759     // Hide indicator when tts turned off
760     Actor actor = GetCurrentFocusActor();
761     if( actor && mFocusIndicatorActor )
762     {
763       actor.Remove( mFocusIndicatorActor );
764     }
765     mIsFocusIndicatorEnabled = false;
766
767     if( mTtsCreated )
768     {
769       // Disconnect the TTS state change signal.
770       Dali::TtsPlayer player = Dali::TtsPlayer::Get( Dali::TtsPlayer::SCREEN_READER );
771       player.StateChangedSignal().Disconnect( this, &AccessibilityManager::TtsStateChanged );
772       mTtsCreated = true;
773     }
774   }
775
776   mStatusChangedSignal.Emit( handle );
777
778   return true;
779 }
780
781 bool AccessibilityManager::AccessibilityActionNext(bool allowEndFeedback)
782 {
783   Dali::Toolkit::AccessibilityManager handle( this );
784   if( !mActionNextSignal.Empty() )
785   {
786     mActionNextSignal.Emit( handle );
787   }
788
789   if(mIsAccessibilityTtsEnabled)
790   {
791     mIsEndcapFeedbackEnabled = allowEndFeedback;
792     return MoveFocusForward();
793   }
794   else
795   {
796     return false;
797   }
798 }
799
800 bool AccessibilityManager::AccessibilityActionPrevious(bool allowEndFeedback)
801 {
802   Dali::Toolkit::AccessibilityManager handle( this );
803   if( !mActionPreviousSignal.Empty() )
804   {
805     mActionPreviousSignal.Emit( handle );
806   }
807
808   if(mIsAccessibilityTtsEnabled)
809   {
810     mIsEndcapFeedbackEnabled = allowEndFeedback;
811     return MoveFocusBackward();
812   }
813   else
814   {
815     return false;
816   }
817 }
818
819 bool AccessibilityManager::AccessibilityActionActivate()
820 {
821   Dali::Toolkit::AccessibilityManager handle( this );
822   if( !mActionActivateSignal.Empty() )
823   {
824     mActionActivateSignal.Emit( handle );
825   }
826
827   bool ret = false;
828
829   Actor actor = GetCurrentFocusActor();
830   if(actor)
831   {
832     DoActivate(actor);
833     ret = true;
834   }
835
836   return ret;
837 }
838
839 bool AccessibilityManager::AccessibilityActionRead(bool allowReadAgain)
840 {
841   Dali::Toolkit::AccessibilityManager handle( this );
842
843   if( allowReadAgain )
844   {
845     if ( !mActionReadSignal.Empty() )
846     {
847       mActionReadSignal.Emit( handle );
848     }
849   }
850   else
851   {
852     if ( !mActionOverSignal.Empty() )
853     {
854       mActionOverSignal.Emit( handle );
855     }
856   }
857
858   bool ret = false;
859
860   if(mIsAccessibilityTtsEnabled)
861   {
862     // Find the focusable actor at the read position
863     AccessibilityAdaptor adaptor = AccessibilityAdaptor::Get();
864     Dali::HitTestAlgorithm::Results results;
865     Dali::HitTestAlgorithm::HitTest( Stage::GetCurrent(), adaptor.GetReadPosition(), results, IsActorFocusableFunction );
866
867     FocusIDIter focusIDIter = mFocusIDContainer.find(GetFocusOrder(results.actor));
868     if(focusIDIter != mFocusIDContainer.end())
869     {
870       if( allowReadAgain || (results.actor != GetCurrentFocusActor()) )
871       {
872         // Move the focus to the actor
873         ret = SetCurrentFocusActor(results.actor);
874         DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] SetCurrentFocusActor returns %s\n", __FUNCTION__, __LINE__, ret?"TRUE":"FALSE");
875       }
876     }
877   }
878
879   return ret;
880 }
881
882 bool AccessibilityManager::AccessibilityActionReadNext(bool allowEndFeedback)
883 {
884   Dali::Toolkit::AccessibilityManager handle( this );
885   if( !mActionReadNextSignal.Empty() )
886   {
887     mActionReadNextSignal.Emit( handle );
888   }
889
890   if(mIsAccessibilityTtsEnabled)
891   {
892     return MoveFocusForward();
893   }
894   else
895   {
896     return false;
897   }
898 }
899
900 bool AccessibilityManager::AccessibilityActionReadPrevious(bool allowEndFeedback)
901 {
902   Dali::Toolkit::AccessibilityManager handle( this );
903   if( !mActionReadPreviousSignal.Empty() )
904   {
905     mActionReadPreviousSignal.Emit( handle );
906   }
907
908   if(mIsAccessibilityTtsEnabled)
909   {
910     return MoveFocusBackward();
911   }
912   else
913   {
914     return false;
915   }
916 }
917
918 bool AccessibilityManager::AccessibilityActionUp()
919 {
920   Dali::Toolkit::AccessibilityManager handle( this );
921   if( !mActionUpSignal.Empty() )
922   {
923     mActionUpSignal.Emit( handle );
924   }
925
926   bool ret = false;
927
928   if(mIsAccessibilityTtsEnabled)
929   {
930     Actor actor = GetCurrentFocusActor();
931     if(actor)
932     {
933       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
934       if(control)
935       {
936         // Notify the control that it is activated
937         ret = GetImplementation( control ).OnAccessibilityValueChange(true);
938       }
939     }
940   }
941
942   return ret;
943 }
944
945 bool AccessibilityManager::AccessibilityActionDown()
946 {
947   Dali::Toolkit::AccessibilityManager handle( this );
948   if( !mActionDownSignal.Empty() )
949   {
950     mActionDownSignal.Emit( handle );
951   }
952
953   bool ret = false;
954
955   if(mIsAccessibilityTtsEnabled)
956   {
957     Actor actor = GetCurrentFocusActor();
958     if(actor)
959     {
960       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
961       if(control)
962       {
963         // Notify the control that it is activated
964         ret = GetImplementation( control ).OnAccessibilityValueChange(false);
965       }
966     }
967   }
968
969   return ret;
970 }
971
972 bool AccessibilityManager::ClearAccessibilityFocus()
973 {
974   Dali::Toolkit::AccessibilityManager handle( this );
975   if( !mActionClearFocusSignal.Empty() )
976   {
977     mActionClearFocusSignal.Emit( handle );
978   }
979
980   if(mIsAccessibilityTtsEnabled)
981   {
982     ClearFocus();
983     return true;
984   }
985   else
986   {
987     return false;
988   }
989 }
990
991 bool AccessibilityManager::AccessibilityActionScroll( Dali::TouchEvent& touch )
992 {
993   Dali::Toolkit::AccessibilityManager handle( this );
994   if( !mActionScrollSignal.Empty() )
995   {
996     mActionScrollSignal.Emit( handle, touch );
997   }
998
999   return true;
1000 }
1001
1002 bool AccessibilityManager::AccessibilityActionBack()
1003 {
1004   Dali::Toolkit::AccessibilityManager handle( this );
1005   if( !mActionBackSignal.Empty() )
1006   {
1007     mActionBackSignal.Emit( handle );
1008   }
1009
1010   // TODO: Back to previous view
1011
1012   return mIsAccessibilityTtsEnabled;
1013 }
1014
1015 bool AccessibilityManager::AccessibilityActionScrollUp()
1016 {
1017   Dali::Toolkit::AccessibilityManager handle( this );
1018   if( !mActionScrollUpSignal.Empty() )
1019   {
1020     mActionScrollUpSignal.Emit( handle );
1021   }
1022
1023   bool ret = false;
1024
1025   if(mIsAccessibilityTtsEnabled)
1026   {
1027     Actor actor = GetCurrentFocusActor();
1028     if(actor)
1029     {
1030       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
1031       if(control)
1032       {
1033         // TODO: Notify the control to scroll up. Should control handle this?
1034 //        ret = GetImplementation( control ).OnAccessibilityScroll(Direction::UP);
1035       }
1036     }
1037   }
1038
1039   return ret;
1040 }
1041
1042 bool AccessibilityManager::AccessibilityActionScrollDown()
1043 {
1044   Dali::Toolkit::AccessibilityManager handle( this );
1045   if( !mActionScrollDownSignal.Empty() )
1046   {
1047     mActionScrollDownSignal.Emit( handle );
1048   }
1049
1050   bool ret = false;
1051
1052   if(mIsAccessibilityTtsEnabled)
1053   {
1054     Actor actor = GetCurrentFocusActor();
1055     if(actor)
1056     {
1057       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
1058       if(control)
1059       {
1060         // TODO: Notify the control to scroll down. Should control handle this?
1061 //        ret = GetImplementation( control ).OnAccessibilityScrollDown(Direction::DOWN);
1062       }
1063     }
1064   }
1065
1066   return ret;
1067 }
1068
1069 bool AccessibilityManager::AccessibilityActionPageLeft()
1070 {
1071   Dali::Toolkit::AccessibilityManager handle( this );
1072   if( !mActionPageLeftSignal.Empty() )
1073   {
1074     mActionPageLeftSignal.Emit( handle );
1075   }
1076
1077   bool ret = false;
1078
1079   if(mIsAccessibilityTtsEnabled)
1080   {
1081     Actor actor = GetCurrentFocusActor();
1082     if(actor)
1083     {
1084       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
1085       if(control)
1086       {
1087         // TODO: Notify the control to scroll left to the previous page. Should control handle this?
1088 //        ret = GetImplementation( control ).OnAccessibilityScrollToPage(Direction::LEFT);
1089       }
1090     }
1091   }
1092
1093   return ret;
1094 }
1095
1096 bool AccessibilityManager::AccessibilityActionPageRight()
1097 {
1098   Dali::Toolkit::AccessibilityManager handle( this );
1099   if( !mActionPageRightSignal.Empty() )
1100   {
1101     mActionPageRightSignal.Emit( handle );
1102   }
1103
1104   bool ret = false;
1105
1106   if(mIsAccessibilityTtsEnabled)
1107   {
1108     Actor actor = GetCurrentFocusActor();
1109     if(actor)
1110     {
1111       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
1112       if(control)
1113       {
1114         // TODO: Notify the control to scroll right to the next page. Should control handle this?
1115 //        ret = GetImplementation( control ).OnAccessibilityScrollToPage(Direction::RIGHT);
1116       }
1117     }
1118   }
1119
1120   return ret;
1121 }
1122
1123 bool AccessibilityManager::AccessibilityActionPageUp()
1124 {
1125   Dali::Toolkit::AccessibilityManager handle( this );
1126   if( !mActionPageUpSignal.Empty() )
1127   {
1128     mActionPageUpSignal.Emit( handle );
1129   }
1130
1131   bool ret = false;
1132
1133   if(mIsAccessibilityTtsEnabled)
1134   {
1135     Actor actor = GetCurrentFocusActor();
1136     if(actor)
1137     {
1138       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
1139       if(control)
1140       {
1141         // TODO: Notify the control to scroll up to the previous page. Should control handle this?
1142 //        ret = GetImplementation( control ).OnAccessibilityScrollToPage(Direction::UP);
1143       }
1144     }
1145   }
1146
1147   return ret;
1148 }
1149
1150 bool AccessibilityManager::AccessibilityActionPageDown()
1151 {
1152   Dali::Toolkit::AccessibilityManager handle( this );
1153   if( !mActionPageDownSignal.Empty() )
1154   {
1155     mActionPageDownSignal.Emit( handle );
1156   }
1157
1158   bool ret = false;
1159
1160   if(mIsAccessibilityTtsEnabled)
1161   {
1162     Actor actor = GetCurrentFocusActor();
1163     if(actor)
1164     {
1165       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
1166       if(control)
1167       {
1168         // TODO: Notify the control to scroll down to the next page. Should control handle this?
1169 //        ret = GetImplementation( control ).OnAccessibilityScrollToPage(Direction::DOWN);
1170       }
1171     }
1172   }
1173
1174   return ret;
1175 }
1176
1177 bool AccessibilityManager::AccessibilityActionMoveToFirst()
1178 {
1179   Dali::Toolkit::AccessibilityManager handle( this );
1180   if( !mActionMoveToFirstSignal.Empty() )
1181   {
1182     mActionMoveToFirstSignal.Emit( handle );
1183   }
1184
1185   // TODO: Move to the first item on screen
1186
1187   return mIsAccessibilityTtsEnabled;
1188 }
1189
1190 bool AccessibilityManager::AccessibilityActionMoveToLast()
1191 {
1192   Dali::Toolkit::AccessibilityManager handle( this );
1193   if( !mActionMoveToLastSignal.Empty() )
1194   {
1195     mActionMoveToLastSignal.Emit( handle );
1196   }
1197
1198   // TODO: Move to the last item on screen
1199
1200   return mIsAccessibilityTtsEnabled;
1201 }
1202
1203 bool AccessibilityManager::AccessibilityActionReadFromTop()
1204 {
1205   Dali::Toolkit::AccessibilityManager handle( this );
1206   if( !mActionReadFromTopSignal.Empty() )
1207   {
1208     mActionReadFromTopSignal.Emit( handle );
1209   }
1210
1211   // TODO: Move to the top item on screen and read from the item continuously
1212
1213   return mIsAccessibilityTtsEnabled;
1214 }
1215
1216 bool AccessibilityManager::AccessibilityActionReadFromNext()
1217 {
1218   Dali::Toolkit::AccessibilityManager handle( this );
1219
1220   if( !mActionReadFromNextSignal.Empty() )
1221   {
1222     mActionReadFromNextSignal.Emit( handle );
1223   }
1224
1225   if( mIsAccessibilityTtsEnabled )
1226   {
1227     // Mark that we are in continuous play mode, so TTS signals can move focus.
1228     mContinuousPlayMode = true;
1229
1230     // Attempt to move to the next item and read from the item continuously.
1231     MoveFocusForward();
1232   }
1233
1234   return mIsAccessibilityTtsEnabled;
1235 }
1236
1237 void AccessibilityManager::TtsStateChanged( const Dali::TtsPlayer::State previousState, const Dali::TtsPlayer::State currentState )
1238 {
1239   if( mContinuousPlayMode )
1240   {
1241     // If we were playing and now we have stopped, attempt to play the next item.
1242     if( ( previousState == Dali::TtsPlayer::PLAYING ) && ( currentState == Dali::TtsPlayer::READY ) )
1243     {
1244       // Attempt to move the focus forward and play.
1245       // If we can't cancel continuous play mode.
1246       if( !MoveFocusForward() )
1247       {
1248         // We are done, exit continuous play mode.
1249         mContinuousPlayMode = false;
1250       }
1251     }
1252     else
1253     {
1254       // Unexpected play state change, exit continuous play mode.
1255       mContinuousPlayMode = false;
1256     }
1257   }
1258 }
1259
1260 bool AccessibilityManager::AccessibilityActionZoom()
1261 {
1262   Dali::Toolkit::AccessibilityManager handle( this );
1263   if( !mActionZoomSignal.Empty() )
1264   {
1265     mActionZoomSignal.Emit( handle );
1266   }
1267
1268   bool ret = false;
1269
1270   if(mIsAccessibilityTtsEnabled)
1271   {
1272     Actor actor = GetCurrentFocusActor();
1273     if(actor)
1274     {
1275       Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(actor);
1276       if(control)
1277       {
1278         // Notify the control to zoom
1279         ret = GetImplementation( control ).OnAccessibilityZoom();
1280       }
1281     }
1282   }
1283
1284   return ret;
1285 }
1286
1287 bool AccessibilityManager::AccessibilityActionReadPauseResume()
1288 {
1289   Dali::Toolkit::AccessibilityManager handle( this );
1290   if( !mActionReadPauseResumeSignal.Empty() )
1291   {
1292     mActionReadPauseResumeSignal.Emit( handle );
1293   }
1294
1295   bool ret = false;
1296
1297   if(mIsAccessibilityTtsEnabled)
1298   {
1299     // Pause or resume the TTS player
1300     Dali::TtsPlayer player = Dali::TtsPlayer::Get(Dali::TtsPlayer::SCREEN_READER);
1301     Dali::TtsPlayer::State state = player.GetState();
1302     if(state == Dali::TtsPlayer::PLAYING)
1303     {
1304       player.Pause();
1305       ret = true;
1306     }
1307     else if(state == Dali::TtsPlayer::PAUSED)
1308     {
1309       player.Resume();
1310       ret = true;
1311     }
1312   }
1313
1314   return ret;
1315 }
1316
1317 bool AccessibilityManager::AccessibilityActionStartStop()
1318 {
1319   Dali::Toolkit::AccessibilityManager handle( this );
1320   if( !mActionStartStopSignal.Empty() )
1321   {
1322     mActionStartStopSignal.Emit( handle );
1323   }
1324
1325   // TODO: Start/stop the current action
1326
1327   return mIsAccessibilityTtsEnabled;
1328 }
1329
1330 bool AccessibilityManager::HandlePanGesture(const AccessibilityGestureEvent& panEvent)
1331 {
1332   bool handled = false;
1333
1334   if( panEvent.state == AccessibilityGestureEvent::STARTED )
1335   {
1336     // Find the focusable actor at the event position
1337     Dali::HitTestAlgorithm::Results results;
1338     AccessibilityAdaptor adaptor = AccessibilityAdaptor::Get();
1339
1340     Dali::HitTestAlgorithm::HitTest( Stage::GetCurrent(), panEvent.currentPosition, results, IsActorFocusableFunction );
1341     mCurrentGesturedActor = results.actor;
1342
1343     if(!mCurrentGesturedActor)
1344     {
1345       DALI_LOG_ERROR("Gesture detected, but no hit actor\n");
1346     }
1347   }
1348
1349   // GestureState::FINISHED (Up) events are delivered with previous (Motion) event position
1350   // Use the real previous position; otherwise we may incorrectly get a ZERO velocity
1351   if ( AccessibilityGestureEvent::FINISHED != panEvent.state )
1352   {
1353     // Store the previous position for next GestureState::FINISHED iteration.
1354     mPreviousPosition = panEvent.previousPosition;
1355   }
1356
1357   Actor rootActor = Stage::GetCurrent().GetRootLayer();
1358
1359   Dali::PanGesture pan = DevelPanGesture::New( static_cast<Dali::GestureState>(panEvent.state) );
1360   DevelPanGesture::SetTime( pan, panEvent.time );
1361   DevelPanGesture::SetNumberOfTouches( pan, panEvent.numberOfTouches  );
1362   DevelPanGesture::SetScreenPosition( pan, panEvent.currentPosition );
1363   DevelPanGesture::SetScreenDisplacement( pan, mPreviousPosition - panEvent.currentPosition );
1364   DevelPanGesture::SetScreenVelocity( pan, Vector2( pan.GetScreenDisplacement().x / panEvent.timeDelta, pan.GetScreenDisplacement().y / panEvent.timeDelta ) );
1365
1366   // Only handle the pan gesture when the current focused actor is scrollable or within a scrollable actor
1367   while(mCurrentGesturedActor && mCurrentGesturedActor != rootActor && !handled)
1368   {
1369     Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(mCurrentGesturedActor);
1370     if(control)
1371     {
1372       Vector2 localCurrent;
1373       control.ScreenToLocal( localCurrent.x, localCurrent.y, panEvent.currentPosition.x, panEvent.currentPosition.y );
1374       DevelPanGesture::SetPosition( pan, localCurrent );
1375
1376       Vector2 localPrevious;
1377       control.ScreenToLocal( localPrevious.x, localPrevious.y, mPreviousPosition.x, mPreviousPosition.y );
1378
1379       DevelPanGesture::SetDisplacement( pan, localCurrent - localPrevious );
1380       DevelPanGesture::SetVelocity( pan, Vector2( pan.GetDisplacement().x / panEvent.timeDelta, pan.GetDisplacement().y / panEvent.timeDelta ));
1381
1382       handled = GetImplementation( control ).OnAccessibilityPan(pan);
1383     }
1384
1385     // If the gesture is not handled by the control, check its parent
1386     if(!handled)
1387     {
1388       mCurrentGesturedActor = mCurrentGesturedActor.GetParent();
1389
1390       if(!mCurrentGesturedActor)
1391       {
1392         DALI_LOG_ERROR("no more gestured actor\n");
1393       }
1394     }
1395     else
1396     {
1397       // If handled, then update the pan gesture properties
1398       PanGestureDetector::SetPanGestureProperties( pan );
1399     }
1400   }
1401
1402   return handled;
1403 }
1404
1405 Toolkit::AccessibilityManager::FocusChangedSignalType& AccessibilityManager::FocusChangedSignal()
1406 {
1407   return mFocusChangedSignal;
1408 }
1409
1410 Toolkit::AccessibilityManager::FocusOvershotSignalType& AccessibilityManager::FocusOvershotSignal()
1411 {
1412   return mFocusOvershotSignal;
1413 }
1414
1415 Toolkit::AccessibilityManager::FocusedActorActivatedSignalType& AccessibilityManager::FocusedActorActivatedSignal()
1416 {
1417   return mFocusedActorActivatedSignal;
1418 }
1419
1420 } // namespace Internal
1421
1422 } // namespace Toolkit
1423
1424 } // namespace Dali