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