Merge "Use existing callback ID for recurring callbacks" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor-impl.h
old mode 100755 (executable)
new mode 100644 (file)
index cf81f7c..0506ae0
 #include <dali/internal/window-system/common/damage-observer.h>
 #include <dali/internal/window-system/common/window-visibility-observer.h>
 
+#include <string>
+
 namespace Dali
 {
 
 class RenderSurfaceInterface;
 
+namespace Accessibility
+{
+class Bridge;
+}
+
 namespace Integration
 {
 class Core;
@@ -101,10 +108,12 @@ public:
    *                                  - Pixmap, adaptor will use existing Pixmap to draw on to
    *                                  - Window, adaptor will use existing Window to draw on to
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
+   * @param[in]  threadMode          The thread mode
    */
   static Dali::Adaptor* New( Dali::Integration::SceneHolder window,
                              Dali::RenderSurfaceInterface* surface,
-                             EnvironmentOptions* environmentOptions );
+                             EnvironmentOptions* environmentOptions,
+                             ThreadMode threadMode );
 
   /**
    * Creates a New Adaptor
@@ -122,11 +131,13 @@ public:
    *                                  - Pixmap, adaptor will use existing Pixmap to draw on to
    *                                  - Window, adaptor will use existing Window to draw on to
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
+   * @param[in]  threadMode          The thread mode
    */
   static Dali::Adaptor* New( GraphicsFactory& graphicsFactory,
                              Dali::Integration::SceneHolder window,
                              Dali::RenderSurfaceInterface* surface,
-                             EnvironmentOptions* environmentOptions );
+                             EnvironmentOptions* environmentOptions,
+                             ThreadMode threadMode );
 
   /**
    * Creates a New Adaptor
@@ -147,7 +158,7 @@ public:
   /**
    * Virtual destructor.
    */
-  virtual ~Adaptor();
+  ~Adaptor() override;
 
   /**
    * @copydoc Dali::Adaptor::Get()
@@ -164,6 +175,8 @@ public:
    */
   void SceneCreated();
 
+  static std::string GetApplicationPackageName();
+
 public: // AdaptorInternalServices implementation
   /**
    * @copydoc Dali::Adaptor::Start()
@@ -311,7 +324,7 @@ public:
   /**
    * @return the Core instance
    */
-  virtual Dali::Integration::Core& GetCore();
+  Dali::Integration::Core& GetCore() override;
 
   /**
    * @copydoc Dali::Adaptor::SetRenderRefreshRate()
@@ -445,52 +458,52 @@ public:  //AdaptorInternalServices
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPlatformAbstractionInterface()
    */
-  virtual Dali::Integration::PlatformAbstraction& GetPlatformAbstractionInterface();
+  Dali::Integration::PlatformAbstraction& GetPlatformAbstractionInterface() override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetDisplayConnectionInterface()
    */
-  virtual Dali::DisplayConnection& GetDisplayConnectionInterface();
+  Dali::DisplayConnection& GetDisplayConnectionInterface() override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetGraphicsInterface()
    */
-  virtual GraphicsInterface& GetGraphicsInterface();
+  GraphicsInterface& GetGraphicsInterface() override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetTriggerEventInterface()
    */
-  virtual TriggerEventInterface& GetProcessCoreEventsTrigger();
+  TriggerEventInterface& GetProcessCoreEventsTrigger() override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetSocketFactoryInterface()
    */
-  virtual SocketFactoryInterface& GetSocketFactoryInterface();
+  SocketFactoryInterface& GetSocketFactoryInterface() override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetRenderSurfaceInterface()
    */
-  virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface();
+  Dali::RenderSurfaceInterface* GetRenderSurfaceInterface() override;
 
   /**
    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPerformanceInterface()
    */
-  virtual PerformanceInterface* GetPerformanceInterface();
+  PerformanceInterface* GetPerformanceInterface() override;
 
   /**
    * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetKernelTraceInterface()
    */
-  virtual TraceInterface& GetKernelTraceInterface();
+  TraceInterface& GetKernelTraceInterface() override;
 
   /**
    * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetSystemTraceInterface()
    */
-  virtual TraceInterface& GetSystemTraceInterface();
+  TraceInterface& GetSystemTraceInterface() override;
 
   /**
    * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetWindowContainerInterface()
    */
-  virtual void GetWindowContainerInterface( WindowContainer& windows );
+  void GetWindowContainerInterface( WindowContainer& windows ) override;
 
 public: // Signals
 
@@ -523,45 +536,45 @@ public: // From Dali::Internal::Adaptor::CoreEventInterface
   /**
    * @copydoc Dali::Internal::Adaptor:CoreEventInterface:::ProcessCoreEvents()
    */
-  virtual void ProcessCoreEvents();
+  void ProcessCoreEvents() override;
 
 private: // From Dali::Internal::Adaptor::CoreEventInterface
 
   /**
    * @copydoc Dali::Internal::Adaptor::CoreEventInterface::QueueCoreEvent()
    */
-  virtual void QueueCoreEvent(const Dali::Integration::Event& event);
+  void QueueCoreEvent(const Dali::Integration::Event& event) override;
 
 private: // From Dali::Integration::RenderController
 
   /**
    * @copydoc Dali::Integration::RenderController::RequestUpdate()
    */
-  virtual void RequestUpdate( bool forceUpdate );
+  void RequestUpdate( bool forceUpdate ) override;
 
   /**
    * @copydoc Dali::Integration::RenderController::RequestProcessEventsOnIdle()
    */
-  virtual void RequestProcessEventsOnIdle( bool forceProcess );
+  void RequestProcessEventsOnIdle( bool forceProcess ) override;
 
 public: // From Dali::Internal::Adaptor::WindowVisibilityObserver
 
   /**
    * Called when the window becomes fully or partially visible.
    */
-  virtual void OnWindowShown();
+  void OnWindowShown() override;
 
   /**
    * Called when the window is fully hidden.
    */
-  virtual void OnWindowHidden();
+  void OnWindowHidden() override;
 
 private: // From Dali::Internal::Adaptor::DamageObserver
 
   /**
    * @copydoc Dali::Internal::Adaptor::DamageObserver::OnDamaged()
    */
-  void OnDamaged( const DamageArea& area );
+  void OnDamaged( const DamageArea& area ) override;
 
 private:
 
@@ -624,8 +637,9 @@ private:
    *                          - Pixmap, adaptor will use existing Pixmap to draw on to
    *                          - Window, adaptor will use existing Window to draw on to
    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
+   * @param[in]  threadMode   The ThreadMode of the Adaptor
    */
-  Adaptor( Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions );
+  Adaptor( Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode );
 
 private: // Types
 
@@ -683,6 +697,13 @@ private: // Data
 
   std::unique_ptr<Integration::AddOnManager> mAddOnManager;           ///< Pointer to the addon manager
 
+  class AccessibilityObserver : public ConnectionTracker
+  {
+  public:
+    void OnAccessibleKeyEvent( const Dali::KeyEvent& event );
+  };
+  AccessibilityObserver accessibilityObserver;
+
 public:
   inline static Adaptor& GetImplementation(Dali::Adaptor& adaptor) { return *adaptor.mImpl; }
 };