[Tizen] Make Adaptor request event process regardless of state
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor-impl.h
1 #ifndef DALI_INTERNAL_ADAPTOR_IMPL_H
2 #define DALI_INTERNAL_ADAPTOR_IMPL_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/devel-api/threading/mutex.h>
23 #include <dali/integration-api/render-controller.h>
24 #include <dali/public-api/common/vector-wrapper.h>
25 #include <dali/public-api/math/rect.h>
26 #include <dali/public-api/math/uint-16-pair.h>
27 #include <dali/public-api/signals/callback.h>
28
29 // INTERNAL INCLUDES
30 #include <dali/devel-api/adaptor-framework/clipboard.h>
31 #include <dali/integration-api/adaptor-framework/adaptor.h>
32 #include <dali/integration-api/adaptor-framework/scene-holder-impl.h>
33 #include <dali/integration-api/adaptor-framework/trigger-event-factory.h>
34 #include <dali/integration-api/scene.h>
35 #include <dali/internal/adaptor/common/adaptor-internal-services.h>
36 #include <dali/internal/graphics/common/graphics-interface.h>
37 #include <dali/internal/legacy/common/tizen-platform-abstraction.h>
38 #include <dali/internal/network/common/socket-factory.h>
39 #include <dali/internal/system/common/core-event-interface.h>
40 #include <dali/internal/system/common/environment-options.h>
41 #include <dali/internal/system/common/kernel-trace.h>
42 #include <dali/internal/system/common/system-trace.h>
43 #include <dali/internal/window-system/common/damage-observer.h>
44 #include <dali/internal/window-system/common/window-visibility-observer.h>
45 #include <dali/public-api/adaptor-framework/tts-player.h>
46
47 #include <string>
48
49 namespace Dali
50 {
51 class RenderSurfaceInterface;
52
53 namespace Accessibility
54 {
55 class Bridge;
56 }
57
58 namespace Integration
59 {
60 class Core;
61 class GlAbstraction;
62 class Processor;
63 class AddOnManager;
64 } // namespace Integration
65
66 namespace Internal
67 {
68 namespace Adaptor
69 {
70 class DisplayConnection;
71 class GraphicsFactory;
72 class GlImplementation;
73 class GlSyncImplementation;
74 class ThreadController;
75 class TriggerEvent;
76 class CallbackManager;
77 class FeedbackPluginProxy;
78 class FeedbackController;
79 class VSyncMonitor;
80 class PerformanceInterface;
81 class LifeCycleObserver;
82 class ObjectProfiler;
83 class SceneHolder;
84 class ConfigurationManager;
85 enum class ThreadMode;
86
87 /**
88  * Implementation of the Adaptor class.
89  */
90 class Adaptor : public Integration::RenderController,
91                 public AdaptorInternalServices,
92                 public CoreEventInterface,
93                 public DamageObserver,
94                 public WindowVisibilityObserver
95 {
96 public:
97   using AdaptorSignalType       = Dali::Adaptor::AdaptorSignalType;
98   using WindowCreatedSignalType = Dali::Adaptor::WindowCreatedSignalType;
99
100   using SurfaceSize = Uint16Pair; ///< Surface size type
101
102   /**
103    * Creates a New Adaptor
104    * @param[in]  window              The window handle
105    * @param[in]  surface             A render surface can be one of the following
106    *                                  - Pixmap, adaptor will use existing Pixmap to draw on to
107    *                                  - Window, adaptor will use existing Window to draw on to
108    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
109    * @param[in]  threadMode          The thread mode
110    */
111   static Dali::Adaptor* New(Dali::Integration::SceneHolder window,
112                             Dali::RenderSurfaceInterface*  surface,
113                             EnvironmentOptions*            environmentOptions,
114                             ThreadMode                     threadMode);
115
116   /**
117    * Creates a New Adaptor
118    * @param[in]  window              The window handle
119    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
120    */
121   static Dali::Adaptor* New(Dali::Integration::SceneHolder window,
122                             EnvironmentOptions*            environmentOptions);
123
124   /**
125    * Creates a New Adaptor
126    * @param[in]  graphicsFactory     A factory that creates the graphics interface
127    * @param[in]  window              The window handle
128    * @param[in]  surface             A render surface can be one of the following
129    *                                  - Pixmap, adaptor will use existing Pixmap to draw on to
130    *                                  - Window, adaptor will use existing Window to draw on to
131    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
132    * @param[in]  threadMode          The thread mode
133    */
134   static Dali::Adaptor* New(GraphicsFactory&               graphicsFactory,
135                             Dali::Integration::SceneHolder window,
136                             Dali::RenderSurfaceInterface*  surface,
137                             EnvironmentOptions*            environmentOptions,
138                             ThreadMode                     threadMode);
139
140   /**
141    * Creates a New Adaptor
142    * @param[in]  graphicsFactory     A factory that creates the graphics interface
143    * @param[in]  window              The window handle
144    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
145    */
146   static Dali::Adaptor* New(GraphicsFactory&               graphicsFactory,
147                             Dali::Integration::SceneHolder window,
148                             EnvironmentOptions*            environmentOptions);
149
150   /**
151    * 2-step initialisation, this should be called after creating an adaptor instance.
152    * @param[in]  graphicsFactory     A factory that creates the graphics interface
153    */
154   void Initialize(GraphicsFactory& graphicsFactory);
155
156   /**
157    * Virtual destructor.
158    */
159   ~Adaptor() override;
160
161   /**
162    * @copydoc Dali::Adaptor::Get()
163    */
164   static Dali::Adaptor& Get();
165
166   /**
167    * @copydoc Dali::Adaptor::IsAvailable()
168    */
169   static bool IsAvailable();
170
171   /**
172    * @copydoc Dali::Core::SceneCreated();
173    */
174   void SceneCreated();
175
176   static std::string GetApplicationPackageName();
177
178 public: // AdaptorInternalServices implementation
179   /**
180    * @copydoc Dali::Adaptor::Start()
181    */
182   virtual void Start();
183
184   /**
185    * @copydoc Dali::Adaptor::Pause()
186    */
187   virtual void Pause();
188
189   /**
190    * @copydoc Dali::Adaptor::Resume()
191    */
192   virtual void Resume();
193
194   /**
195    * @copydoc Dali::Adaptor::Stop()
196    */
197   virtual void Stop();
198
199   /**
200    * @copydoc Dali::Adaptor::ContextLost()
201    */
202   virtual void ContextLost();
203
204   /**
205    * @copydoc Dali::Adaptor::ContextRegained()
206    */
207   virtual void ContextRegained();
208
209   /**
210    * @copydoc Dali::EventFeeder::FeedTouchPoint()
211    */
212   virtual void FeedTouchPoint(TouchPoint& point, int timeStamp);
213
214   /**
215    * @copydoc Dali::EventFeeder::FeedWheelEvent()
216    */
217   virtual void FeedWheelEvent(Dali::WheelEvent& wheelEvent);
218
219   /**
220    * @copydoc Dali::EventFeeder::FeedKeyEvent()
221    */
222   virtual void FeedKeyEvent(Dali::KeyEvent& keyEvent);
223
224   /**
225    * @copydoc Dali::Adaptor::ReplaceSurface()
226    */
227   virtual void ReplaceSurface(Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface& surface);
228
229   /**
230    * @copydoc Dali::Adaptor::GetSurface()
231    */
232   virtual Dali::RenderSurfaceInterface& GetSurface() const;
233
234   /**
235    * @copydoc Dali::Adaptor::ReleaseSurfaceLock()
236    */
237   virtual void ReleaseSurfaceLock();
238
239   /**
240    * Retrieve the TtsPlayer.
241    * @param[in] mode The mode of TtsPlayer
242    * @return A handle to the TtsPlayer.
243    */
244   virtual Dali::TtsPlayer GetTtsPlayer(Dali::TtsPlayer::Mode mode);
245
246   /**
247    * @copydoc Dali::Adaptor::AddIdle()
248    */
249   virtual bool AddIdle(CallbackBase* callback, bool hasReturnValue, bool forceAdd);
250
251   /**
252    * Adds a new Window instance to the Adaptor
253    * @param[in]  childWindow The child window instance
254    */
255   virtual bool AddWindow(Dali::Integration::SceneHolder childWindow);
256
257   /**
258    * Removes an existing Window instance from the Adaptor
259    * @param[in]  window The Window instance
260    */
261   virtual bool RemoveWindow(Dali::Integration::SceneHolder* childWindow);
262
263   /**
264    * Removes an existing Window instance from the Adaptor
265    * @param[in]  windowName The Window name
266    * @note If two Windows have the same name, the first one that matches will be removed
267    */
268   virtual bool RemoveWindow(std::string childWindowName);
269
270   /**
271    * @copydoc Dali::Adaptor::RemoveIdle()
272    */
273   virtual void RemoveIdle(CallbackBase* callback);
274
275   /**
276    * @copydoc Dali::Adaptor::ProcessIdle()
277    */
278   virtual void ProcessIdle();
279
280   /**
281    * Sets a pre-render callback.
282    */
283   void SetPreRenderCallback(CallbackBase* callback);
284
285   /**
286    * Removes an existing Window instance from the Adaptor
287    * @param[in]  childWindow The Window instance
288    */
289   bool RemoveWindow(Dali::Internal::Adaptor::SceneHolder* childWindow);
290
291   /**
292    * @brief Deletes the rendering surface
293    * @param[in] surface to delete
294    */
295   void DeleteSurface(Dali::RenderSurfaceInterface& surface);
296
297   /**
298    * @brief Retrieve the window that the given actor is added to.
299    *
300    * @param[in] actor The actor
301    * @return The window the actor is added to or a null pointer if the actor is not added to any widnow.
302    */
303   Dali::Internal::Adaptor::SceneHolder* GetWindow(Dali::Actor& actor);
304
305   /**
306    * @copydoc Dali::Adaptor::GetWindows()
307    */
308   Dali::WindowContainer GetWindows() const;
309
310   /**
311    * @copydoc Dali::Adaptor::GetSceneHolders()
312    */
313   Dali::SceneHolderList GetSceneHolders() const;
314
315   /**
316    * @copydoc Dali::Adaptor::GetObjectRegistry()
317    */
318   Dali::ObjectRegistry GetObjectRegistry() const;
319
320 public:
321   /**
322    * @return the Core instance
323    */
324   Dali::Integration::Core& GetCore() override;
325
326   /**
327    * @copydoc Dali::Adaptor::SetRenderRefreshRate()
328    */
329   void SetRenderRefreshRate(unsigned int numberOfVSyncsPerRender);
330
331   /**
332    * Return the PlatformAbstraction.
333    * @return The PlatformAbstraction.
334    */
335   Integration::PlatformAbstraction& GetPlatformAbstraction() const;
336
337   /**
338    * Destroy the TtsPlayer of specific mode.
339    * @param[in] mode The mode of TtsPlayer to destroy
340    */
341   void DestroyTtsPlayer(Dali::TtsPlayer::Mode mode);
342
343   /**
344    * Gets native window handle
345    *
346    * @return native window handle
347    */
348   Any GetNativeWindowHandle();
349
350   /**
351    * @brief Retrieve native window handle that the given actor is added to.
352    *
353    * @param[in] actor The actor
354    * @return native window handle
355    */
356   Any GetNativeWindowHandle(Dali::Actor actor);
357
358   /**
359    * Get the native display associated with the graphics backend
360    *
361    * @return A handle to the native display
362    */
363   Any GetGraphicsDisplay();
364
365   /**
366    * Sets use remote surface for Surface output
367    * @param[in] useRemoteSurface True if the remote surface is used
368    */
369   void SetUseRemoteSurface(bool useRemoteSurface);
370
371 public:
372   /**
373    * Adds an adaptor observer so that we can observe the adaptor's lifetime events.
374    * @param[in]  observer  The observer.
375    * @note Observers should remove themselves when they are destroyed.
376    */
377   void AddObserver(LifeCycleObserver& observer);
378
379   /**
380    * Removes the observer from the adaptor.
381    * @param[in]  observer  The observer to remove.
382    * @note Observers should remove themselves when they are destroyed.
383    */
384   void RemoveObserver(LifeCycleObserver& observer);
385
386   /**
387    * Emits the Notification event to the Dali core.
388    */
389   void SendNotificationEvent();
390
391   /**
392    * Request adaptor to update once
393    */
394   void RequestUpdateOnce();
395
396   /**
397    * @copydoc Dali::Adaptor::NotifySceneCreated()
398    */
399   void NotifySceneCreated();
400
401   /**
402    * @copydoc Dali::Adaptor::NotifyLanguageChanged()
403    */
404   void NotifyLanguageChanged();
405
406   /**
407    * Gets AppId of current application
408    */
409   void GetAppId(std::string& appId);
410
411   /**
412    * Gets path for resource storage.
413    * @param[out] path Path for resource storage
414    */
415   void GetResourceStoragePath(std::string& path);
416
417   /**
418    * @copydoc Dali::Adaptor::SurfaceResizePrepare
419    */
420   void SurfaceResizePrepare(Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize);
421
422   /**
423    * @copydoc Dali::Adaptor::SurfaceResizeComplete
424    */
425   void SurfaceResizeComplete(Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize);
426
427   /**
428    * Sets layout direction of root by system language
429    * @param[in] locale System locale
430    */
431   void SetRootLayoutDirection(std::string locale);
432
433   /**
434    * @copydoc Dali::Adaptor::RenderOnce
435    */
436   void RenderOnce();
437
438   /**
439    * @copydoc Dali::Adaptor::GetLogFactory
440    */
441   const LogFactoryInterface& GetLogFactory();
442
443   /**
444    * @copydoc Dali::Adaptor::RegisterProcessor
445    */
446   void RegisterProcessor(Integration::Processor& processor, bool postProcessor);
447
448   /**
449    * @coydoc Dali::Adaptor::UnregisterProcessor
450    */
451   void UnregisterProcessor(Integration::Processor& processor, bool postProcessor);
452
453   /**
454    * Check MultipleWindow is supported
455    */
456   bool IsMultipleWindowSupported() const;
457
458   /**
459    * @brief Gets the render thread id of DALi.
460    * @return The render thread id.
461    */
462   int32_t GetRenderThreadId() const;
463
464 public: //AdaptorInternalServices
465   /**
466    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPlatformAbstractionInterface()
467    */
468   Dali::Integration::PlatformAbstraction& GetPlatformAbstractionInterface() override;
469
470   /**
471    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetDisplayConnectionInterface()
472    */
473   Dali::DisplayConnection& GetDisplayConnectionInterface() override;
474
475   /**
476    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetGraphicsInterface()
477    */
478   GraphicsInterface& GetGraphicsInterface() override;
479
480   /**
481    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetTriggerEventInterface()
482    */
483   TriggerEventInterface& GetProcessCoreEventsTrigger() override;
484
485   /**
486    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetSocketFactoryInterface()
487    */
488   SocketFactoryInterface& GetSocketFactoryInterface() override;
489
490   /**
491    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetRenderSurfaceInterface()
492    */
493   Dali::RenderSurfaceInterface* GetRenderSurfaceInterface() override;
494
495   /**
496    * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPerformanceInterface()
497    */
498   PerformanceInterface* GetPerformanceInterface() override;
499
500   /**
501    * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetKernelTraceInterface()
502    */
503   TraceInterface& GetKernelTraceInterface() override;
504
505   /**
506    * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetSystemTraceInterface()
507    */
508   TraceInterface& GetSystemTraceInterface() override;
509
510   /**
511    * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetWindowContainerInterface()
512    */
513   void GetWindowContainerInterface(WindowContainer& windows) override;
514
515 public: // Signals
516   /**
517    * @copydoc Dali::Adaptor::SignalResized
518    */
519   AdaptorSignalType& ResizedSignal()
520   {
521     return mResizedSignal;
522   }
523
524   /**
525    * @copydoc Dali::Adaptor::LanguageChangedSignal
526    */
527   AdaptorSignalType& LanguageChangedSignal()
528   {
529     return mLanguageChangedSignal;
530   }
531
532   /**
533    * @copydoc Dali::Adaptor::WindowCreatedSignal
534    */
535   WindowCreatedSignalType& WindowCreatedSignal()
536   {
537     return mWindowCreatedSignal;
538   }
539
540 public: // From Dali::Internal::Adaptor::CoreEventInterface
541   /**
542    * @copydoc Dali::Internal::Adaptor:CoreEventInterface:::ProcessCoreEvents()
543    */
544   void ProcessCoreEvents() override;
545
546 private: // From Dali::Internal::Adaptor::CoreEventInterface
547   /**
548    * @copydoc Dali::Internal::Adaptor::CoreEventInterface::QueueCoreEvent()
549    */
550   void QueueCoreEvent(const Dali::Integration::Event& event) override;
551
552 private: // From Dali::Integration::RenderController
553   /**
554    * @copydoc Dali::Integration::RenderController::RequestUpdate()
555    */
556   void RequestUpdate() override;
557
558   /**
559    * @copydoc Dali::Integration::RenderController::RequestProcessEventsOnIdle()
560    */
561   void RequestProcessEventsOnIdle() override;
562
563 public: // From Dali::Internal::Adaptor::WindowVisibilityObserver
564   /**
565    * Called when the window becomes fully or partially visible.
566    */
567   void OnWindowShown() override;
568
569   /**
570    * Called when the window is fully hidden.
571    */
572   void OnWindowHidden() override;
573
574 private: // From Dali::Internal::Adaptor::DamageObserver
575   /**
576    * @copydoc Dali::Internal::Adaptor::DamageObserver::OnDamaged()
577    */
578   void OnDamaged(const DamageArea& area) override;
579
580 private:
581   // Undefined
582   Adaptor(const Adaptor&) = delete;
583   Adaptor& operator=(Adaptor&) = delete;
584
585 private:
586   /**
587    * Assigns the render surface to the adaptor
588    *
589    */
590   void SetSurface(Dali::RenderSurfaceInterface* surface);
591
592   /**
593    * called after surface is created
594    */
595   void SurfaceInitialized();
596
597   /**
598    * Sends an notification message from main loop idle handler
599    */
600   bool ProcessCoreEventsFromIdle();
601
602   /**
603    * Gets path for data/resource storage.
604    * @param[out] path Path for data/resource storage
605    */
606   void GetDataStoragePath(std::string& path);
607
608   /**
609    * Sets up system information if needs
610    */
611   void SetupSystemInformation();
612
613   /**
614    * Adds a callback to be run when entering an idle state.
615    *
616    * A callback of the following type should be used:
617    * @code
618    *   bool MyFunction();
619    * @endcode
620    * This callback will be called repeatedly as long as it returns true. A return of 0 deletes this callback.
621    */
622   bool AddIdleEnterer(CallbackBase* callback, bool forceAdd);
623
624   /**
625    * Removes a previously added the idle enterer callback.
626    */
627   void RemoveIdleEnterer(CallbackBase* callback);
628
629 private:
630   /**
631    * Constructor
632    * @param[in]  window       window handle
633    * @param[in]  adaptor      The public adaptor
634    * @param[in]  surface      A render surface can be one of the following
635    *                          - Pixmap, adaptor will use existing Pixmap to draw on to
636    *                          - Window, adaptor will use existing Window to draw on to
637    * @param[in]  environmentOptions  A pointer to the environment options. If NULL then one is created.
638    * @param[in]  threadMode   The ThreadMode of the Adaptor
639    */
640   Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, Dali::RenderSurfaceInterface* surface, EnvironmentOptions* environmentOptions, ThreadMode threadMode);
641
642 private: // Types
643   enum State
644   {
645     READY,                     ///< Initial state before Adaptor::Start is called.
646     RUNNING,                   ///< Adaptor is running.
647     PAUSED,                    ///< Adaptor has been paused.
648     PAUSED_WHILE_HIDDEN,       ///< Adaptor is paused while window is hidden (& cannot be resumed until window is shown).
649     PAUSED_WHILE_INITIALIZING, ///< Adaptor is paused while application is initializing.
650     STOPPED,                   ///< Adaptor has been stopped.
651   };
652
653   // There is no weak handle for BaseHandle in DALi, but we can't ref count the window here,
654   // so we have to store the raw pointer.
655   using WindowContainer   = std::vector<Dali::Internal::Adaptor::SceneHolder*>;
656   using ObserverContainer = std::vector<LifeCycleObserver*>;
657
658 private:                                          // Data
659   AdaptorSignalType       mResizedSignal;         ///< Resized signal.
660   AdaptorSignalType       mLanguageChangedSignal; ///< Language changed signal.
661   WindowCreatedSignalType mWindowCreatedSignal;   ///< Window created signal.
662
663   Dali::Adaptor&           mAdaptor;          ///< Reference to public adaptor instance.
664   State                    mState;            ///< Current state of the adaptor
665   Dali::Integration::Core* mCore;             ///< Dali Core
666   ThreadController*        mThreadController; ///< Controls the threads
667
668   std::unique_ptr<GraphicsInterface> mGraphics;          ///< Graphics interface
669   Dali::DisplayConnection*           mDisplayConnection; ///< Display connection
670   WindowContainer                    mWindows;           ///< A container of all the Windows that are currently created
671
672   std::unique_ptr<ConfigurationManager> mConfigurationManager; ///< Configuration manager
673
674   TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction; ///< Platform abstraction
675
676   CallbackManager*            mCallbackManager;                       ///< Used to install callbacks
677   bool                        mNotificationOnIdleInstalled;           ///< whether the idle handler is installed to send an notification event
678   TriggerEventInterface*      mNotificationTrigger;                   ///< Notification event trigger
679   FeedbackPluginProxy*        mDaliFeedbackPlugin;                    ///< Used to access feedback support
680   FeedbackController*         mFeedbackController;                    ///< Plays feedback effects for Dali-Toolkit UI Controls.
681   Dali::TtsPlayer             mTtsPlayers[Dali::TtsPlayer::MODE_NUM]; ///< Provides TTS support
682   ObserverContainer           mObservers;                             ///< A list of adaptor observer pointers
683   EnvironmentOptions*         mEnvironmentOptions;                    ///< environment options
684   PerformanceInterface*       mPerformanceInterface;                  ///< Performance interface
685   KernelTrace                 mKernelTracer;                          ///< Kernel tracer
686   SystemTrace                 mSystemTracer;                          ///< System tracer
687   ObjectProfiler*             mObjectProfiler;                        ///< Tracks object lifetime for profiling
688   SocketFactory               mSocketFactory;                         ///< Socket factory
689   Mutex                       mMutex;                                 ///< Mutex
690   ThreadMode                  mThreadMode;                            ///< The thread mode
691   const bool                  mEnvironmentOptionsOwned : 1;           ///< Whether we own the EnvironmentOptions (and thus, need to delete it)
692   bool                        mUseRemoteSurface : 1;                  ///< whether the remoteSurface is used or not
693   Dali::LayoutDirection::Type mRootLayoutDirection;                   ///< LayoutDirection of window
694
695   std::unique_ptr<Integration::AddOnManager> mAddOnManager; ///< Pointer to the addon manager
696
697   class AccessibilityObserver : public ConnectionTracker
698   {
699   public:
700     void OnAccessibleKeyEvent(const Dali::KeyEvent& event);
701   };
702   AccessibilityObserver mAccessibilityObserver;
703
704 public:
705   inline static Adaptor& GetImplementation(Dali::Adaptor& adaptor)
706   {
707     return *adaptor.mImpl;
708   }
709 };
710
711 } // namespace Adaptor
712
713 } // namespace Internal
714
715 } // namespace Dali
716
717 #endif // DALI_INTERNAL_ADAPTOR_IMPL_H