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