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