[Tizen] Add GetRenderTaskList to SceneHolder
[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
29 // INTERNAL INCLUDES
30 #include <dali/devel-api/adaptor-framework/window-devel.h>
31 #include <dali/integration-api/adaptor-framework/scene-holder-impl.h>
32 #include <dali/internal/adaptor/common/adaptor-impl.h>
33 #include <dali/internal/window-system/common/event-handler.h>
34 #include <dali/public-api/adaptor-framework/key-grab.h>
35 #include <dali/public-api/adaptor-framework/window.h>
36
37 namespace Dali
38 {
39 class Adaptor;
40 class Actor;
41 class RenderSurfaceInterface;
42
43 namespace Internal
44 {
45 namespace Adaptor
46 {
47 class Orientation;
48 class WindowRenderSurface;
49 class WindowBase;
50
51 class Window;
52 using WindowPtr          = IntrusivePtr<Window>;
53 using OrientationPtr     = IntrusivePtr<Orientation>;
54 using MouseInOutEventPtr = IntrusivePtr<Dali::DevelWindow::MouseInOutEvent>;
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 Dali::DevelWindow::MouseInOutEventSignalType               MouseInOutEventSignalType;
73   typedef Dali::DevelWindow::MoveCompletedSignalType                 MoveCompletedSignalType;
74   typedef Dali::DevelWindow::ResizeCompletedSignalType               ResizeCompletedSignalType;
75   typedef Dali::DevelWindow::InsetsChangedSignalType                 InsetsChangedSignalType;
76   typedef Signal<void()>                                             SignalType;
77
78   /**
79    * @brief Create a new Window. This should only be called once by the Application class
80    * @param[in] positionSize The position and size of the window
81    * @param[in] name The window title
82    * @param[in] className The window class name
83    * @param[in] type Window type.
84    * @param[in] isTransparent Whether window is transparent
85    * @return A newly allocated Window
86    */
87   static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false);
88
89   /**
90    * @brief Create a new Window. This should only be called once by the Application class
91    * @param[in] surface The surface used to render on.
92    * @param[in] positionSize The position and size of the window
93    * @param[in] name The window title
94    * @param[in] className The window class name
95    * @param[in] type Window type.
96    * @param[in] isTransparent Whether window is transparent
97    * @return A newly allocated Window
98    */
99   static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false);
100
101   /**
102    * @copydoc Dali::Window::SetClass()
103    */
104   void SetClass(std::string name, std::string className);
105
106   /**
107    * @brief Gets the window class name.
108    * @return The class of the window
109    */
110   std::string GetClassName() const;
111
112   /**
113    * @copydoc Dali::Window::Raise()
114    */
115   void Raise();
116
117   /**
118    * @copydoc Dali::Window::Lower()
119    */
120   void Lower();
121
122   /**
123    * @copydoc Dali::Window::Activate()
124    */
125   void Activate();
126
127   /**
128    * @copydoc Dali::DevelWindow::Maximize()
129    */
130   void Maximize(bool maximize);
131
132   /**
133    * @copydoc Dali::DevelWindow::IsMaximized()
134    */
135   bool IsMaximized() const;
136
137   /**
138    * @copydoc Dali::DevelWindow::SetMaximumSize()
139    */
140   void SetMaximumSize(Dali::Window::WindowSize size);
141
142   /**
143    * @copydoc Dali::DevelWindow::Minimize()
144    */
145   void Minimize(bool minimize);
146
147   /**
148    * @copydoc Dali::DevelWindow::IsMinimized()
149    */
150   bool IsMinimized() const;
151
152   /**
153    * @copydoc Dali::DevelWindow::SetMimimumSize()
154    */
155   void SetMimimumSize(Dali::Window::WindowSize size);
156
157   /**
158    * @copydoc Dali::Window::GetLayerCount()
159    */
160   uint32_t GetLayerCount() const;
161
162   /**
163    * @copydoc Dali::Window::GetLayer()
164    */
165   Dali::Layer GetLayer(uint32_t depth) 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::SetLayout()
335    */
336   void SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan);
337
338   /**
339    * @copydoc Dali::Window::GetRootLayer()
340    */
341   Dali::Layer GetRootLayer() const;
342
343   /**
344    * @copydoc Dali::Window::SetTransparency()
345    */
346   void SetTransparency(bool transparent);
347
348   /**
349    * @copydoc Dali::KeyGrab::GrabKey()
350    */
351   bool GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode);
352
353   /**
354    * @copydoc Dali::KeyGrab::UngrabKey()
355    */
356   bool UngrabKey(Dali::KEY key);
357
358   /**
359    * @copydoc Dali::KeyGrab::GrabKeyList()
360    */
361   bool GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result);
362
363   /**
364    * @copydoc Dali::KeyGrab::UngrabKeyList()
365    */
366   bool UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result);
367
368   /**
369    * @copydoc Dali::DevelWindow::Get()
370    */
371   static Dali::Window Get(Dali::Actor actor);
372
373   /**
374    * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent)
375    */
376   void SetParent(Dali::Window& parent);
377
378   /**
379    * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent, bool belowParent)
380    */
381   void SetParent(Dali::Window& parent, bool belowParent);
382
383   /**
384    * @copydoc Dali::DevelWindow::Unparent()
385    */
386   void Unparent();
387
388   /**
389    * @copydoc Dali::DevelWindow::GetParent()
390    */
391   Dali::Window GetParent();
392
393   /**
394    * @copydoc Dali::DevelWindow::GetCurrentOrientation()
395    */
396   WindowOrientation GetCurrentOrientation() const;
397
398   /**
399    * @copydoc Dali::DevelWindow::GetPhysicalOrientation()
400    */
401   int GetPhysicalOrientation() const;
402
403   /**
404    * @copydoc Dali::DevelWindow::SetAvailableOrientations()
405    */
406   void SetAvailableOrientations(const Dali::Vector<WindowOrientation>& orientations);
407
408   /**
409    * @copydoc Dali::DevelWindow::SetPositionSizeWithOrientation()
410    */
411   void SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation);
412
413   /**
414    * @brief Emit the accessibility highlight signal.
415    * The highlight indicates that it is an object to interact with the user regardless of focus.
416    * After setting the highlight on the object, you can do things that the object can do, such as
417    * giving or losing focus.
418    *
419    * @param[in] highlight If window needs to grab or clear highlight.
420    */
421   void EmitAccessibilityHighlightSignal(bool highlight);
422
423   /**
424    * @brief Sets the render notification trigger to call when render thread is completed a frame
425    *
426    * @param[in] renderNotification to use
427    */
428   void SetRenderNotification(TriggerEventInterface* renderNotification);
429
430 public: // Dali::Internal::Adaptor::SceneHolder
431   /**
432    * @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
433    */
434   Dali::Any GetNativeHandle() const override;
435
436   /**
437    * @copydoc Dali::Internal::Adaptor::SceneHolder::IsVisible
438    */
439   bool IsVisible() const override;
440
441   /**
442    * @copydoc Dali::DevelWindow::GetNativeId()
443    */
444   int32_t GetNativeId() const;
445
446   /**
447    * @copydoc Dali::DevelWindow::RequestMoveToServer()
448    */
449   void RequestMoveToServer();
450
451   /**
452    * @copydoc Dali::DevelWindow::RequestResizeToServer()
453    */
454   void RequestResizeToServer(WindowResizeDirection direction);
455
456   /**
457    * @copydoc Dali::DevelWindow::EnableFloatingMode()
458    */
459   void EnableFloatingMode(bool enable);
460
461   /**
462    * @copydoc Dali::DevelWindow::IsFloatingModeEnabled()
463    */
464   bool IsFloatingModeEnabled();
465
466   /**
467    * @copydoc Dali::DevelWindow::IncludeInputRegion()
468    */
469   void IncludeInputRegion(const Rect<int>& inputRegion);
470
471   /**
472    * @copydoc Dali::DevelWindow::ExcludeInputRegion()
473    */
474   void ExcludeInputRegion(const Rect<int>& inputRegion);
475
476   /**
477    * @copydoc Dali::DevelWindow::SetNeedsRotationCompletedAcknowledgement()
478    */
479   void SetNeedsRotationCompletedAcknowledgement(bool needAcknowledgement);
480
481   /**
482    * @copydoc Dali::DevelWindow::SendRotationCompletedAcknowledgement()
483    */
484   void SendRotationCompletedAcknowledgement();
485
486   /**
487    * @copydoc Dali::DevelWindow::IsWindowRotating()
488    */
489   bool IsWindowRotating() const;
490
491   /**
492    * @copydoc Dali::DevelWindow::GetLastKeyEvent()
493    */
494   const Dali::KeyEvent& GetLastKeyEvent() const;
495
496   /**
497    * @copydoc Dali::DevelWindow::GetLastTouchEvent()
498    */
499   const Dali::TouchEvent& GetLastTouchEvent() const;
500
501 private:
502   /**
503    * @brief Enumeration for orietation mode.
504    * The Orientation Mode is related to screen size.
505    * If screen width is longer than height, the Orientation Mode will have LANDSCAPE.
506    * Otherwise screen width is shorter than height or same, the Orientation Mode will have PORTRAIT.
507    */
508   enum class OrientationMode
509   {
510     PORTRAIT = 0,
511     LANDSCAPE
512   };
513
514   /**
515    * Private constructor.
516    * @sa Window::New()
517    */
518   Window();
519
520   /**
521    * Destructor
522    */
523   ~Window() override;
524
525   /**
526    * Second stage initialization
527    */
528   void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, WindowType type);
529
530   /**
531    * Called when the window becomes iconified or deiconified.
532    */
533   void OnIconifyChanged(bool iconified);
534
535   /**
536    * Called when the window focus is changed.
537    */
538   void OnFocusChanged(bool focusIn);
539
540   /**
541    * Called when the output is transformed.
542    */
543   void OnOutputTransformed();
544
545   /**
546    * Called when the window receives a delete request.
547    */
548   void OnDeleteRequest();
549
550   /**
551    * Called when the window receives a Transition effect-start/end event.
552    */
553   void OnTransitionEffectEvent(WindowEffectState state, WindowEffectType type);
554
555   /**
556    * @brief Called when window receives a keyboard repeat event.
557    */
558   void OnKeyboardRepeatSettingsChanged();
559
560   /**
561    * @brief Called when the window redraw is requested.
562    */
563   void OnWindowRedrawRequest();
564
565   /**
566    * @brief Called when the window's geometry data is changed by display server or client.
567    * It is based on configure noification event.
568    *
569    * @param[in] positionSize the updated window's position and size.
570    */
571   void OnUpdatePositionSize(Dali::PositionSize& positionSize);
572
573   /**
574    * @brief Called when display server sent the auxiliary message.
575    *
576    * @param[in] key the auxiliary message's key.
577    * @param[in] value the auxiliary message's value.
578    * @param[in] options the auxiliary message's options. This is the list of string.
579    */
580   void OnAuxiliaryMessage(const std::string& key, const std::string& value, const Property::Array& options);
581
582   /**
583    * @brief Called when Accessibility is enabled.
584    *
585    * This method is to register the window to accessibility bridge.
586    */
587   void OnAccessibilityEnabled();
588
589   /**
590    * @brief Called when Accessibility is disabled.
591    *
592    * This method is to remove the window from accessibility bridge.
593    */
594   void OnAccessibilityDisabled();
595
596   /**
597    * Called when the window rotation is finished.
598    *
599    * This signal is emmit when window rotation is finisehd and WindowRotationCompleted() is called.
600    */
601   void OnRotationFinished();
602
603   /**
604    * @brief Called when the mouse in or out event is received.
605    * @param[in] mouseInOutEvent the mouse event
606    */
607   void OnMouseInOutEvent(const Dali::DevelWindow::MouseInOutEvent& mouseInOutEvent);
608
609   /**
610    * @brief Called when the window is moved by display server.
611    *
612    * @param[in] position the moved window's position.
613    */
614   void OnMoveCompleted(Dali::Window::WindowPosition& position);
615
616   /**
617    * @brief Called when the window is resized by display server.
618    *
619    * @param[in] positionSize the resized window's size.
620    */
621   void OnResizeCompleted(Dali::Window::WindowSize& size);
622
623   /**
624    * @brief Set available orientation to window base.
625    */
626   void SetAvailableAnlges(const std::vector<int>& angles);
627
628   /**
629    * @brief Convert from window orientation to angle using OrientationMode.
630    */
631   int ConvertToAngle(WindowOrientation orientation);
632
633   /**
634    * @brief Convert from angle to window orientation using OrientationMode.
635    */
636   WindowOrientation ConvertToOrientation(int angle) const;
637
638   /**
639    * @brief Check available window orientation for Available orientation.
640    */
641   bool IsOrientationAvailable(WindowOrientation orientation) const;
642
643   /**
644    * @brief Called when window insets are changed by appearing or disappearing indicator, virtual keyboard, or clipboard.
645    *
646    * @param[in] partType the type of the part that occurs the window insets change.
647    * @param[in] partState the state of the part that occurs the window insets change.
648    * @param[in] insets the extents value of window insets.
649    */
650   void OnInsetsChanged(WindowInsetsPartType partType, WindowInsetsPartState partState, const Extents& insets);
651
652
653 private: // Dali::Internal::Adaptor::SceneHolder
654   /**
655    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
656    */
657   void OnAdaptorSet(Dali::Adaptor& adaptor) override;
658
659   /**
660    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnSurfaceSet
661    */
662   void OnSurfaceSet(Dali::RenderSurfaceInterface* surface) override;
663
664   /**
665    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnPause
666    */
667   void OnPause() override;
668
669   /**
670    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnResume
671    */
672   void OnResume() override;
673
674   /**
675    * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculatePosition
676    */
677   Vector2 RecalculatePosition(const Vector2& position) override;
678
679 private: // Dali::Internal::Adaptor::EventHandler::Observer
680   /**
681    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnTouchPoint
682    */
683   void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override;
684
685   /**
686    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
687    */
688   void OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) override;
689
690   /**
691    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnKeyEvent
692    */
693   void OnKeyEvent(Dali::Integration::KeyEvent& keyEvent) override;
694
695   /**
696    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnRotation
697    */
698   void OnRotation(const RotationEvent& rotation) override;
699
700 public: // Signals
701   /**
702    * @copydoc Dali::Window::FocusChangeSignal()
703    */
704   FocusChangeSignalType& FocusChangeSignal()
705   {
706     return mFocusChangeSignal;
707   }
708
709   /**
710    * @copydoc Dali::Window::ResizedSignal()
711    */
712   ResizeSignalType& ResizeSignal()
713   {
714     return mResizeSignal;
715   }
716
717   /**
718    * This signal is emitted when the window is requesting to be deleted
719    */
720   SignalType& DeleteRequestSignal()
721   {
722     return mDeleteRequestSignal;
723   }
724
725   /**
726    * @copydoc Dali::DevelWindow::VisibilityChangedSignal()
727    */
728   VisibilityChangedSignalType& VisibilityChangedSignal()
729   {
730     return mVisibilityChangedSignal;
731   }
732
733   /**
734    * @copydoc Dali::Window::SignalEventProcessingFinished()
735    */
736   Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal()
737   {
738     return mScene.EventProcessingFinishedSignal();
739   }
740
741   /**
742    * @copydoc Dali::DevelWindow::TransitionEffectEventSignal()
743    */
744   TransitionEffectEventSignalType& TransitionEffectEventSignal()
745   {
746     return mTransitionEffectEventSignal;
747   }
748
749   /**
750    * @copydoc Dali::DevelWindow::KeyboardRepeatSettingsChangedSignal()
751    */
752   KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal()
753   {
754     return mKeyboardRepeatSettingsChangedSignal;
755   }
756
757   /**
758    * @copydoc Dali::DevelWindow::AuxiliaryMessageSignal()
759    */
760   AuxiliaryMessageSignalType& AuxiliaryMessageSignal()
761   {
762     return mAuxiliaryMessageSignal;
763   }
764
765   /**
766    * @copydoc Dali::DevelWindow::AccessibilityHighlightSignal()
767    */
768   AccessibilityHighlightSignalType& AccessibilityHighlightSignal()
769   {
770     return mAccessibilityHighlightSignal;
771   }
772
773   /**
774    * @copydoc Dali::DevelWindow::MovedSignal()
775    */
776   MovedSignalType& MovedSignal()
777   {
778     return mMovedSignal;
779   }
780
781   /**
782    * @copydoc Dali::DevelWindow::OrientationChangedSignal()
783    */
784   OrientationChangedSignalType& OrientationChangedSignal()
785   {
786     return mOrientationChangedSignal;
787   }
788
789   /**
790    * @copydoc Dali::DevelWindow::MouseInOutEventSignal()
791    */
792   MouseInOutEventSignalType& MouseInOutEventSignal()
793   {
794     return mMouseInOutEventSignal;
795   }
796
797   /**
798    * @copydoc Dali::DevelWindow::MoveCompletedSignal()
799    */
800   MoveCompletedSignalType& MoveCompletedSignal()
801   {
802     return mMoveCompletedSignal;
803   }
804
805   /**
806    * @copydoc Dali::DevelWindow::ResizeCompletedSignal()
807    */
808   ResizeCompletedSignalType& ResizeCompletedSignal()
809   {
810     return mResizeCompletedSignal;
811   }
812
813   /**
814    * @copydoc Dali::DevelWindow::InsetsChangedSignal()
815    */
816   InsetsChangedSignalType& InsetsChangedSignal()
817   {
818     return mInsetsChangedSignal;
819   }
820
821 private:
822   WindowRenderSurface* mWindowSurface; ///< The window rendering surface
823   WindowBase*          mWindowBase;
824   std::string          mName;
825   std::string          mClassName;
826   Dali::Window         mParentWindow;
827
828   OrientationPtr   mOrientation;
829   std::vector<int> mAvailableAngles;
830   int              mPreferredAngle;
831
832   int mRotationAngle;               ///< The angle of the rotation
833   int mWindowWidth;                 ///< The width of the window
834   int mWindowHeight;                ///< The height of the window
835   int mNativeWindowId;              ///< The Native Window Id
836
837   EventHandlerPtr mEventHandler;    ///< The window events handler
838   OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
839
840   // Signals
841   SignalType                              mDeleteRequestSignal;
842   FocusChangeSignalType                   mFocusChangeSignal;
843   ResizeSignalType                        mResizeSignal;
844   VisibilityChangedSignalType             mVisibilityChangedSignal;
845   TransitionEffectEventSignalType         mTransitionEffectEventSignal;
846   KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal;
847   AuxiliaryMessageSignalType              mAuxiliaryMessageSignal;
848   AccessibilityHighlightSignalType        mAccessibilityHighlightSignal;
849   MovedSignalType                         mMovedSignal;
850   OrientationChangedSignalType            mOrientationChangedSignal;
851   MouseInOutEventSignalType               mMouseInOutEventSignal;
852   MoveCompletedSignalType                 mMoveCompletedSignal;
853   ResizeCompletedSignalType               mResizeCompletedSignal;
854   InsetsChangedSignalType                 mInsetsChangedSignal;
855
856   Dali::KeyEvent   mLastKeyEvent;
857   Dali::TouchEvent mLastTouchEvent;
858
859   bool mIsTransparent : 1;
860   bool mIsFocusAcceptable : 1;
861   bool mIconified : 1;
862   bool mOpaqueState : 1;
863   bool mWindowRotationAcknowledgement : 1;
864   bool mFocused : 1;
865   bool mIsWindowRotating : 1; ///< The window rotating flag.
866 };
867
868 } // namespace Adaptor
869 } // namespace Internal
870
871 // Helpers for public-api forwarding methods
872
873 inline Internal::Adaptor::Window& GetImplementation(Dali::Window& window)
874 {
875   DALI_ASSERT_ALWAYS(window && "Window handle is empty");
876   BaseObject& object = window.GetBaseObject();
877   return static_cast<Internal::Adaptor::Window&>(object);
878 }
879
880 inline const Internal::Adaptor::Window& GetImplementation(const Dali::Window& window)
881 {
882   DALI_ASSERT_ALWAYS(window && "Window handle is empty");
883   const BaseObject& object = window.GetBaseObject();
884   return static_cast<const Internal::Adaptor::Window&>(object);
885 }
886
887 } // namespace Dali
888
889 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H