[AT-SPI] Window: add highlight signal
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-impl.h
1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_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/public-api/actors/layer.h>
23 #include <dali/public-api/adaptor-framework/window-enumerations.h>
24 #include <dali/public-api/object/base-object.h>
25 #include <dali/public-api/object/property-array.h>
26 #include <dali/public-api/object/ref-object.h>
27 #include <dali/public-api/render-tasks/render-task-list.h>
28
29 // INTERNAL INCLUDES
30 #include <dali/devel-api/adaptor-framework/window-devel.h>
31 #include <dali/integration-api/adaptor-framework/scene-holder-impl.h>
32 #include <dali/internal/adaptor/common/adaptor-impl.h>
33 #include <dali/internal/window-system/common/event-handler.h>
34 #include <dali/public-api/adaptor-framework/key-grab.h>
35 #include <dali/public-api/adaptor-framework/window.h>
36
37 namespace Dali
38 {
39 class Adaptor;
40 class Actor;
41 class RenderSurfaceInterface;
42
43 namespace Internal
44 {
45 namespace Adaptor
46 {
47 class Orientation;
48 class WindowRenderSurface;
49 class WindowBase;
50
51 class Window;
52 using WindowPtr       = IntrusivePtr<Window>;
53 using OrientationPtr  = IntrusivePtr<Orientation>;
54 using EventHandlerPtr = IntrusivePtr<EventHandler>;
55
56 /**
57  * Window provides a surface to render onto with orientation & indicator properties.
58  */
59 class Window : public Dali::Internal::Adaptor::SceneHolder, public EventHandler::Observer, public ConnectionTracker
60 {
61 public:
62   typedef Dali::Window::FocusChangeSignalType                        FocusChangeSignalType;
63   typedef Dali::Window::ResizeSignalType                             ResizeSignalType;
64   typedef Dali::DevelWindow::VisibilityChangedSignalType             VisibilityChangedSignalType;
65   typedef Dali::DevelWindow::TransitionEffectEventSignalType         TransitionEffectEventSignalType;
66   typedef Dali::DevelWindow::KeyboardRepeatSettingsChangedSignalType KeyboardRepeatSettingsChangedSignalType;
67   typedef Dali::DevelWindow::AuxiliaryMessageSignalType              AuxiliaryMessageSignalType;
68   typedef Dali::DevelWindow::AccessibilityHighlightSignalType        AccessibilityHighlightSignalType;
69   typedef Signal<void()>                                             SignalType;
70
71   /**
72    * @brief Create a new Window. This should only be called once by the Application class
73    * @param[in] positionSize The position and size of the window
74    * @param[in] name The window title
75    * @param[in] className The window class name
76    * @param[in] type Window type.
77    * @param[in] isTransparent Whether window is transparent
78    * @return A newly allocated Window
79    */
80   static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false);
81
82   /**
83    * @brief Create a new Window. This should only be called once by the Application class
84    * @param[in] surface The surface used to render on.
85    * @param[in] positionSize The position and size of the window
86    * @param[in] name The window title
87    * @param[in] className The window class name
88    * @param[in] type Window type.
89    * @param[in] isTransparent Whether window is transparent
90    * @return A newly allocated Window
91    */
92   static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className,  Dali::WindowType type, bool isTransparent = false);
93
94   /**
95    * @copydoc Dali::Window::SetClass()
96    */
97   void SetClass(std::string name, std::string className);
98
99   /**
100    * @brief Gets the window class name.
101    * @return The class of the window
102    */
103   std::string GetClassName() const;
104
105   /**
106    * @copydoc Dali::Window::Raise()
107    */
108   void Raise();
109
110   /**
111    * @copydoc Dali::Window::Lower()
112    */
113   void Lower();
114
115   /**
116    * @copydoc Dali::Window::Activate()
117    */
118   void Activate();
119
120   /**
121    * @copydoc Dali::DevelWindow::Maximize()
122    */
123   void Maximize(bool maximize);
124
125   /**
126    * @copydoc Dali::DevelWindow::IsMaximized()
127    */
128   bool IsMaximized() const;
129
130   /**
131    * @copydoc Dali::DevelWindow::Minimize()
132    */
133   void Minimize(bool minimize);
134
135   /**
136    * @copydoc Dali::DevelWindow::IsMinimized()
137    */
138   bool IsMinimized() const;
139
140   /**
141    * @copydoc Dali::Window::GetLayerCount()
142    */
143   uint32_t GetLayerCount() const;
144
145   /**
146    * @copydoc Dali::Window::GetLayer()
147    */
148   Dali::Layer GetLayer(uint32_t depth) const;
149
150   /**
151    * @copydoc Dali::DevelWindow::GetRenderTaskList()
152    */
153   Dali::RenderTaskList GetRenderTaskList() const;
154
155   /**
156    * @brief Get window resource ID assigned by window manager
157    * @return The resource ID of the window
158    */
159   std::string GetNativeResourceId() const;
160
161   /**
162    * @copydoc Dali::Window::AddAvailableOrientation()
163    */
164   void AddAvailableOrientation(WindowOrientation orientation);
165
166   /**
167    * @copydoc Dali::Window::RemoveAvailableOrientation()
168    */
169   void RemoveAvailableOrientation(WindowOrientation orientation);
170
171   /**
172    * @copydoc Dali::Window::SetPreferredOrientation()
173    */
174   void SetPreferredOrientation(WindowOrientation orientation);
175
176   /**
177    * @copydoc Dali::Window::GetPreferredOrientation()
178    */
179   WindowOrientation GetPreferredOrientation();
180
181   /**
182    * @copydoc Dali::Window::SetAcceptFocus()
183    */
184   void SetAcceptFocus(bool accept);
185
186   /**
187    * @copydoc Dali::Window::IsFocusAcceptable()
188    */
189   bool IsFocusAcceptable() const;
190
191   /**
192    * @copydoc Dali::Window::Show()
193    */
194   void Show();
195
196   /**
197    * @copydoc Dali::Window::Hide()
198    */
199   void Hide();
200
201   /**
202    * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
203    */
204   unsigned int GetSupportedAuxiliaryHintCount() const;
205
206   /**
207    * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
208    */
209   std::string GetSupportedAuxiliaryHint(unsigned int index) const;
210
211   /**
212    * @copydoc Dali::Window::AddAuxiliaryHint()
213    */
214   unsigned int AddAuxiliaryHint(const std::string& hint, const std::string& value);
215
216   /**
217    * @copydoc Dali::Window::RemoveAuxiliaryHint()
218    */
219   bool RemoveAuxiliaryHint(unsigned int id);
220
221   /**
222    * @copydoc Dali::Window::SetAuxiliaryHintValue()
223    */
224   bool SetAuxiliaryHintValue(unsigned int id, const std::string& value);
225
226   /**
227    * @copydoc Dali::Window::GetAuxiliaryHintValue()
228    */
229   std::string GetAuxiliaryHintValue(unsigned int id) const;
230
231   /**
232    * @copydoc Dali::Window::GetAuxiliaryHintId()
233    */
234   unsigned int GetAuxiliaryHintId(const std::string& hint) const;
235
236   /**
237    * @copydoc Dali::Window::SetInputRegion()
238    */
239   void SetInputRegion(const Rect<int>& inputRegion);
240
241   /**
242    * @copydoc Dali::Window::SetType()
243    */
244   void SetType(WindowType type);
245
246   /**
247    * @copydoc Dali::Window::GetType() const
248    */
249   WindowType GetType() const;
250
251   /**
252    * @copydoc Dali::Window::SetNotificationLevel()
253    */
254   WindowOperationResult SetNotificationLevel(WindowNotificationLevel level);
255
256   /**
257    * @copydoc Dali::Window::GetNotificationLevel()
258    */
259   WindowNotificationLevel GetNotificationLevel() const;
260
261   /**
262    * @copydoc Dali::Window::SetOpaqueState()
263    */
264   void SetOpaqueState(bool opaque);
265
266   /**
267    * @copydoc Dali::Window::IsOpaqueState()
268    */
269   bool IsOpaqueState() const;
270
271   /**
272    * @copydoc Dali::Window::SetScreenOffMode()
273    */
274   WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode);
275
276   /**
277    * @copydoc Dali::Window::GetScreenOffMode()
278    */
279   WindowScreenOffMode GetScreenOffMode() const;
280
281   /**
282    * @copydoc Dali::Window::SetBrightness()
283    */
284   WindowOperationResult SetBrightness(int brightness);
285
286   /**
287    * @copydoc Dali::Window::GetBrightness()
288    */
289   int GetBrightness() const;
290
291   /**
292    * @copydoc Dali::Window::SetSize()
293    */
294   void SetSize(Dali::Window::WindowSize size);
295
296   /**
297    * @copydoc Dali::Window::GetSize()
298    */
299   Dali::Window::WindowSize GetSize() const;
300
301   /**
302    * @copydoc Dali::Window::SetPosition()
303    */
304   void SetPosition(Dali::Window::WindowPosition position);
305
306   /**
307    * @copydoc Dali::Window::GetPosition()
308    */
309   Dali::Window::WindowPosition GetPosition() const;
310
311   /**
312    * @copydoc Dali::DevelWindow::SetPositionSize()
313    */
314   void SetPositionSize(PositionSize positionSize);
315
316   /**
317    * @copydoc Dali::DevelWindow::GetPositionSize()
318    */
319   PositionSize GetPositionSize() const;
320
321   /**
322    * @copydoc Dali::Window::GetRootLayer()
323    */
324   Dali::Layer GetRootLayer() const;
325
326   /**
327    * @copydoc Dali::Window::SetTransparency()
328    */
329   void SetTransparency(bool transparent);
330
331   /**
332    * @copydoc Dali::KeyGrab::GrabKey()
333    */
334   bool GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode);
335
336   /**
337    * @copydoc Dali::KeyGrab::UngrabKey()
338    */
339   bool UngrabKey(Dali::KEY key);
340
341   /**
342    * @copydoc Dali::KeyGrab::GrabKeyList()
343    */
344   bool GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result);
345
346   /**
347    * @copydoc Dali::KeyGrab::UngrabKeyList()
348    */
349   bool UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result);
350
351   /**
352    * @copydoc Dali::DevelWindow::Get()
353    */
354   static Dali::Window Get(Dali::Actor actor);
355
356   /**
357    * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent)
358    */
359   void SetParent(Dali::Window& parent);
360
361   /**
362    * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent, bool belowParent)
363    */
364   void SetParent(Dali::Window& parent, bool belowParent);
365
366   /**
367    * @copydoc Dali::DevelWindow::Unparent()
368    */
369   void Unparent();
370
371   /**
372    * @copydoc Dali::DevelWindow::GetParent()
373    */
374   Dali::Window GetParent();
375
376   /**
377    * @copydoc Dali::DevelWindow::GetCurrentOrientation()
378    */
379   WindowOrientation GetCurrentOrientation() const;
380
381   /**
382    * @copydoc Dali::DevelWindow::GetPhysicalOrientation()
383    */
384   int GetPhysicalOrientation() const;
385
386   /**
387    * @copydoc Dali::DevelWindow::SetAvailableOrientations()
388    */
389   void SetAvailableOrientations(const Dali::Vector<WindowOrientation>& orientations);
390
391   /**
392    * @copydoc Dali::DevelWindow::SetPositionSizeWithOrientation()
393    */
394   void SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation);
395
396   /**
397    * @brief Emit the accessibility highlight signal.
398    * The highlight indicates that it is an object to interact with the user regardless of focus.
399    * After setting the highlight on the object, you can do things that the object can do, such as
400    * giving or losing focus.
401    *
402    * @param[in] highlight If window needs to grab or clear highlight.
403    */
404   void EmitAccessibilityHighlightSignal(bool highlight);
405
406 public: // Dali::Internal::Adaptor::SceneHolder
407   /**
408    * @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
409    */
410   Dali::Any GetNativeHandle() const override;
411
412   /**
413    * @copydoc Dali::Internal::Adaptor::SceneHolder::IsVisible
414    */
415   bool IsVisible() const override;
416
417   /**
418    * @copydoc Dali::DevelWindow::GetNativeId()
419    */
420   int32_t GetNativeId() const;
421
422   /**
423    * @copydoc Dali::DevelWindow::RequestMoveToServer()
424    */
425   void RequestMoveToServer();
426
427   /**
428    * @copydoc Dali::DevelWindow::RequestResizeToServer()
429    */
430   void RequestResizeToServer(WindowResizeDirection direction);
431
432   /**
433    * @copydoc Dali::DevelWindow::EnableFloatingMode()
434    */
435   void EnableFloatingMode(bool enable);
436
437   /**
438    * @copydoc Dali::DevelWindow::IncludeInputRegion()
439    */
440   void IncludeInputRegion(const Rect<int>& inputRegion);
441
442   /**
443    * @copydoc Dali::DevelWindow::ExcludeInputRegion()
444    */
445   void ExcludeInputRegion(const Rect<int>& inputRegion);
446
447   /**
448    * @copydoc Dali::DevelWindow::SetNeedsRotationCompletedAcknowledgement()
449    */
450   void SetNeedsRotationCompletedAcknowledgement(bool needAcknowledgement);
451
452   /**
453    * @copydoc Dali::DevelWindow::SendRotationCompletedAcknowledgement()
454    */
455   void SendRotationCompletedAcknowledgement();
456
457 private:
458   /**
459    * @brief Enumeration for orietation mode.
460    * The Orientation Mode is related to screen size.
461    * If screen width is longer than height, the Orientation Mode will have LANDSCAPE.
462    * Otherwise screen width is shorter than height or same, the Orientation Mode will have PORTRAIT.
463    */
464   enum class OrientationMode
465   {
466     PORTRAIT = 0,
467     LANDSCAPE
468   };
469
470   /**
471    * Private constructor.
472    * @sa Window::New()
473    */
474   Window();
475
476   /**
477    * Destructor
478    */
479   ~Window() override;
480
481   /**
482    * Second stage initialization
483    */
484   void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, WindowType type);
485
486   /**
487    * Called when the window becomes iconified or deiconified.
488    */
489   void OnIconifyChanged(bool iconified);
490
491   /**
492    * Called when the window focus is changed.
493    */
494   void OnFocusChanged(bool focusIn);
495
496   /**
497    * Called when the output is transformed.
498    */
499   void OnOutputTransformed();
500
501   /**
502    * Called when the window receives a delete request.
503    */
504   void OnDeleteRequest();
505
506   /**
507    * Called when the window receives a Transition effect-start/end event.
508    */
509   void OnTransitionEffectEvent(WindowEffectState state, WindowEffectType type);
510
511   /**
512    * @brief Called when window receives a keyboard repeat event.
513    */
514   void OnKeyboardRepeatSettingsChanged();
515
516   /**
517    * @brief Called when the window redraw is requested.
518    */
519   void OnWindowRedrawRequest();
520
521   /**
522    * @brief Called when the window is resized or moved by display server.
523    *
524    * @param[in] positionSize the updated window's position and size.
525    */
526   void OnUpdatePositionSize(Dali::PositionSize& positionSize);
527
528   /**
529    * @brief Called when display server sent the auxiliary message.
530    *
531    * @param[in] key the auxiliary message's key.
532    * @param[in] value the auxiliary message's value.
533    * @param[in] options the auxiliary message's options. This is the list of string.
534    */
535   void OnAuxiliaryMessage(const std::string& key, const std::string& value, const Property::Array& options);
536
537   /**
538    * @brief Called when Accessibility is enabled.
539    *
540    * This method is to register the window to accessibility bridge.
541    */
542   void OnAccessibilityEnabled();
543
544   /**
545    * @brief Called when Accessibility is disabled.
546    *
547    * This method is to remove the window from accessibility bridge.
548    */
549   void OnAccessibilityDisabled();
550
551   /**
552    * @brief Set available orientation to window base.
553    */
554   void SetAvailableAnlges(const std::vector<int>& angles);
555
556   /**
557    * @brief Convert from window orientation to angle using OrientationMode.
558    */
559   int ConvertToAngle(WindowOrientation orientation);
560
561   /**
562    * @brief Convert from angle to window orientation using OrientationMode.
563    */
564   WindowOrientation ConvertToOrientation(int angle) const;
565
566   /**
567    * @brief Check available window orientation for Available orientation.
568    */
569   bool IsOrientationAvailable(WindowOrientation orientation) const;
570
571   /**
572    * @brief Return the rect value to recalulate with the default system coordinates.
573    *
574    * Some native window APIs work the geometry value based on the default system coordinates.
575    * IncludeInputRegion() and ExcludeInputRegion() are one of them.
576    * When the window is rotated, current window's geometry already were set with the rotated angle.
577    * If IncludeInputRegion() or ExcludeInputRegion() are called with rotated angle by application,
578    * the rect's area should be re-calcuated on the default system coordinates.
579    *
580    * @param[in] rect the window's current position and size with current window rotation angle.
581    * @return the re-calculated rect on the default system coordinates.
582    */
583   Rect<int> RecalculateRect(const Rect<int>& rect);
584
585 private: // Dali::Internal::Adaptor::SceneHolder
586   /**
587    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
588    */
589   void OnAdaptorSet(Dali::Adaptor& adaptor) override;
590
591   /**
592    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnSurfaceSet
593    */
594   void OnSurfaceSet(Dali::RenderSurfaceInterface* surface) override;
595
596   /**
597    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnPause
598    */
599   void OnPause() override;
600
601   /**
602    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnResume
603    */
604   void OnResume() override;
605
606   /**
607    * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculateTouchPosition
608    */
609   void RecalculateTouchPosition(Integration::Point& point) override;
610
611 private: // Dali::Internal::Adaptor::EventHandler::Observer
612   /**
613    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnTouchPoint
614    */
615   void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override;
616
617   /**
618    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
619    */
620   void OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) override;
621
622   /**
623    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnKeyEvent
624    */
625   void OnKeyEvent(Dali::Integration::KeyEvent& keyEvent) override;
626
627   /**
628    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnRotation
629    */
630   void OnRotation(const RotationEvent& rotation) override;
631
632 public: // Signals
633   /**
634    * @copydoc Dali::Window::FocusChangeSignal()
635    */
636   FocusChangeSignalType& FocusChangeSignal()
637   {
638     return mFocusChangeSignal;
639   }
640
641   /**
642    * @copydoc Dali::Window::ResizedSignal()
643    */
644   ResizeSignalType& ResizeSignal()
645   {
646     return mResizeSignal;
647   }
648
649   /**
650    * This signal is emitted when the window is requesting to be deleted
651    */
652   SignalType& DeleteRequestSignal()
653   {
654     return mDeleteRequestSignal;
655   }
656
657   /**
658    * @copydoc Dali::DevelWindow::VisibilityChangedSignal()
659    */
660   VisibilityChangedSignalType& VisibilityChangedSignal()
661   {
662     return mVisibilityChangedSignal;
663   }
664
665   /**
666    * @copydoc Dali::Window::SignalEventProcessingFinished()
667    */
668   Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal()
669   {
670     return mScene.EventProcessingFinishedSignal();
671   }
672
673   /**
674    * @copydoc Dali::DevelWindow::TransitionEffectEventSignal()
675    */
676   TransitionEffectEventSignalType& TransitionEffectEventSignal()
677   {
678     return mTransitionEffectEventSignal;
679   }
680
681   /**
682    * @copydoc Dali::DevelWindow::KeyboardRepeatSettingsChangedSignal()
683    */
684   KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal()
685   {
686     return mKeyboardRepeatSettingsChangedSignal;
687   }
688
689   /**
690    * @copydoc Dali::DevelWindow::AuxiliaryMessageSignal()
691    */
692   AuxiliaryMessageSignalType& AuxiliaryMessageSignal()
693   {
694     return mAuxiliaryMessageSignal;
695   }
696
697   /**
698    * @copydoc Dali::DevelWindow::AccessibilityHighlightSignal()
699    */
700   AccessibilityHighlightSignalType& AccessibilityHighlightSignal()
701   {
702     return mAccessibilityHighlightSignal;
703   }
704
705 private:
706   WindowRenderSurface* mWindowSurface; ///< The window rendering surface
707   WindowBase*          mWindowBase;
708   std::string          mName;
709   std::string          mClassName;
710   bool                 mIsTransparent : 1;
711   bool                 mIsFocusAcceptable : 1;
712   bool                 mIconified : 1;
713   bool                 mOpaqueState : 1;
714   bool                 mWindowRotationAcknowledgement : 1;
715   bool                 mFocused : 1;
716   Dali::Window         mParentWindow;
717
718   OrientationPtr   mOrientation;
719   std::vector<int> mAvailableAngles;
720   int              mPreferredAngle;
721
722   int mRotationAngle;                    ///< The angle of the rotation
723   int mWindowWidth;                      ///< The width of the window
724   int mWindowHeight;                     ///< The height of the window
725
726   EventHandlerPtr mEventHandler;         ///< The window events handler
727
728   OrientationMode mOrientationMode;      ///< The physical screen mode is portrait or landscape
729
730   int mNativeWindowId;                   ///< The Native Window Id
731
732   // Signals
733   SignalType                              mDeleteRequestSignal;
734   FocusChangeSignalType                   mFocusChangeSignal;
735   ResizeSignalType                        mResizeSignal;
736   VisibilityChangedSignalType             mVisibilityChangedSignal;
737   TransitionEffectEventSignalType         mTransitionEffectEventSignal;
738   KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal;
739   AuxiliaryMessageSignalType              mAuxiliaryMessageSignal;
740   AccessibilityHighlightSignalType        mAccessibilityHighlightSignal;
741 };
742
743 } // namespace Adaptor
744 } // namespace Internal
745
746 // Helpers for public-api forwarding methods
747
748 inline Internal::Adaptor::Window& GetImplementation(Dali::Window& window)
749 {
750   DALI_ASSERT_ALWAYS(window && "Window handle is empty");
751   BaseObject& object = window.GetBaseObject();
752   return static_cast<Internal::Adaptor::Window&>(object);
753 }
754
755 inline const Internal::Adaptor::Window& GetImplementation(const Dali::Window& window)
756 {
757   DALI_ASSERT_ALWAYS(window && "Window handle is empty");
758   const BaseObject& object = window.GetBaseObject();
759   return static_cast<const Internal::Adaptor::Window&>(object);
760 }
761
762 } // namespace Dali
763
764 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H