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