2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include "keyboard-focus-manager-impl.h"
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/singleton-service.h>
26 #include <dali/public-api/animation/constraints.h>
27 #include <dali/public-api/common/stage.h>
28 #include <dali/public-api/events/key-event.h>
29 #include <dali/public-api/events/touch-data.h>
30 #include <dali/public-api/object/type-registry.h>
31 #include <dali/public-api/object/type-registry-helper.h>
32 #include <dali/public-api/images/resource-image.h>
33 #include <dali/integration-api/debug.h>
36 #include <dali-toolkit/public-api/controls/control.h>
37 #include <dali-toolkit/public-api/controls/control-impl.h>
38 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
39 #include <dali-toolkit/public-api/accessibility-manager/accessibility-manager.h>
40 #include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
41 #include <dali-toolkit/devel-api/controls/control-devel.h>
52 namespace // Unnamed namespace
55 #if defined(DEBUG_ENABLED)
56 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_KEYBOARD_FOCUS_MANAGER");
59 const char* const IS_FOCUS_GROUP_PROPERTY_NAME = "isKeyboardFocusGroup"; // This property will be replaced by a flag in Control.
61 const char* const FOCUS_BORDER_IMAGE_PATH = DALI_IMAGE_DIR "keyboard_focus.9.png";
65 BaseHandle handle = KeyboardFocusManager::Get();
69 SingletonService singletonService( SingletonService::Get() );
70 if ( singletonService )
72 Toolkit::KeyboardFocusManager manager = Toolkit::KeyboardFocusManager( new Internal::KeyboardFocusManager() );
73 singletonService.Register( typeid( manager ), manager );
81 DALI_TYPE_REGISTRATION_BEGIN_CREATE( Toolkit::KeyboardFocusManager, Dali::BaseHandle, Create, true )
83 DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardPreFocusChange", SIGNAL_PRE_FOCUS_CHANGE )
84 DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardFocusChanged", SIGNAL_FOCUS_CHANGED )
85 DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardFocusGroupChanged", SIGNAL_FOCUS_GROUP_CHANGED )
86 DALI_SIGNAL_REGISTRATION( Toolkit, KeyboardFocusManager, "keyboardFocusedActorEnterKey", SIGNAL_FOCUSED_ACTOR_ENTER_KEY )
88 DALI_TYPE_REGISTRATION_END()
90 const unsigned int MAX_HISTORY_AMOUNT = 30; ///< Max length of focus history stack
92 } // unnamed namespace
94 Toolkit::KeyboardFocusManager KeyboardFocusManager::Get()
96 Toolkit::KeyboardFocusManager manager;
98 SingletonService singletonService( SingletonService::Get() );
99 if ( singletonService )
101 // Check whether the keyboard focus manager is already created
102 Dali::BaseHandle handle = singletonService.GetSingleton( typeid( Toolkit::KeyboardFocusManager ) );
105 // If so, downcast the handle of singleton to keyboard focus manager
106 manager = Toolkit::KeyboardFocusManager( dynamic_cast< KeyboardFocusManager* >( handle.GetObjectPtr() ) );
113 KeyboardFocusManager::KeyboardFocusManager()
114 : mPreFocusChangeSignal(),
115 mFocusChangedSignal(),
116 mFocusGroupChangedSignal(),
117 mFocusedActorEnterKeySignal(),
118 mCurrentFocusActor( 0 ),
119 mFocusIndicatorActor(),
120 mFocusGroupLoopEnabled( false ),
121 mIsFocusIndicatorEnabled( true ),
122 mIsWaitingKeyboardFocusChangeCommit( false ),
124 mSlotDelegate( this )
126 // TODO: Get FocusIndicatorEnable constant from stylesheet to set mIsFocusIndicatorEnabled.
127 Toolkit::KeyInputFocusManager::Get().UnhandledKeyEventSignal().Connect(mSlotDelegate, &KeyboardFocusManager::OnKeyEvent);
128 Stage::GetCurrent().TouchSignal().Connect( mSlotDelegate, &KeyboardFocusManager::OnTouch );
131 KeyboardFocusManager::~KeyboardFocusManager()
135 bool KeyboardFocusManager::SetCurrentFocusActor( Actor actor )
137 DALI_ASSERT_DEBUG( !mIsWaitingKeyboardFocusChangeCommit && "Calling this function in the PreFocusChangeSignal callback?" );
139 return DoSetCurrentFocusActor( actor );
142 bool KeyboardFocusManager::DoSetCurrentFocusActor( Actor actor )
144 bool success = false;
146 Actor currentFocusedActor = GetCurrentFocusActor();
148 // If developer set focus on same actor, doing nothing
149 if( actor == currentFocusedActor )
158 // Check whether the actor is in the stage and is keyboard focusable.
159 if( actor && actor.IsKeyboardFocusable() )
161 if( mIsFocusIndicatorEnabled )
163 actor.Add( GetFocusIndicatorActor() );
166 // Send notification for the change of focus actor
167 if( !mFocusChangedSignal.Empty() )
169 mFocusChangedSignal.Emit(currentFocusedActor, actor);
172 Toolkit::Control currentlyFocusedControl = Toolkit::Control::DownCast(currentFocusedActor);
173 if( currentlyFocusedControl )
175 // Do we need it to remember if it was previously DISABLED?
176 currentlyFocusedControl.SetProperty(DevelControl::Property::STATE, DevelControl::NORMAL );
177 currentlyFocusedControl.ClearKeyInputFocus();
180 DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] Focus Changed\n", __FUNCTION__, __LINE__);
182 // Save the current focused actor
183 mCurrentFocusActor = actor.GetId();
185 Toolkit::Control newlyFocusedControl = Toolkit::Control::DownCast(actor);
186 if( newlyFocusedControl )
188 newlyFocusedControl.SetProperty(DevelControl::Property::STATE, DevelControl::FOCUSED );
189 newlyFocusedControl.SetKeyInputFocus();
192 // Push Current Focused Actor to FocusHistory
193 mFocusHistory.PushBack( &actor.GetBaseObject() );
195 // Delete first element before add new element when Stack is full.
196 if( mFocusHistory.Count() > MAX_HISTORY_AMOUNT )
198 FocusStackIterator beginPos = mFocusHistory.Begin();
199 mFocusHistory.Erase( beginPos );
202 DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] SUCCEED\n", __FUNCTION__, __LINE__);
207 DALI_LOG_WARNING("[%s:%d] FAILED\n", __FUNCTION__, __LINE__);
213 Actor KeyboardFocusManager::GetCurrentFocusActor()
215 Actor rootActor = Stage::GetCurrent().GetRootLayer();
216 return rootActor.FindChildById(mCurrentFocusActor);
219 Actor KeyboardFocusManager::GetCurrentFocusGroup()
221 return GetFocusGroup(GetCurrentFocusActor());
224 void KeyboardFocusManager::MoveFocusBackward()
226 // Find Pre Focused Actor when the list size is more than 1
227 if( mFocusHistory.Count() > 1 )
229 // Delete current focused actor in history
230 FocusStackIterator endPos = mFocusHistory.End();
231 endPos = mFocusHistory.Erase( --endPos );
233 // If pre-focused actors are not on stage, remove them in stack
234 while( !Dali::Actor::DownCast(BaseHandle(mFocusHistory[ mFocusHistory.Count() - 1 ])).OnStage() )
236 endPos = mFocusHistory.Erase( --endPos );
239 // Get pre focused actor
240 BaseObject* object = mFocusHistory[ mFocusHistory.Count() - 1 ];
241 BaseHandle handle( object );
242 Actor preFocusedActor = Dali::Actor::DownCast( handle );
244 // Delete pre focused actor in history because it will pushed again by SetCurrentFocusActor()
245 mFocusHistory.Erase( --endPos );
247 SetCurrentFocusActor( preFocusedActor );
251 bool KeyboardFocusManager::IsLayoutControl(Actor actor) const
253 Toolkit::Control control = Toolkit::Control::DownCast(actor);
254 return control && GetImplementation( control ).IsKeyboardNavigationSupported();
257 Toolkit::Control KeyboardFocusManager::GetParentLayoutControl(Actor actor) const
259 // Get the actor's parent layout control that supports two dimensional keyboard navigation
260 Actor rootActor = Stage::GetCurrent().GetRootLayer();
264 parent = actor.GetParent();
267 while( parent && !IsLayoutControl(parent) && parent != rootActor )
269 parent = parent.GetParent();
272 return Toolkit::Control::DownCast(parent);
275 bool KeyboardFocusManager::MoveFocus(Toolkit::Control::KeyboardFocus::Direction direction)
277 Actor currentFocusActor = GetCurrentFocusActor();
279 bool succeed = false;
281 // Go through the actor's hierarchy until we find a layout control that knows how to move the focus
282 Toolkit::Control parentLayoutControl = GetParentLayoutControl(currentFocusActor);
283 while(parentLayoutControl && !succeed)
285 succeed = DoMoveFocusWithinLayoutControl(parentLayoutControl, currentFocusActor, direction);
286 parentLayoutControl = GetParentLayoutControl(parentLayoutControl);
289 if(!succeed && !mPreFocusChangeSignal.Empty())
291 // Don't know how to move the focus further. The application needs to tell us which actor to move the focus to
292 mIsWaitingKeyboardFocusChangeCommit = true;
293 Actor nextFocusableActor = mPreFocusChangeSignal.Emit(currentFocusActor, Actor(), direction);
294 mIsWaitingKeyboardFocusChangeCommit = false;
296 if ( nextFocusableActor && nextFocusableActor.IsKeyboardFocusable() )
298 // Whether the next focusable actor is a layout control
299 if(IsLayoutControl(nextFocusableActor))
301 // If so, move the focus inside it.
302 Toolkit::Control layoutControl = Toolkit::Control::DownCast(nextFocusableActor);
303 succeed = DoMoveFocusWithinLayoutControl(layoutControl, currentFocusActor, direction);
307 // Otherwise, just set focus to the next focusable actor
308 succeed = SetCurrentFocusActor(nextFocusableActor);
316 bool KeyboardFocusManager::DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocus::Direction direction)
318 // Ask the control for the next actor to focus
319 Actor nextFocusableActor = GetImplementation( control ).GetNextKeyboardFocusableActor(actor, direction, mFocusGroupLoopEnabled);
320 if(nextFocusableActor)
322 if(!nextFocusableActor.IsKeyboardFocusable())
324 // If the actor is not focusable, ask the same layout control for the next actor to focus
325 return DoMoveFocusWithinLayoutControl(control, nextFocusableActor, direction);
329 Actor currentFocusActor = GetCurrentFocusActor();
330 Actor committedFocusActor = nextFocusableActor;
332 // We will try to move the focus to the actor. Emit a signal to notify the proposed actor to focus
333 // Signal handler can check the proposed actor and return a different actor if it wishes.
334 if( !mPreFocusChangeSignal.Empty() )
336 mIsWaitingKeyboardFocusChangeCommit = true;
337 committedFocusActor = mPreFocusChangeSignal.Emit(currentFocusActor, nextFocusableActor, direction);
338 mIsWaitingKeyboardFocusChangeCommit = false;
341 if (committedFocusActor && committedFocusActor.IsKeyboardFocusable())
343 // Whether the commited focusable actor is a layout control
344 if(IsLayoutControl(committedFocusActor))
346 // If so, move the focus inside it.
347 Toolkit::Control layoutControl = Toolkit::Control::DownCast(committedFocusActor);
348 return DoMoveFocusWithinLayoutControl(layoutControl, currentFocusActor, direction);
352 // Otherwise, just set focus to the next focusable actor
353 if(committedFocusActor == nextFocusableActor)
355 // If the application hasn't changed our proposed actor, we informs the layout control we will
356 // move the focus to what the control returns. The control might wish to perform some actions
357 // before the focus is actually moved.
358 GetImplementation( control ).OnKeyboardFocusChangeCommitted( committedFocusActor );
361 return SetCurrentFocusActor(committedFocusActor);
372 // No more actor can be focused in the given direction within the same layout control.
377 bool KeyboardFocusManager::DoMoveFocusToNextFocusGroup(bool forward)
379 bool succeed = false;
381 // Get the parent layout control of the current focus group
382 Toolkit::Control parentLayoutControl = GetParentLayoutControl(GetCurrentFocusGroup());
384 while(parentLayoutControl && !succeed)
386 // If the current focus group has a parent layout control, we can probably automatically
387 // move the focus to the next focus group in the forward or backward direction.
388 Toolkit::Control::KeyboardFocus::Direction direction = forward ? Toolkit::Control::KeyboardFocus::RIGHT : Toolkit::Control::KeyboardFocus::LEFT;
389 succeed = DoMoveFocusWithinLayoutControl(parentLayoutControl, GetCurrentFocusActor(), direction);
390 parentLayoutControl = GetParentLayoutControl(parentLayoutControl);
393 if(!mFocusGroupChangedSignal.Empty())
395 // Emit a focus group changed signal. The applicaton can move the focus to a new focus group
396 mFocusGroupChangedSignal.Emit(GetCurrentFocusActor(), forward);
402 void KeyboardFocusManager::DoKeyboardEnter(Actor actor)
406 Toolkit::Control control = Toolkit::Control::DownCast( actor );
409 // Notify the control that enter has been pressed on it.
410 GetImplementation( control ).KeyboardEnter();
413 // Send a notification for the actor.
414 if( !mFocusedActorEnterKeySignal.Empty() )
416 mFocusedActorEnterKeySignal.Emit( actor );
421 void KeyboardFocusManager::ClearFocus()
423 Actor actor = GetCurrentFocusActor();
426 if( mFocusIndicatorActor )
428 actor.Remove( mFocusIndicatorActor );
431 // Send notification for the change of focus actor
432 if( !mFocusChangedSignal.Empty() )
434 mFocusChangedSignal.Emit( actor, Actor() );
437 Toolkit::Control currentlyFocusedControl = Toolkit::Control::DownCast( actor );
438 if( currentlyFocusedControl )
440 currentlyFocusedControl.SetProperty( DevelControl::Property::STATE, DevelControl::NORMAL );
441 currentlyFocusedControl.ClearKeyInputFocus();
445 mCurrentFocusActor = 0;
446 mIsFocusIndicatorEnabled = false;
449 void KeyboardFocusManager::SetFocusGroupLoop(bool enabled)
451 mFocusGroupLoopEnabled = enabled;
454 bool KeyboardFocusManager::GetFocusGroupLoop() const
456 return mFocusGroupLoopEnabled;
459 void KeyboardFocusManager::SetAsFocusGroup(Actor actor, bool isFocusGroup)
463 // Create/Set focus group property.
464 actor.RegisterProperty( IS_FOCUS_GROUP_PROPERTY_NAME, isFocusGroup, Property::READ_WRITE );
468 bool KeyboardFocusManager::IsFocusGroup(Actor actor) const
470 // Check whether the actor is a focus group
471 bool isFocusGroup = false;
475 Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP_PROPERTY_NAME);
476 if(propertyIsFocusGroup != Property::INVALID_INDEX)
478 isFocusGroup = actor.GetProperty<bool>(propertyIsFocusGroup);
485 Actor KeyboardFocusManager::GetFocusGroup(Actor actor)
487 // Go through the actor's hierarchy to check which focus group the actor belongs to
488 while (actor && !IsFocusGroup(actor))
490 actor = actor.GetParent();
496 void KeyboardFocusManager::SetFocusIndicatorActor(Actor indicator)
498 if(mFocusIndicatorActor != indicator)
500 Actor currentFocusActor = GetCurrentFocusActor();
501 if(currentFocusActor)
503 // The new focus indicator should be added to the current focused actor immediately
504 if(mFocusIndicatorActor)
506 currentFocusActor.Remove(mFocusIndicatorActor);
511 currentFocusActor.Add(indicator);
515 mFocusIndicatorActor = indicator;
519 Actor KeyboardFocusManager::GetFocusIndicatorActor()
521 if( ! mFocusIndicatorActor )
523 // Create the default if it hasn't been set and one that's shared by all the keyboard focusable actors
524 mFocusIndicatorActor = Toolkit::ImageView::New( FOCUS_BORDER_IMAGE_PATH );
526 // Apply size constraint to the focus indicator
527 mFocusIndicatorActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
530 mFocusIndicatorActor.SetParentOrigin( ParentOrigin::CENTER );
531 mFocusIndicatorActor.SetAnchorPoint( AnchorPoint::CENTER );
532 mFocusIndicatorActor.SetPosition(0.0f, 0.0f);
534 return mFocusIndicatorActor;
537 void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
539 AccessibilityAdaptor accessibilityAdaptor = AccessibilityAdaptor::Get();
540 bool isAccessibilityEnabled = accessibilityAdaptor.IsEnabled();
542 Toolkit::AccessibilityManager accessibilityManager = Toolkit::AccessibilityManager::Get();
544 std::string keyName = event.keyPressedName;
546 bool isFocusStartableKey = false;
548 if(event.state == KeyEvent::Down)
550 if (keyName == "Left")
552 if(!isAccessibilityEnabled)
554 if(!mIsFocusIndicatorEnabled)
556 // Show focus indicator
557 mIsFocusIndicatorEnabled = true;
561 // Move the focus towards left
562 MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
565 isFocusStartableKey = true;
569 // Move the accessibility focus backward
570 accessibilityManager.MoveFocusBackward();
573 else if (keyName == "Right")
575 if(!isAccessibilityEnabled)
577 if(!mIsFocusIndicatorEnabled)
579 // Show focus indicator
580 mIsFocusIndicatorEnabled = true;
584 // Move the focus towards right
585 MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
590 // Move the accessibility focus forward
591 accessibilityManager.MoveFocusForward();
594 isFocusStartableKey = true;
596 else if (keyName == "Up" && !isAccessibilityEnabled)
598 if(!mIsFocusIndicatorEnabled)
600 // Show focus indicator
601 mIsFocusIndicatorEnabled = true;
605 // Move the focus towards up
606 MoveFocus(Toolkit::Control::KeyboardFocus::UP);
609 isFocusStartableKey = true;
611 else if (keyName == "Down" && !isAccessibilityEnabled)
613 if(!mIsFocusIndicatorEnabled)
615 // Show focus indicator
616 mIsFocusIndicatorEnabled = true;
620 // Move the focus towards down
621 MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
624 isFocusStartableKey = true;
626 else if (keyName == "Prior" && !isAccessibilityEnabled)
628 if(!mIsFocusIndicatorEnabled)
630 // Show focus indicator
631 mIsFocusIndicatorEnabled = true;
635 // Move the focus towards the previous page
636 MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
639 isFocusStartableKey = true;
641 else if (keyName == "Next" && !isAccessibilityEnabled)
643 if(!mIsFocusIndicatorEnabled)
645 // Show focus indicator
646 mIsFocusIndicatorEnabled = true;
650 // Move the focus towards the next page
651 MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
654 isFocusStartableKey = true;
656 else if (keyName == "Tab" && !isAccessibilityEnabled)
658 if(!mIsFocusIndicatorEnabled)
660 // Show focus indicator
661 mIsFocusIndicatorEnabled = true;
665 // "Tab" key changes the focus group in the forward direction and
666 // "Shift-Tab" key changes it in the backward direction.
667 DoMoveFocusToNextFocusGroup(!event.IsShiftModifier());
670 isFocusStartableKey = true;
672 else if (keyName == "space" && !isAccessibilityEnabled)
674 if(!mIsFocusIndicatorEnabled)
676 // Show focus indicator
677 mIsFocusIndicatorEnabled = true;
680 isFocusStartableKey = true;
682 else if (keyName == "" && !isAccessibilityEnabled)
684 // Check the fake key event for evas-plugin case
685 if(!mIsFocusIndicatorEnabled)
687 // Show focus indicator
688 mIsFocusIndicatorEnabled = true;
691 isFocusStartableKey = true;
693 else if (keyName == "Backspace" && !isAccessibilityEnabled)
695 // Emit signal to go back to the previous view???
697 else if (keyName == "Escape" && !isAccessibilityEnabled)
701 else if(event.state == KeyEvent::Up)
703 if (keyName == "Return")
705 if(!mIsFocusIndicatorEnabled && !isAccessibilityEnabled)
707 // Show focus indicator
708 mIsFocusIndicatorEnabled = true;
712 // The focused actor has enter pressed on it
714 if( !isAccessibilityEnabled )
716 actor = GetCurrentFocusActor();
720 actor = accessibilityManager.GetCurrentFocusActor();
725 DoKeyboardEnter( actor );
729 isFocusStartableKey = true;
733 if(isFocusStartableKey && mIsFocusIndicatorEnabled && !isAccessibilityEnabled)
735 Actor actor = GetCurrentFocusActor();
738 // Make sure the focused actor is highlighted
739 actor.Add( GetFocusIndicatorActor() );
743 // No actor is focused but keyboard focus is activated by the key press
744 // Let's try to move the initial focus
745 MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
750 void KeyboardFocusManager::OnTouch(const TouchData& touch)
752 // Clear the focus when user touch the screen.
753 // We only do this on a Down event, otherwise the clear action may override a manually focused actor.
754 if( ( touch.GetPointCount() < 1 ) || ( touch.GetState( 0 ) == PointState::DOWN ) )
760 Toolkit::KeyboardFocusManager::PreFocusChangeSignalType& KeyboardFocusManager::PreFocusChangeSignal()
762 return mPreFocusChangeSignal;
765 Toolkit::KeyboardFocusManager::FocusChangedSignalType& KeyboardFocusManager::FocusChangedSignal()
767 return mFocusChangedSignal;
770 Toolkit::KeyboardFocusManager::FocusGroupChangedSignalType& KeyboardFocusManager::FocusGroupChangedSignal()
772 return mFocusGroupChangedSignal;
775 Toolkit::KeyboardFocusManager::FocusedActorEnterKeySignalType& KeyboardFocusManager::FocusedActorEnterKeySignal()
777 return mFocusedActorEnterKeySignal;
780 bool KeyboardFocusManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
782 Dali::BaseHandle handle( object );
784 bool connected( true );
785 KeyboardFocusManager* manager = static_cast< KeyboardFocusManager* >( object ); // TypeRegistry guarantees that this is the correct type.
787 if( 0 == strcmp( signalName.c_str(), SIGNAL_PRE_FOCUS_CHANGE ) )
789 manager->PreFocusChangeSignal().Connect( tracker, functor );
791 else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_CHANGED ) )
793 manager->FocusChangedSignal().Connect( tracker, functor );
795 else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_GROUP_CHANGED ) )
797 manager->FocusGroupChangedSignal().Connect( tracker, functor );
799 else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUSED_ACTOR_ENTER_KEY ) )
801 manager->FocusedActorEnterKeySignal().Connect( tracker, functor );
805 // signalName does not match any signal
812 } // namespace Internal
814 } // namespace Toolkit