[Tizen] Add window move/resize completed signal
[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 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    * @copydoc Dali::DevelWindow::GetRenderTaskList()
169    */
170   Dali::RenderTaskList GetRenderTaskList() const;
171
172   /**
173    * @brief Get window resource ID assigned by window manager
174    * @return The resource ID of the window
175    */
176   std::string GetNativeResourceId() const;
177
178   /**
179    * @copydoc Dali::Window::AddAvailableOrientation()
180    */
181   void AddAvailableOrientation(WindowOrientation orientation);
182
183   /**
184    * @copydoc Dali::Window::RemoveAvailableOrientation()
185    */
186   void RemoveAvailableOrientation(WindowOrientation orientation);
187
188   /**
189    * @copydoc Dali::Window::SetPreferredOrientation()
190    */
191   void SetPreferredOrientation(WindowOrientation orientation);
192
193   /**
194    * @copydoc Dali::Window::GetPreferredOrientation()
195    */
196   WindowOrientation GetPreferredOrientation();
197
198   /**
199    * @copydoc Dali::Window::SetAcceptFocus()
200    */
201   void SetAcceptFocus(bool accept);
202
203   /**
204    * @copydoc Dali::Window::IsFocusAcceptable()
205    */
206   bool IsFocusAcceptable() const;
207
208   /**
209    * @copydoc Dali::Window::Show()
210    */
211   void Show();
212
213   /**
214    * @copydoc Dali::Window::Hide()
215    */
216   void Hide();
217
218   /**
219    * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
220    */
221   unsigned int GetSupportedAuxiliaryHintCount() const;
222
223   /**
224    * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
225    */
226   std::string GetSupportedAuxiliaryHint(unsigned int index) const;
227
228   /**
229    * @copydoc Dali::Window::AddAuxiliaryHint()
230    */
231   unsigned int AddAuxiliaryHint(const std::string& hint, const std::string& value);
232
233   /**
234    * @copydoc Dali::Window::RemoveAuxiliaryHint()
235    */
236   bool RemoveAuxiliaryHint(unsigned int id);
237
238   /**
239    * @copydoc Dali::Window::SetAuxiliaryHintValue()
240    */
241   bool SetAuxiliaryHintValue(unsigned int id, const std::string& value);
242
243   /**
244    * @copydoc Dali::Window::GetAuxiliaryHintValue()
245    */
246   std::string GetAuxiliaryHintValue(unsigned int id) const;
247
248   /**
249    * @copydoc Dali::Window::GetAuxiliaryHintId()
250    */
251   unsigned int GetAuxiliaryHintId(const std::string& hint) const;
252
253   /**
254    * @copydoc Dali::Window::SetInputRegion()
255    */
256   void SetInputRegion(const Rect<int>& inputRegion);
257
258   /**
259    * @copydoc Dali::Window::SetType()
260    */
261   void SetType(WindowType type);
262
263   /**
264    * @copydoc Dali::Window::GetType() const
265    */
266   WindowType GetType() const;
267
268   /**
269    * @copydoc Dali::Window::SetNotificationLevel()
270    */
271   WindowOperationResult SetNotificationLevel(WindowNotificationLevel level);
272
273   /**
274    * @copydoc Dali::Window::GetNotificationLevel()
275    */
276   WindowNotificationLevel GetNotificationLevel() const;
277
278   /**
279    * @copydoc Dali::Window::SetOpaqueState()
280    */
281   void SetOpaqueState(bool opaque);
282
283   /**
284    * @copydoc Dali::Window::IsOpaqueState()
285    */
286   bool IsOpaqueState() const;
287
288   /**
289    * @copydoc Dali::Window::SetScreenOffMode()
290    */
291   WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode);
292
293   /**
294    * @copydoc Dali::Window::GetScreenOffMode()
295    */
296   WindowScreenOffMode GetScreenOffMode() const;
297
298   /**
299    * @copydoc Dali::Window::SetBrightness()
300    */
301   WindowOperationResult SetBrightness(int brightness);
302
303   /**
304    * @copydoc Dali::Window::GetBrightness()
305    */
306   int GetBrightness() const;
307
308   /**
309    * @copydoc Dali::Window::SetSize()
310    */
311   void SetSize(Dali::Window::WindowSize size);
312
313   /**
314    * @copydoc Dali::Window::GetSize()
315    */
316   Dali::Window::WindowSize GetSize() const;
317
318   /**
319    * @copydoc Dali::Window::SetPosition()
320    */
321   void SetPosition(Dali::Window::WindowPosition position);
322
323   /**
324    * @copydoc Dali::Window::GetPosition()
325    */
326   Dali::Window::WindowPosition GetPosition() const;
327
328   /**
329    * @copydoc Dali::DevelWindow::SetPositionSize()
330    */
331   void SetPositionSize(PositionSize positionSize);
332
333   /**
334    * @copydoc Dali::DevelWindow::GetPositionSize()
335    */
336   PositionSize GetPositionSize() const;
337
338   /**
339    * @copydoc Dali::Window::SetLayout()
340    */
341   void SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan);
342
343   /**
344    * @copydoc Dali::Window::GetRootLayer()
345    */
346   Dali::Layer GetRootLayer() const;
347
348   /**
349    * @copydoc Dali::Window::SetTransparency()
350    */
351   void SetTransparency(bool transparent);
352
353   /**
354    * @copydoc Dali::KeyGrab::GrabKey()
355    */
356   bool GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode);
357
358   /**
359    * @copydoc Dali::KeyGrab::UngrabKey()
360    */
361   bool UngrabKey(Dali::KEY key);
362
363   /**
364    * @copydoc Dali::KeyGrab::GrabKeyList()
365    */
366   bool GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result);
367
368   /**
369    * @copydoc Dali::KeyGrab::UngrabKeyList()
370    */
371   bool UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result);
372
373   /**
374    * @copydoc Dali::DevelWindow::Get()
375    */
376   static Dali::Window Get(Dali::Actor actor);
377
378   /**
379    * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent)
380    */
381   void SetParent(Dali::Window& parent);
382
383   /**
384    * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent, bool belowParent)
385    */
386   void SetParent(Dali::Window& parent, bool belowParent);
387
388   /**
389    * @copydoc Dali::DevelWindow::Unparent()
390    */
391   void Unparent();
392
393   /**
394    * @copydoc Dali::DevelWindow::GetParent()
395    */
396   Dali::Window GetParent();
397
398   /**
399    * @copydoc Dali::DevelWindow::GetCurrentOrientation()
400    */
401   WindowOrientation GetCurrentOrientation() const;
402
403   /**
404    * @copydoc Dali::DevelWindow::GetPhysicalOrientation()
405    */
406   int GetPhysicalOrientation() const;
407
408   /**
409    * @copydoc Dali::DevelWindow::SetAvailableOrientations()
410    */
411   void SetAvailableOrientations(const Dali::Vector<WindowOrientation>& orientations);
412
413   /**
414    * @copydoc Dali::DevelWindow::SetPositionSizeWithOrientation()
415    */
416   void SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation);
417
418   /**
419    * @brief Emit the accessibility highlight signal.
420    * The highlight indicates that it is an object to interact with the user regardless of focus.
421    * After setting the highlight on the object, you can do things that the object can do, such as
422    * giving or losing focus.
423    *
424    * @param[in] highlight If window needs to grab or clear highlight.
425    */
426   void EmitAccessibilityHighlightSignal(bool highlight);
427
428   /**
429    * @brief Sets the render notification trigger to call when render thread is completed a frame
430    *
431    * @param[in] renderNotification to use
432    */
433   void SetRenderNotification(TriggerEventInterface* renderNotification);
434
435 public: // Dali::Internal::Adaptor::SceneHolder
436   /**
437    * @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
438    */
439   Dali::Any GetNativeHandle() const override;
440
441   /**
442    * @copydoc Dali::Internal::Adaptor::SceneHolder::IsVisible
443    */
444   bool IsVisible() const override;
445
446   /**
447    * @copydoc Dali::DevelWindow::GetNativeId()
448    */
449   int32_t GetNativeId() const;
450
451   /**
452    * @copydoc Dali::DevelWindow::RequestMoveToServer()
453    */
454   void RequestMoveToServer();
455
456   /**
457    * @copydoc Dali::DevelWindow::RequestResizeToServer()
458    */
459   void RequestResizeToServer(WindowResizeDirection direction);
460
461   /**
462    * @copydoc Dali::DevelWindow::EnableFloatingMode()
463    */
464   void EnableFloatingMode(bool enable);
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 private: // Dali::Internal::Adaptor::SceneHolder
644   /**
645    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
646    */
647   void OnAdaptorSet(Dali::Adaptor& adaptor) override;
648
649   /**
650    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnSurfaceSet
651    */
652   void OnSurfaceSet(Dali::RenderSurfaceInterface* surface) override;
653
654   /**
655    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnPause
656    */
657   void OnPause() override;
658
659   /**
660    * @copydoc Dali::Internal::Adaptor::SceneHolder::OnResume
661    */
662   void OnResume() override;
663
664   /**
665    * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculatePosition
666    */
667   Vector2 RecalculatePosition(const Vector2& position) override;
668
669 private: // Dali::Internal::Adaptor::EventHandler::Observer
670   /**
671    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnTouchPoint
672    */
673   void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override;
674
675   /**
676    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
677    */
678   void OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) override;
679
680   /**
681    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnKeyEvent
682    */
683   void OnKeyEvent(Dali::Integration::KeyEvent& keyEvent) override;
684
685   /**
686    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnRotation
687    */
688   void OnRotation(const RotationEvent& rotation) override;
689
690 public: // Signals
691   /**
692    * @copydoc Dali::Window::FocusChangeSignal()
693    */
694   FocusChangeSignalType& FocusChangeSignal()
695   {
696     return mFocusChangeSignal;
697   }
698
699   /**
700    * @copydoc Dali::Window::ResizedSignal()
701    */
702   ResizeSignalType& ResizeSignal()
703   {
704     return mResizeSignal;
705   }
706
707   /**
708    * This signal is emitted when the window is requesting to be deleted
709    */
710   SignalType& DeleteRequestSignal()
711   {
712     return mDeleteRequestSignal;
713   }
714
715   /**
716    * @copydoc Dali::DevelWindow::VisibilityChangedSignal()
717    */
718   VisibilityChangedSignalType& VisibilityChangedSignal()
719   {
720     return mVisibilityChangedSignal;
721   }
722
723   /**
724    * @copydoc Dali::Window::SignalEventProcessingFinished()
725    */
726   Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal()
727   {
728     return mScene.EventProcessingFinishedSignal();
729   }
730
731   /**
732    * @copydoc Dali::DevelWindow::TransitionEffectEventSignal()
733    */
734   TransitionEffectEventSignalType& TransitionEffectEventSignal()
735   {
736     return mTransitionEffectEventSignal;
737   }
738
739   /**
740    * @copydoc Dali::DevelWindow::KeyboardRepeatSettingsChangedSignal()
741    */
742   KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal()
743   {
744     return mKeyboardRepeatSettingsChangedSignal;
745   }
746
747   /**
748    * @copydoc Dali::DevelWindow::AuxiliaryMessageSignal()
749    */
750   AuxiliaryMessageSignalType& AuxiliaryMessageSignal()
751   {
752     return mAuxiliaryMessageSignal;
753   }
754
755   /**
756    * @copydoc Dali::DevelWindow::AccessibilityHighlightSignal()
757    */
758   AccessibilityHighlightSignalType& AccessibilityHighlightSignal()
759   {
760     return mAccessibilityHighlightSignal;
761   }
762
763   /**
764    * @copydoc Dali::DevelWindow::MovedSignal()
765    */
766   MovedSignalType& MovedSignal()
767   {
768     return mMovedSignal;
769   }
770
771   /**
772    * @copydoc Dali::DevelWindow::OrientationChangedSignal()
773    */
774   OrientationChangedSignalType& OrientationChangedSignal()
775   {
776     return mOrientationChangedSignal;
777   }
778
779   /**
780    * @copydoc Dali::DevelWindow::MouseInOutEventSignal()
781    */
782   MouseInOutEventSignalType& MouseInOutEventSignal()
783   {
784     return mMouseInOutEventSignal;
785   }
786
787   /**
788    * @copydoc Dali::DevelWindow::MoveCompletedSignal()
789    */
790   MoveCompletedSignalType& MoveCompletedSignal()
791   {
792     return mMoveCompletedSignal;
793   }
794
795   /**
796    * @copydoc Dali::DevelWindow::ResizeCompletedSignal()
797    */
798   ResizeCompletedSignalType& ResizeCompletedSignal()
799   {
800     return mResizeCompletedSignal;
801   }
802
803 private:
804   WindowRenderSurface* mWindowSurface; ///< The window rendering surface
805   WindowBase*          mWindowBase;
806   std::string          mName;
807   std::string          mClassName;
808   Dali::Window         mParentWindow;
809
810   OrientationPtr   mOrientation;
811   std::vector<int> mAvailableAngles;
812   int              mPreferredAngle;
813
814   int mRotationAngle;               ///< The angle of the rotation
815   int mWindowWidth;                 ///< The width of the window
816   int mWindowHeight;                ///< The height of the window
817   int mNativeWindowId;              ///< The Native Window Id
818
819   EventHandlerPtr mEventHandler;    ///< The window events handler
820   OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
821
822   // Signals
823   SignalType                              mDeleteRequestSignal;
824   FocusChangeSignalType                   mFocusChangeSignal;
825   ResizeSignalType                        mResizeSignal;
826   VisibilityChangedSignalType             mVisibilityChangedSignal;
827   TransitionEffectEventSignalType         mTransitionEffectEventSignal;
828   KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal;
829   AuxiliaryMessageSignalType              mAuxiliaryMessageSignal;
830   AccessibilityHighlightSignalType        mAccessibilityHighlightSignal;
831   MovedSignalType                         mMovedSignal;
832   OrientationChangedSignalType            mOrientationChangedSignal;
833   MouseInOutEventSignalType               mMouseInOutEventSignal;
834   MoveCompletedSignalType                 mMoveCompletedSignal;
835   ResizeCompletedSignalType               mResizeCompletedSignal;
836
837   Dali::KeyEvent   mLastKeyEvent;
838   Dali::TouchEvent mLastTouchEvent;
839
840   bool mIsTransparent : 1;
841   bool mIsFocusAcceptable : 1;
842   bool mIconified : 1;
843   bool mOpaqueState : 1;
844   bool mWindowRotationAcknowledgement : 1;
845   bool mFocused : 1;
846   bool mIsWindowRotating : 1; ///< The window rotating flag.
847 };
848
849 } // namespace Adaptor
850 } // namespace Internal
851
852 // Helpers for public-api forwarding methods
853
854 inline Internal::Adaptor::Window& GetImplementation(Dali::Window& window)
855 {
856   DALI_ASSERT_ALWAYS(window && "Window handle is empty");
857   BaseObject& object = window.GetBaseObject();
858   return static_cast<Internal::Adaptor::Window&>(object);
859 }
860
861 inline const Internal::Adaptor::Window& GetImplementation(const Dali::Window& window)
862 {
863   DALI_ASSERT_ALWAYS(window && "Window handle is empty");
864   const BaseObject& object = window.GetBaseObject();
865   return static_cast<const Internal::Adaptor::Window&>(object);
866 }
867
868 } // namespace Dali
869
870 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H