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