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