1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
5 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
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>
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>
41 class RenderSurfaceInterface;
48 class WindowRenderSurface;
52 using WindowPtr = IntrusivePtr<Window>;
53 using OrientationPtr = IntrusivePtr<Orientation>;
54 using MouseInOutEventPtr = IntrusivePtr<Dali::DevelWindow::MouseInOutEvent>;
55 using MouseRelativeEventPtr = IntrusivePtr<Dali::DevelWindow::MouseRelativeEvent>;
56 using EventHandlerPtr = IntrusivePtr<EventHandler>;
59 * Window provides a surface to render onto with orientation & indicator properties.
61 class Window : public Dali::Internal::Adaptor::SceneHolder, public EventHandler::Observer, public ConnectionTracker
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::MouseRelativeEventSignalType MouseRelativeEventSignalType;
75 typedef Dali::DevelWindow::MoveCompletedSignalType MoveCompletedSignalType;
76 typedef Dali::DevelWindow::ResizeCompletedSignalType ResizeCompletedSignalType;
77 typedef Dali::DevelWindow::InsetsChangedSignalType InsetsChangedSignalType;
78 typedef Dali::DevelWindow::PointerConstraintsSignalType PointerConstraintsSignalType;
79 typedef Signal<void()> SignalType;
82 * @brief Create a new Window. This should only be called once by the Application class
83 * @param[in] name The window title
84 * @param[in] className The window class name
85 * @param[in] windowData The window data
86 * @return A newly allocated Window
88 static Window* New(const std::string& name, const std::string& className, const WindowData& windowData);
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] name The window title
94 * @param[in] className The window class name
95 * @param[in] windowData The window data
96 * @return A newly allocated Window
98 static Window* New(Any surface, const std::string& name, const std::string& className, const WindowData& windowData);
101 * @copydoc Dali::Window::SetClass()
103 void SetClass(std::string name, std::string className);
106 * @brief Gets the window class name.
107 * @return The class of the window
109 std::string GetClassName() const;
112 * @copydoc Dali::Window::Raise()
117 * @copydoc Dali::Window::Lower()
122 * @copydoc Dali::Window::Activate()
127 * @copydoc Dali::DevelWindow::Maximize()
129 void Maximize(bool maximize);
132 * @copydoc Dali::DevelWindow::IsMaximized()
134 bool IsMaximized() const;
137 * @copydoc Dali::DevelWindow::SetMaximumSize()
139 void SetMaximumSize(Dali::Window::WindowSize size);
142 * @copydoc Dali::DevelWindow::Minimize()
144 void Minimize(bool minimize);
147 * @copydoc Dali::DevelWindow::IsMinimized()
149 bool IsMinimized() const;
152 * @copydoc Dali::DevelWindow::SetMimimumSize()
154 void SetMimimumSize(Dali::Window::WindowSize size);
157 * @copydoc Dali::Window::GetLayerCount()
159 uint32_t GetLayerCount() const;
162 * @copydoc Dali::Window::GetLayer()
164 Dali::Layer GetLayer(uint32_t depth) const;
167 * @copydoc Dali::Window::KeepRendering()
169 void KeepRendering(float durationSeconds);
172 * @copydoc Dali::Window::SetPartialUpdateEnabled()
174 void SetPartialUpdateEnabled(bool enabled);
177 * @copydoc Dali::Window::IsPartialUpdateEnabled()
179 bool IsPartialUpdateEnabled() const;
182 * @brief Get window resource ID assigned by window manager
183 * @return The resource ID of the window
185 std::string GetNativeResourceId() const;
188 * @copydoc Dali::Window::AddAvailableOrientation()
190 void AddAvailableOrientation(WindowOrientation orientation);
193 * @copydoc Dali::Window::RemoveAvailableOrientation()
195 void RemoveAvailableOrientation(WindowOrientation orientation);
198 * @copydoc Dali::Window::SetPreferredOrientation()
200 void SetPreferredOrientation(WindowOrientation orientation);
203 * @copydoc Dali::Window::GetPreferredOrientation()
205 WindowOrientation GetPreferredOrientation();
208 * @copydoc Dali::Window::SetAcceptFocus()
210 void SetAcceptFocus(bool accept);
213 * @copydoc Dali::Window::IsFocusAcceptable()
215 bool IsFocusAcceptable() const;
218 * @copydoc Dali::Window::Show()
223 * @copydoc Dali::Window::Hide()
228 * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
230 unsigned int GetSupportedAuxiliaryHintCount() const;
233 * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
235 std::string GetSupportedAuxiliaryHint(unsigned int index) const;
238 * @copydoc Dali::Window::AddAuxiliaryHint()
240 unsigned int AddAuxiliaryHint(const std::string& hint, const std::string& value);
243 * @copydoc Dali::Window::RemoveAuxiliaryHint()
245 bool RemoveAuxiliaryHint(unsigned int id);
248 * @copydoc Dali::Window::SetAuxiliaryHintValue()
250 bool SetAuxiliaryHintValue(unsigned int id, const std::string& value);
253 * @copydoc Dali::Window::GetAuxiliaryHintValue()
255 std::string GetAuxiliaryHintValue(unsigned int id) const;
258 * @copydoc Dali::Window::GetAuxiliaryHintId()
260 unsigned int GetAuxiliaryHintId(const std::string& hint) const;
263 * @copydoc Dali::Window::SetInputRegion()
265 void SetInputRegion(const Rect<int>& inputRegion);
268 * @copydoc Dali::Window::SetType()
270 void SetType(WindowType type);
273 * @copydoc Dali::Window::GetType() const
275 WindowType GetType() const;
278 * @copydoc Dali::Window::SetNotificationLevel()
280 WindowOperationResult SetNotificationLevel(WindowNotificationLevel level);
283 * @copydoc Dali::Window::GetNotificationLevel()
285 WindowNotificationLevel GetNotificationLevel() const;
288 * @copydoc Dali::Window::SetOpaqueState()
290 void SetOpaqueState(bool opaque);
293 * @copydoc Dali::Window::IsOpaqueState()
295 bool IsOpaqueState() const;
298 * @copydoc Dali::Window::SetScreenOffMode()
300 WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode);
303 * @copydoc Dali::Window::GetScreenOffMode()
305 WindowScreenOffMode GetScreenOffMode() const;
308 * @copydoc Dali::Window::SetBrightness()
310 WindowOperationResult SetBrightness(int brightness);
313 * @copydoc Dali::Window::GetBrightness()
315 int GetBrightness() const;
318 * @copydoc Dali::Window::SetSize()
320 void SetSize(Dali::Window::WindowSize size);
323 * @copydoc Dali::Window::GetSize()
325 Dali::Window::WindowSize GetSize() const;
328 * @copydoc Dali::Window::SetPosition()
330 void SetPosition(Dali::Window::WindowPosition position);
333 * @copydoc Dali::Window::GetPosition()
335 Dali::Window::WindowPosition GetPosition() const;
338 * @copydoc Dali::DevelWindow::SetPositionSize()
340 void SetPositionSize(PositionSize positionSize);
343 * @copydoc Dali::DevelWindow::GetPositionSize()
345 PositionSize GetPositionSize() const;
348 * @copydoc Dali::Window::SetLayout()
350 void SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan);
353 * @copydoc Dali::Window::GetRootLayer()
355 Dali::Layer GetRootLayer() const;
358 * @copydoc Dali::Window::SetTransparency()
360 void SetTransparency(bool transparent);
363 * @copydoc Dali::KeyGrab::GrabKey()
365 bool GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode);
368 * @copydoc Dali::KeyGrab::UngrabKey()
370 bool UngrabKey(Dali::KEY key);
373 * @copydoc Dali::KeyGrab::GrabKeyList()
375 bool GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result);
378 * @copydoc Dali::KeyGrab::UngrabKeyList()
380 bool UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result);
383 * @copydoc Dali::DevelWindow::Get()
385 static Dali::Window Get(Dali::Actor actor);
388 * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent)
390 void SetParent(Dali::Window& parent);
393 * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent, bool belowParent)
395 void SetParent(Dali::Window& parent, bool belowParent);
398 * @copydoc Dali::DevelWindow::Unparent()
403 * @copydoc Dali::DevelWindow::GetParent()
405 Dali::Window GetParent();
408 * @copydoc Dali::DevelWindow::GetCurrentOrientation()
410 WindowOrientation GetCurrentOrientation() const;
413 * @copydoc Dali::DevelWindow::GetPhysicalOrientation()
415 int GetPhysicalOrientation() const;
418 * @copydoc Dali::DevelWindow::SetAvailableOrientations()
420 void SetAvailableOrientations(const Dali::Vector<WindowOrientation>& orientations);
423 * @copydoc Dali::DevelWindow::SetPositionSizeWithOrientation()
425 void SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation);
428 * @brief Emit the accessibility highlight signal.
429 * The highlight indicates that it is an object to interact with the user regardless of focus.
430 * After setting the highlight on the object, you can do things that the object can do, such as
431 * giving or losing focus.
433 * @param[in] highlight If window needs to grab or clear highlight.
435 void EmitAccessibilityHighlightSignal(bool highlight);
438 * @brief Sets the render notification trigger to call when render thread is completed a frame
440 * @param[in] renderNotification to use
442 void SetRenderNotification(TriggerEventInterface* renderNotification);
444 public: // Dali::Internal::Adaptor::SceneHolder
446 * @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
448 Dali::Any GetNativeHandle() const override;
451 * @copydoc Dali::Internal::Adaptor::SceneHolder::IsVisible
453 bool IsVisible() const override;
456 * @copydoc Dali::DevelWindow::GetNativeId()
458 int32_t GetNativeId() const;
461 * @copydoc Dali::DevelWindow::RequestMoveToServer()
463 void RequestMoveToServer();
466 * @copydoc Dali::DevelWindow::RequestResizeToServer()
468 void RequestResizeToServer(WindowResizeDirection direction);
471 * @copydoc Dali::DevelWindow::EnableFloatingMode()
473 void EnableFloatingMode(bool enable);
476 * @copydoc Dali::DevelWindow::IsFloatingModeEnabled()
478 bool IsFloatingModeEnabled();
481 * @copydoc Dali::DevelWindow::IncludeInputRegion()
483 void IncludeInputRegion(const Rect<int>& inputRegion);
486 * @copydoc Dali::DevelWindow::ExcludeInputRegion()
488 void ExcludeInputRegion(const Rect<int>& inputRegion);
491 * @copydoc Dali::DevelWindow::SetNeedsRotationCompletedAcknowledgement()
493 void SetNeedsRotationCompletedAcknowledgement(bool needAcknowledgement);
496 * @copydoc Dali::DevelWindow::SendRotationCompletedAcknowledgement()
498 void SendRotationCompletedAcknowledgement();
501 * @copydoc Dali::DevelWindow::IsWindowRotating()
503 bool IsWindowRotating() const;
506 * @copydoc Dali::DevelWindow::GetLastKeyEvent()
508 const Dali::KeyEvent& GetLastKeyEvent() const;
511 * @copydoc Dali::DevelWindow::GetLastTouchEvent()
513 const Dali::TouchEvent& GetLastTouchEvent() const;
516 * @copydoc Dali::DevelWindow::PointerConstraintsLock()
518 bool PointerConstraintsLock();
521 * @copydoc Dali::DevelWindow::PointerConstraintsUnlock()
523 bool PointerConstraintsUnlock();
526 * @copydoc Dali::DevelWindow::LockedPointerRegionSet()
528 void LockedPointerRegionSet(int32_t x, int32_t y, int32_t width, int32_t height);
531 * @copydoc Dali::DevelWindow::LockedPointerCursorPositionHintSet()
533 void LockedPointerCursorPositionHintSet(int32_t x, int32_t y);
536 * @copydoc Dali::DevelWindow::PointerWarp()
538 bool PointerWarp(int32_t x, int32_t y);
541 * @copydoc Dali::DevelWindow::CursorVisibleSet()
543 void CursorVisibleSet(bool visible);
546 * @copydoc Dali::DevelWindow::KeyboardGrab()
548 bool KeyboardGrab(Device::Subclass::Type deviceSubclass);
551 * @copydoc Dali::DevelWindow::KeyboardUnGrab()
553 bool KeyboardUnGrab();
557 * @brief Enumeration for orietation mode.
558 * The Orientation Mode is related to screen size.
559 * If screen width is longer than height, the Orientation Mode will have LANDSCAPE.
560 * Otherwise screen width is shorter than height or same, the Orientation Mode will have PORTRAIT.
562 enum class OrientationMode
569 * Private constructor.
580 * Second stage initialization
582 void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, WindowType type);
585 * Called when the window becomes iconified or deiconified.
587 void OnIconifyChanged(bool iconified);
590 * Called when the window becomes maximized or unmaximized.
592 void OnMaximizeChanged(bool maximized);
595 * Called when the window focus is changed.
597 void OnFocusChanged(bool focusIn);
600 * Called when the output is transformed.
602 void OnOutputTransformed();
605 * Called when the window receives a delete request.
607 void OnDeleteRequest();
610 * Called when the window receives a Transition effect-start/end event.
612 void OnTransitionEffectEvent(WindowEffectState state, WindowEffectType type);
615 * @brief Called when window receives a keyboard repeat event.
617 void OnKeyboardRepeatSettingsChanged();
620 * @brief Called when the window redraw is requested.
622 void OnWindowRedrawRequest();
625 * @brief Called when the window's geometry data is changed by display server or client.
626 * It is based on configure noification event.
628 * @param[in] positionSize the updated window's position and size.
630 void OnUpdatePositionSize(Dali::PositionSize& positionSize);
633 * @brief Called when display server sent the auxiliary message.
635 * @param[in] key the auxiliary message's key.
636 * @param[in] value the auxiliary message's value.
637 * @param[in] options the auxiliary message's options. This is the list of string.
639 void OnAuxiliaryMessage(const std::string& key, const std::string& value, const Property::Array& options);
642 * @brief Called when Accessibility is enabled.
644 * This method is to register the window to accessibility bridge.
646 void OnAccessibilityEnabled();
649 * @brief Called when Accessibility is disabled.
651 * This method is to remove the window from accessibility bridge.
653 void OnAccessibilityDisabled();
656 * Called when the window rotation is finished.
658 * This signal is emmit when window rotation is finisehd and WindowRotationCompleted() is called.
660 void OnRotationFinished();
663 * @brief Called when the mouse in or out event is received.
664 * @param[in] mouseInOutEvent the mouse event
666 void OnMouseInOutEvent(const Dali::DevelWindow::MouseInOutEvent& mouseInOutEvent);
669 * @brief Called when the mouse relative event is received.
670 * @param[in] mouseRelativeEvent the mouse event
672 void OnMouseRelativeEvent(const Dali::DevelWindow::MouseRelativeEvent& mouseRelativeEvent);
675 * @brief Called when the pointer is locked/unlocked
677 * @param[in] position The x, y coordinate relative to window where event happened
678 * @param[in] locked The status whether pointer is locked/unlocked
679 * @param[in] confined The status whether pointer is confined/unconfined
681 void OnPointerConstraints(const Dali::Int32Pair& position, bool locked, bool confined);
684 * @brief Called when the window is moved by display server.
686 * @param[in] position the moved window's position.
688 void OnMoveCompleted(Dali::Window::WindowPosition& position);
691 * @brief Called when the window is resized by display server.
693 * @param[in] positionSize the resized window's size.
695 void OnResizeCompleted(Dali::Window::WindowSize& size);
698 * @brief Set available orientation to window base.
700 void SetAvailableAnlges(const std::vector<int>& angles);
703 * @brief Convert from window orientation to angle using OrientationMode.
705 int ConvertToAngle(WindowOrientation orientation);
708 * @brief Convert from angle to window orientation using OrientationMode.
710 WindowOrientation ConvertToOrientation(int angle) const;
713 * @brief Check available window orientation for Available orientation.
715 bool IsOrientationAvailable(WindowOrientation orientation) const;
718 * @brief Sets user geometry flag when window's geometry is changed.
719 * Window is created with screen size or not.
720 * If window is created with screen size or the geometry is changed by user,
721 * client should inform to server setting user.geometry flag
723 void SetUserGeometryPolicy();
726 * @brief Called when window insets are changed by appearing or disappearing indicator, virtual keyboard, or clipboard.
728 * @param[in] partType the type of the part that occurs the window insets change.
729 * @param[in] partState the state of the part that occurs the window insets change.
730 * @param[in] insets the extents value of window insets.
732 void OnInsetsChanged(WindowInsetsPartType partType, WindowInsetsPartState partState, const Extents& insets);
734 private: // Dali::Internal::Adaptor::SceneHolder
736 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
738 void OnAdaptorSet(Dali::Adaptor& adaptor) override;
741 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnSurfaceSet
743 void OnSurfaceSet(Dali::RenderSurfaceInterface* surface) override;
746 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnPause
748 void OnPause() override;
751 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnResume
753 void OnResume() override;
756 * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculatePosition
758 Vector2 RecalculatePosition(const Vector2& position) override;
760 private: // Dali::Internal::Adaptor::EventHandler::Observer
762 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnTouchPoint
764 void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override;
767 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
769 void OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) override;
772 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnKeyEvent
774 void OnKeyEvent(Dali::Integration::KeyEvent& keyEvent) override;
777 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnRotation
779 void OnRotation(const RotationEvent& rotation) override;
783 * @copydoc Dali::Window::FocusChangeSignal()
785 FocusChangeSignalType& FocusChangeSignal()
787 return mFocusChangeSignal;
791 * @copydoc Dali::Window::ResizedSignal()
793 ResizeSignalType& ResizeSignal()
795 return mResizeSignal;
799 * This signal is emitted when the window is requesting to be deleted
801 SignalType& DeleteRequestSignal()
803 return mDeleteRequestSignal;
807 * @copydoc Dali::DevelWindow::VisibilityChangedSignal()
809 VisibilityChangedSignalType& VisibilityChangedSignal()
811 return mVisibilityChangedSignal;
815 * @copydoc Dali::Window::SignalEventProcessingFinished()
817 Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal()
819 return mScene.EventProcessingFinishedSignal();
823 * @copydoc Dali::DevelWindow::TransitionEffectEventSignal()
825 TransitionEffectEventSignalType& TransitionEffectEventSignal()
827 return mTransitionEffectEventSignal;
831 * @copydoc Dali::DevelWindow::KeyboardRepeatSettingsChangedSignal()
833 KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal()
835 return mKeyboardRepeatSettingsChangedSignal;
839 * @copydoc Dali::DevelWindow::AuxiliaryMessageSignal()
841 AuxiliaryMessageSignalType& AuxiliaryMessageSignal()
843 return mAuxiliaryMessageSignal;
847 * @copydoc Dali::DevelWindow::AccessibilityHighlightSignal()
849 AccessibilityHighlightSignalType& AccessibilityHighlightSignal()
851 return mAccessibilityHighlightSignal;
855 * @copydoc Dali::DevelWindow::MovedSignal()
857 MovedSignalType& MovedSignal()
863 * @copydoc Dali::DevelWindow::OrientationChangedSignal()
865 OrientationChangedSignalType& OrientationChangedSignal()
867 return mOrientationChangedSignal;
871 * @copydoc Dali::DevelWindow::MouseInOutEventSignal()
873 MouseInOutEventSignalType& MouseInOutEventSignal()
875 return mMouseInOutEventSignal;
879 * @copydoc Dali::DevelWindow::MouseRelativeEventSignal()
881 MouseRelativeEventSignalType& MouseRelativeEventSignal()
883 return mMouseRelativeEventSignal;
887 * @copydoc Dali::DevelWindow::PointerConstraintsSignal()
889 PointerConstraintsSignalType& PointerConstraintsSignal()
891 return mPointerConstraintsSignal;
895 * @copydoc Dali::DevelWindow::MoveCompletedSignal()
897 MoveCompletedSignalType& MoveCompletedSignal()
899 return mMoveCompletedSignal;
903 * @copydoc Dali::DevelWindow::ResizeCompletedSignal()
905 ResizeCompletedSignalType& ResizeCompletedSignal()
907 return mResizeCompletedSignal;
911 * @copydoc Dali::DevelWindow::InsetsChangedSignal()
913 InsetsChangedSignalType& InsetsChangedSignal()
915 return mInsetsChangedSignal;
919 WindowRenderSurface* mWindowSurface; ///< The window rendering surface
920 WindowBase* mWindowBase;
922 std::string mClassName;
923 Dali::Window mParentWindow;
925 OrientationPtr mOrientation;
926 std::vector<int> mAvailableAngles;
929 int mRotationAngle; ///< The angle of the rotation
930 int mWindowWidth; ///< The width of the window
931 int mWindowHeight; ///< The height of the window
932 int mNativeWindowId; ///< The Native Window Id
934 EventHandlerPtr mEventHandler; ///< The window events handler
935 OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
938 SignalType mDeleteRequestSignal;
939 FocusChangeSignalType mFocusChangeSignal;
940 ResizeSignalType mResizeSignal;
941 VisibilityChangedSignalType mVisibilityChangedSignal;
942 TransitionEffectEventSignalType mTransitionEffectEventSignal;
943 KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal;
944 AuxiliaryMessageSignalType mAuxiliaryMessageSignal;
945 AccessibilityHighlightSignalType mAccessibilityHighlightSignal;
946 MovedSignalType mMovedSignal;
947 OrientationChangedSignalType mOrientationChangedSignal;
948 MouseInOutEventSignalType mMouseInOutEventSignal;
949 MouseRelativeEventSignalType mMouseRelativeEventSignal;
950 MoveCompletedSignalType mMoveCompletedSignal;
951 ResizeCompletedSignalType mResizeCompletedSignal;
952 InsetsChangedSignalType mInsetsChangedSignal;
953 PointerConstraintsSignalType mPointerConstraintsSignal;
955 Dali::KeyEvent mLastKeyEvent;
956 Dali::TouchEvent mLastTouchEvent;
958 bool mIsTransparent : 1;
959 bool mIsFocusAcceptable : 1;
962 bool mOpaqueState : 1;
963 bool mWindowRotationAcknowledgement : 1;
965 bool mIsWindowRotating : 1; ///< The window rotating flag.
966 bool mIsEnabledUserGeometry : 1; ///< The user geometry enable flag.
969 } // namespace Adaptor
970 } // namespace Internal
972 // Helpers for public-api forwarding methods
974 inline Internal::Adaptor::Window& GetImplementation(Dali::Window& window)
976 DALI_ASSERT_ALWAYS(window && "Window handle is empty");
977 BaseObject& object = window.GetBaseObject();
978 return static_cast<Internal::Adaptor::Window&>(object);
981 inline const Internal::Adaptor::Window& GetImplementation(const Dali::Window& window)
983 DALI_ASSERT_ALWAYS(window && "Window handle is empty");
984 const BaseObject& object = window.GetBaseObject();
985 return static_cast<const Internal::Adaptor::Window&>(object);
990 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H