../dali-toolkit/dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-environment-variable.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
- ../dali-toolkit/dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-style-monitor.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-timer.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
- ../dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp
../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
../dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-feedback-player.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-file-loader.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-input-method-context.cpp
- ../dali-toolkit/dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-native-image-source.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-orientation.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-tts-player.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp
../dali-toolkit/dali-toolkit-test-utils/toolkit-virtual-keyboard.cpp
- ../dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp
../dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
../dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
../dali-toolkit/dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
dali-toolkit-test-utils/toolkit-event-thread-callback.cpp
dali-toolkit-test-utils/toolkit-environment-variable.cpp
dali-toolkit-test-utils/toolkit-input-method-context.cpp
- dali-toolkit-test-utils/toolkit-lifecycle-controller.cpp
dali-toolkit-test-utils/toolkit-orientation.cpp
dali-toolkit-test-utils/toolkit-physical-keyboard.cpp
dali-toolkit-test-utils/toolkit-style-monitor.cpp
dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp
dali-toolkit-test-utils/toolkit-video-player.cpp
dali-toolkit-test-utils/toolkit-web-engine.cpp
- dali-toolkit-test-utils/toolkit-window.cpp
dali-toolkit-test-utils/toolkit-trigger-event-factory.cpp
dali-toolkit-test-utils/dali-test-suite-utils.cpp
dali-toolkit-test-utils/dali-toolkit-test-suite-utils.cpp
class EglInterface;
class DisplayConnection;
class ThreadSynchronizationInterface;
-class Window;
-
-using WindowContainer = std::vector<Window>;
namespace Internal
{
public:
static Dali::RenderSurfaceInterface& GetSurface();
- static Dali::WindowContainer GetWindows();
static Dali::Adaptor::AdaptorSignalType& AdaptorSignal();
- static Dali::Adaptor::WindowCreatedSignalType& WindowCreatedSignal();
static bool mAvailable;
static Vector<CallbackBase*> mCallbacks;
- static Dali::WindowContainer mWindows;
- static Dali::Adaptor::WindowCreatedSignalType* mWindowCreatedSignal;
};
} // namespace Adaptor
*
*/
-#include <toolkit-window.h>
-
-// Don't want to include the actual window.h which otherwise will be indirectly included by adaptor.h.
-#define DALI_WINDOW_H
+// CLASS HEADER
#include <dali/integration-api/adaptors/adaptor.h>
-
#include <dali/integration-api/adaptors/scene-holder.h>
#include <dali/public-api/object/base-object.h>
bool Adaptor::mAvailable = false;
Vector<CallbackBase*> Adaptor::mCallbacks = Vector<CallbackBase*>();
-Dali::WindowContainer Adaptor::mWindows;
-Dali::Adaptor::WindowCreatedSignalType* Adaptor::mWindowCreatedSignal = nullptr;
Dali::Adaptor& Adaptor::Get()
{
return *renderSurface;
}
-Dali::WindowContainer Adaptor::GetWindows()
-{
- return Adaptor::mWindows;
-}
-
Dali::Adaptor::AdaptorSignalType& Adaptor::AdaptorSignal()
{
Dali::Adaptor::AdaptorSignalType* signal = new Dali::Adaptor::AdaptorSignalType;
return *signal;
}
-Dali::Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal()
-{
- if ( !Adaptor::mWindowCreatedSignal )
- {
- Adaptor::mWindowCreatedSignal = new Dali::Adaptor::WindowCreatedSignalType;
- }
-
- return *Adaptor::mWindowCreatedSignal;
-}
-
} // namespace Adaptor
} // namespace Internal
return Internal::Adaptor::Adaptor::AdaptorSignal();
}
-Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal()
-{
- return Internal::Adaptor::Adaptor::WindowCreatedSignal();
-}
-
Dali::RenderSurfaceInterface& Adaptor::GetSurface()
{
return Internal::Adaptor::Adaptor::GetSurface();
}
-Dali::WindowContainer Adaptor::GetWindows() const
-{
- return Internal::Adaptor::Adaptor::GetWindows();
-}
-
Any Adaptor::GetNativeWindowHandle()
{
Any window;
Adaptor::Adaptor()
: mImpl( NULL )
{
- Dali::PositionSize win_size;
- win_size.width = 640;
- win_size.height = 800;
-
- Dali::Window window = Dali::Window::New( win_size, "" );
- Internal::Adaptor::Adaptor::mWindows.push_back( window );
}
} // namespace Dali
+++ /dev/null
-/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "toolkit-lifecycle-controller.h"
-
-#include <dali-toolkit/public-api/dali-toolkit-common.h>
-#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/signals/dali-signal.h>
-
-namespace Dali
-{
-
-/********************************************************************************
- * Stub for Dali::Internal::Adaptor::LifecycleController
- ********************************************************************************/
-namespace Internal
-{
-namespace Adaptor
-{
-class LifecycleController : public BaseObject
-{
-public: // Creation & Destruction
-
- LifecycleController();
- ~LifecycleController();
- static Dali::LifecycleController Get();
-
-
-public: // Signals
- Dali::LifecycleController::LifecycleSignalType& InitSignal();
-
-private:
- Dali::LifecycleController::LifecycleSignalType mInitSignal;
- static Dali::LifecycleController mLifecycleController;
-};
-
-Dali::LifecycleController LifecycleController::mLifecycleController;
-
-LifecycleController::LifecycleController()
-{
-}
-
-LifecycleController::~LifecycleController()
-{
-}
-
-Dali::LifecycleController LifecycleController::Get()
-{
- if( ! mLifecycleController )
- {
- mLifecycleController = Dali::LifecycleController(new Internal::Adaptor::LifecycleController());
- }
- return mLifecycleController;
-}
-
-Dali::LifecycleController::LifecycleSignalType& LifecycleController::InitSignal()
-{
- return mInitSignal;
-}
-
-} // namespace Adaptor
-} // namespace Internal
-
-
-/********************************************************************************
- * Stub for Dali::LifecycleController
- ********************************************************************************/
-
-LifecycleController::LifecycleController(){}
-LifecycleController::~LifecycleController(){}
-
-LifecycleController LifecycleController::Get()
-{
- // Get the physical keyboard handle
- LifecycleController handle = Internal::Adaptor::LifecycleController::Get();
- return handle;
-}
-
-LifecycleController::LifecycleSignalType& LifecycleController::InitSignal()
-{
- BaseObject& object = GetBaseObject();
- Internal::Adaptor::LifecycleController& controller = static_cast< Internal::Adaptor::LifecycleController& >( object );
- return controller.InitSignal();
-}
-
-LifecycleController::LifecycleController( Internal::Adaptor::LifecycleController *impl )
-: BaseHandle(impl)
-{
-}
-
-} // namespace Dali
+++ /dev/null
-#ifndef TOOLKIT_LIFECYCLE_CONTROLLER_H
-#define TOOLKIT_LIFECYCLE_CONTROLLER_H
-
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <string>
-#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
-{
-class LifecycleController;
-}
-}
-
-class LifecycleController : public BaseHandle
-{
-public:
- typedef Signal< void (void) > LifecycleSignalType;
- LifecycleController();
- ~LifecycleController();
- static LifecycleController Get();
- LifecycleSignalType& InitSignal();
- LifecycleController( Internal::Adaptor::LifecycleController* impl );
-};
-
-
-} // namespace Dali
-
-#endif // TOOLKIT_LIFECYCLE_CONTROLLER_H
#include <dali/integration-api/adaptors/adaptor.h>
#include <toolkit-adaptor-impl.h>
#include <toolkit-singleton-service.h>
-#include <toolkit-lifecycle-controller.h>
namespace Dali
{
{
fontClient.SetDpi( mDpi.x, mDpi.y );
}
-
- bool isAdaptorAvailable = Dali::Internal::Adaptor::Adaptor::Get().IsAvailable();
- if ( isAdaptorAvailable )
- {
- Dali::LifecycleController lifecycleController = Dali::LifecycleController::Get();
- lifecycleController.InitSignal().Emit();
-
- Dali::Window window = Dali::Internal::Adaptor::Adaptor::mWindows.front();
- if ( window )
- {
- Dali::Internal::Adaptor::Adaptor::WindowCreatedSignal().Emit( window );
- }
- }
}
~ToolkitTestApplication()
+++ /dev/null
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/actors/actor.h>
-#include <dali/public-api/actors/layer.h>
-#include <dali/public-api/common/stage.h>
-#include <dali/public-api/object/base-object.h>
-
-// INTERNAL INCLUDES
-#include "toolkit-window.h"
-
-namespace Dali
-{
-
-class Window;
-
-/********************************************************************************
- * Stub for Dali::Internal::Adaptor::Window
- ********************************************************************************/
-
-namespace Internal
-{
-namespace Adaptor
-{
-
-class Window : public Dali::BaseObject
-{
-public:
-
- Window()
- {
- }
-
- virtual ~Window()
- {
- }
-
- static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent)
- {
- return new Window();
- }
-
- static Dali::Window Get( Dali::Actor actor )
- {
- return Dali::Window();
- }
-};
-
-} // Adaptor
-} // Internal
-
-Window::Window()
-{
-}
-
-Window::~Window()
-{
-}
-
-Dali::Window Window::New( PositionSize windowPosition, const std::string& name, bool isTransparent )
-{
- Internal::Adaptor::Window* window = Internal::Adaptor::Window::New( windowPosition, name, "", isTransparent );
- return Window( window );
-}
-
-Dali::Window Window::New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent )
-{
- Internal::Adaptor::Window* window = Internal::Adaptor::Window::New( windowPosition, name, className, isTransparent );
- return Window( window );
-}
-
-Dali::Layer Window::GetRootLayer() const
-{
- return Dali::Stage::GetCurrent().GetRootLayer();
-}
-
-Window::Window( Internal::Adaptor::Window* window )
-: BaseHandle( window )
-{
-}
-
-namespace DevelWindow
-{
-
-Window Get( Actor actor )
-{
- return Internal::Adaptor::Window::Get( actor );
-}
-
-KeyEventSignalType& KeyEventSignal( Window window )
-{
- return Dali::Stage::GetCurrent().KeyEventSignal();
-}
-
-TouchSignalType& TouchSignal( Window window )
-{
- return Dali::Stage::GetCurrent().TouchSignal();
-}
-
-} // namespace DevelWindow
-
-} // Dali
+++ /dev/null
-#ifndef TOOLKIT_WINDOW_H
-#define TOOLKIT_WINDOW_H
-
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-//EXTERNAL INCLUDES
-#include <string>
-#include <dali/public-api/math/rect.h>
-#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal.h>
-
-namespace Dali
-{
-
-class Actor;
-class Layer;
-class KeyEvent;
-class TouchData;
-
-typedef Dali::Rect<int> PositionSize;
-
-namespace Internal
-{
-namespace Adaptor
-{
-class Window;
-}
-}
-
-class Window : public BaseHandle
-{
-public:
-
- static Window New(PositionSize windowPosition, const std::string& name, bool isTransparent = false);
- static Window New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent = false);
- Window();
- ~Window();
- Window(const Window& handle);
- Window& operator=(const Window& rhs);
- Layer GetRootLayer() const;
-
-public:
- explicit Window( Internal::Adaptor::Window* window );
-};
-
-namespace DevelWindow
-{
-
-typedef Signal< void (const KeyEvent&) > KeyEventSignalType;
-typedef Signal< void (const TouchData&) > TouchSignalType;
-
-Dali::Window Get( Actor actor );
-KeyEventSignalType& KeyEventSignal( Dali::Window window );
-TouchSignalType& TouchSignal( Dali::Window window );
-
-}
-
-} // namespace Dali
-
-#endif // TOOLKIT_WINDOW_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/actors/layer.h>
#include <dali/devel-api/adaptor-framework/accessibility-adaptor.h>
#include <dali/devel-api/adaptor-framework/singleton-service.h>
-#include <dali/devel-api/adaptor-framework/window-devel.h>
-#include <dali/devel-api/adaptor-framework/lifecycle-controller.h>
#include <dali/public-api/animation/constraints.h>
#include <dali/public-api/common/stage.h>
#include <dali/public-api/events/key-event.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/public-api/object/property-map.h>
#include <dali/public-api/images/resource-image.h>
-#include <dali/integration-api/adaptors/adaptor.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
mCustomAlgorithmInterface(NULL)
{
// TODO: Get FocusIndicatorEnable constant from stylesheet to set mIsFocusIndicatorShown.
-
- LifecycleController::Get().InitSignal().Connect( mSlotDelegate, &KeyboardFocusManager::OnAdaptorInit );
-}
-
-void KeyboardFocusManager::OnAdaptorInit()
-{
- if( Adaptor::IsAvailable() )
- {
- // Retrieve all the existing widnows
- Dali::WindowContainer windows = Adaptor::Get().GetWindows();
- for ( auto iter = windows.begin(); iter != windows.end(); ++iter )
- {
- DevelWindow::KeyEventSignal( *iter ).Connect( mSlotDelegate, &KeyboardFocusManager::OnKeyEvent);
- DevelWindow::TouchSignal( *iter ).Connect( mSlotDelegate, &KeyboardFocusManager::OnTouch);
- }
-
- // Get notified when any new window is created afterwards
- Adaptor::Get().WindowCreatedSignal().Connect( mSlotDelegate, &KeyboardFocusManager::OnWindowCreated);
- }
-}
-
-void KeyboardFocusManager::OnWindowCreated( Dali::Window& window )
-{
- DevelWindow::KeyEventSignal( window ).Connect( mSlotDelegate, &KeyboardFocusManager::OnKeyEvent);
- DevelWindow::TouchSignal( window ).Connect( mSlotDelegate, &KeyboardFocusManager::OnTouch);
+ Stage::GetCurrent().KeyEventSignal().Connect( mSlotDelegate, &KeyboardFocusManager::OnKeyEvent);
+ Stage::GetCurrent().TouchSignal().Connect( mSlotDelegate, &KeyboardFocusManager::OnTouch );
}
KeyboardFocusManager::~KeyboardFocusManager()
Toolkit::Control KeyboardFocusManager::GetParentLayoutControl(Actor actor) const
{
// Get the actor's parent layout control that supports two dimensional keyboard navigation
- Actor rootActor;
+ Actor rootActor = Stage::GetCurrent().GetRootLayer();
Actor parent;
if(actor)
{
- rootActor = DevelWindow::Get( actor ).GetRootLayer();
parent = actor.GetParent();
}
if( !nextFocusableActor )
{
- nextFocusableActor = DevelWindow::Get( currentFocusActor ).GetRootLayer().FindChildById( actorId );
+ nextFocusableActor = Stage::GetCurrent().GetRootLayer().FindChildById( actorId );
}
}
}
namespace Dali
{
-class Window;
-
namespace Toolkit
{
/**
* @copydoc Toolkit::KeyboardFocusManager
*/
-class KeyboardFocusManager : public Dali::BaseObject, public ConnectionTracker
+class KeyboardFocusManager : public Dali::BaseObject
{
public:
typedef FocusStack::iterator FocusStackIterator; ///< Define FocusStack::Iterator as FocusStackIterator to navigate FocusStack
/**
- * This will be called when the adaptor is initialized
- */
- void OnAdaptorInit();
-
- /**
- * This will be called when a new wndow is created
- * @param window The new window
- */
- void OnWindowCreated( Dali::Window& window );
-
- /**
* Get configuration from StyleManager.
*/
void GetConfigurationFromStyleManger();