X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=base%2Fdali-toolkit%2Finternal%2Ffocus-manager%2Fkeyboard-focus-manager-impl.cpp;h=0ccc0954e81914be666da18812550c5970006bb4;hp=a6ed055a77e86d16c93bfa5867c270c8f739df05;hb=0697056b2ada1017c577c441c1c517ce8c08279f;hpb=d5e3ed5f5b1c8fdba3ae97ead8729620f54b3836 diff --git a/base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp b/base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp index a6ed055..0ccc095 100644 --- a/base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp +++ b/base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp @@ -18,6 +18,15 @@ // CLASS HEADER #include "keyboard-focus-manager-impl.h" +// EXTERNAL INCLUDES +#include +#include +#include +#include +#include +#include +#include + // INTERNAL INCLUDES #include #include @@ -50,11 +59,15 @@ BaseHandle Create() { BaseHandle handle = KeyboardFocusManager::Get(); - if ( !handle && Adaptor::IsAvailable() ) + if ( !handle ) { - Toolkit::KeyboardFocusManager manager = Toolkit::KeyboardFocusManager( new Internal::KeyboardFocusManager() ); - Adaptor::Get().RegisterSingleton( typeid( manager ), manager ); - handle = manager; + SingletonService singletonService( SingletonService::Get() ); + if ( singletonService ) + { + Toolkit::KeyboardFocusManager manager = Toolkit::KeyboardFocusManager( new Internal::KeyboardFocusManager() ); + singletonService.Register( typeid( manager ), manager ); + handle = manager; + } } return handle; @@ -67,10 +80,11 @@ Toolkit::KeyboardFocusManager KeyboardFocusManager::Get() { Toolkit::KeyboardFocusManager manager; - if ( Adaptor::IsAvailable() ) + SingletonService singletonService( SingletonService::Get() ); + if ( singletonService ) { // Check whether the keyboard focus manager is already created - Dali::BaseHandle handle = Dali::Adaptor::Get().GetSingleton( typeid( Toolkit::KeyboardFocusManager ) ); + Dali::BaseHandle handle = singletonService.GetSingleton( typeid( Toolkit::KeyboardFocusManager ) ); if(handle) { // If so, downcast the handle of singleton to keyboard focus manager @@ -326,7 +340,7 @@ void KeyboardFocusManager::DoActivate(Actor actor) if(control) { // Notify the control that it is activated - control.GetImplementation().OnActivated(); + control.GetImplementation().Activate(); } // Send notification for the activation of focused actor @@ -376,7 +390,7 @@ void KeyboardFocusManager::SetAsFocusGroup(Actor actor, bool isFocusGroup) Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP_PROPERTY_NAME); if(propertyIsFocusGroup == Property::INVALID_INDEX) { - propertyIsFocusGroup = actor.RegisterProperty(IS_FOCUS_GROUP_PROPERTY_NAME, isFocusGroup); + actor.RegisterProperty(IS_FOCUS_GROUP_PROPERTY_NAME, isFocusGroup); } else { @@ -545,8 +559,6 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event) // Move the focus towards right MoveFocus(Toolkit::Control::Right); } - - isFocusStartableKey = true; } else {