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::PointerConstraintsLock()
513 bool PointerConstraintsLock();
516 * @copydoc Dali::DevelWindow::PointerConstraintsUnlock()
518 bool PointerConstraintsUnlock();
521 * @copydoc Dali::DevelWindow::LockedPointerRegionSet()
523 void LockedPointerRegionSet(int32_t x, int32_t y, int32_t width, int32_t height);
526 * @copydoc Dali::DevelWindow::LockedPointerCursorPositionHintSet()
528 void LockedPointerCursorPositionHintSet(int32_t x, int32_t y);
531 * @copydoc Dali::DevelWindow::PointerWarp()
533 bool PointerWarp(int32_t x, int32_t y);
536 * @copydoc Dali::DevelWindow::CursorVisibleSet()
538 void CursorVisibleSet(bool visible);
541 * @copydoc Dali::DevelWindow::KeyboardGrab()
543 bool KeyboardGrab(Device::Subclass::Type deviceSubclass);
546 * @copydoc Dali::DevelWindow::KeyboardUnGrab()
548 bool KeyboardUnGrab();
552 * @brief Enumeration for orietation mode.
553 * The Orientation Mode is related to screen size.
554 * If screen width is longer than height, the Orientation Mode will have LANDSCAPE.
555 * Otherwise screen width is shorter than height or same, the Orientation Mode will have PORTRAIT.
557 enum class OrientationMode
564 * Private constructor.
575 * Second stage initialization
577 void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, WindowType type);
580 * Called when the window becomes iconified or deiconified.
582 void OnIconifyChanged(bool iconified);
585 * Called when the window becomes maximized or unmaximized.
587 void OnMaximizeChanged(bool maximized);
590 * Called when the window focus is changed.
592 void OnFocusChanged(bool focusIn);
595 * Called when the output is transformed.
597 void OnOutputTransformed();
600 * Called when the window receives a delete request.
602 void OnDeleteRequest();
605 * Called when the window receives a Transition effect-start/end event.
607 void OnTransitionEffectEvent(WindowEffectState state, WindowEffectType type);
610 * @brief Called when window receives a keyboard repeat event.
612 void OnKeyboardRepeatSettingsChanged();
615 * @brief Called when the window redraw is requested.
617 void OnWindowRedrawRequest();
620 * @brief Called when the window's geometry data is changed by display server or client.
621 * It is based on configure noification event.
623 * @param[in] positionSize the updated window's position and size.
625 void OnUpdatePositionSize(Dali::PositionSize& positionSize);
628 * @brief Called when display server sent the auxiliary message.
630 * @param[in] key the auxiliary message's key.
631 * @param[in] value the auxiliary message's value.
632 * @param[in] options the auxiliary message's options. This is the list of string.
634 void OnAuxiliaryMessage(const std::string& key, const std::string& value, const Property::Array& options);
637 * @brief Called when Accessibility is enabled.
639 * This method is to register the window to accessibility bridge.
641 void OnAccessibilityEnabled();
644 * @brief Called when Accessibility is disabled.
646 * This method is to remove the window from accessibility bridge.
648 void OnAccessibilityDisabled();
651 * Called when the window rotation is finished.
653 * This signal is emmit when window rotation is finisehd and WindowRotationCompleted() is called.
655 void OnRotationFinished();
658 * @brief Called when the mouse in or out event is received.
659 * @param[in] mouseInOutEvent the mouse event
661 void OnMouseInOutEvent(const Dali::DevelWindow::MouseInOutEvent& mouseInOutEvent);
664 * @brief Called when the mouse relative event is received.
665 * @param[in] mouseRelativeEvent the mouse event
667 void OnMouseRelativeEvent(const Dali::DevelWindow::MouseRelativeEvent& mouseRelativeEvent);
670 * @brief Called when the pointer is locked/unlocked
672 * @param[in] position The x, y coordinate relative to window where event happened
673 * @param[in] locked The status whether pointer is locked/unlocked
674 * @param[in] confined The status whether pointer is confined/unconfined
676 void OnPointerConstraints(const Dali::Int32Pair& position, bool locked, bool confined);
679 * @brief Called when the window is moved by display server.
681 * @param[in] position the moved window's position.
683 void OnMoveCompleted(Dali::Window::WindowPosition& position);
686 * @brief Called when the window is resized by display server.
688 * @param[in] positionSize the resized window's size.
690 void OnResizeCompleted(Dali::Window::WindowSize& size);
693 * @brief Set available orientation to window base.
695 void SetAvailableAnlges(const std::vector<int>& angles);
698 * @brief Convert from window orientation to angle using OrientationMode.
700 int ConvertToAngle(WindowOrientation orientation);
703 * @brief Convert from angle to window orientation using OrientationMode.
705 WindowOrientation ConvertToOrientation(int angle) const;
708 * @brief Check available window orientation for Available orientation.
710 bool IsOrientationAvailable(WindowOrientation orientation) const;
713 * @brief Sets user geometry flag when window's geometry is changed.
714 * Window is created with screen size or not.
715 * If window is created with screen size or the geometry is changed by user,
716 * client should inform to server setting user.geometry flag
718 void SetUserGeometryPolicy();
721 * @brief Called when window insets are changed by appearing or disappearing indicator, virtual keyboard, or clipboard.
723 * @param[in] partType the type of the part that occurs the window insets change.
724 * @param[in] partState the state of the part that occurs the window insets change.
725 * @param[in] insets the extents value of window insets.
727 void OnInsetsChanged(WindowInsetsPartType partType, WindowInsetsPartState partState, const Extents& insets);
729 private: // Dali::Internal::Adaptor::SceneHolder
731 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
733 void OnAdaptorSet(Dali::Adaptor& adaptor) override;
736 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnSurfaceSet
738 void OnSurfaceSet(Dali::RenderSurfaceInterface* surface) override;
741 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnPause
743 void OnPause() override;
746 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnResume
748 void OnResume() override;
751 * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculatePosition
753 Vector2 RecalculatePosition(const Vector2& position) override;
755 private: // Dali::Internal::Adaptor::EventHandler::Observer
757 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnTouchPoint
759 void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override;
762 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
764 void OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) override;
767 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnKeyEvent
769 void OnKeyEvent(Dali::Integration::KeyEvent& keyEvent) override;
772 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnRotation
774 void OnRotation(const RotationEvent& rotation) override;
778 * @copydoc Dali::Window::FocusChangeSignal()
780 FocusChangeSignalType& FocusChangeSignal()
782 return mFocusChangeSignal;
786 * @copydoc Dali::Window::ResizedSignal()
788 ResizeSignalType& ResizeSignal()
790 return mResizeSignal;
794 * This signal is emitted when the window is requesting to be deleted
796 SignalType& DeleteRequestSignal()
798 return mDeleteRequestSignal;
802 * @copydoc Dali::DevelWindow::VisibilityChangedSignal()
804 VisibilityChangedSignalType& VisibilityChangedSignal()
806 return mVisibilityChangedSignal;
810 * @copydoc Dali::Window::SignalEventProcessingFinished()
812 Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal()
814 return mScene.EventProcessingFinishedSignal();
818 * @copydoc Dali::DevelWindow::TransitionEffectEventSignal()
820 TransitionEffectEventSignalType& TransitionEffectEventSignal()
822 return mTransitionEffectEventSignal;
826 * @copydoc Dali::DevelWindow::KeyboardRepeatSettingsChangedSignal()
828 KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal()
830 return mKeyboardRepeatSettingsChangedSignal;
834 * @copydoc Dali::DevelWindow::AuxiliaryMessageSignal()
836 AuxiliaryMessageSignalType& AuxiliaryMessageSignal()
838 return mAuxiliaryMessageSignal;
842 * @copydoc Dali::DevelWindow::AccessibilityHighlightSignal()
844 AccessibilityHighlightSignalType& AccessibilityHighlightSignal()
846 return mAccessibilityHighlightSignal;
850 * @copydoc Dali::DevelWindow::MovedSignal()
852 MovedSignalType& MovedSignal()
858 * @copydoc Dali::DevelWindow::OrientationChangedSignal()
860 OrientationChangedSignalType& OrientationChangedSignal()
862 return mOrientationChangedSignal;
866 * @copydoc Dali::DevelWindow::MouseInOutEventSignal()
868 MouseInOutEventSignalType& MouseInOutEventSignal()
870 return mMouseInOutEventSignal;
874 * @copydoc Dali::DevelWindow::MouseRelativeEventSignal()
876 MouseRelativeEventSignalType& MouseRelativeEventSignal()
878 return mMouseRelativeEventSignal;
882 * @copydoc Dali::DevelWindow::PointerConstraintsSignal()
884 PointerConstraintsSignalType& PointerConstraintsSignal()
886 return mPointerConstraintsSignal;
890 * @copydoc Dali::DevelWindow::MoveCompletedSignal()
892 MoveCompletedSignalType& MoveCompletedSignal()
894 return mMoveCompletedSignal;
898 * @copydoc Dali::DevelWindow::ResizeCompletedSignal()
900 ResizeCompletedSignalType& ResizeCompletedSignal()
902 return mResizeCompletedSignal;
906 * @copydoc Dali::DevelWindow::InsetsChangedSignal()
908 InsetsChangedSignalType& InsetsChangedSignal()
910 return mInsetsChangedSignal;
914 WindowRenderSurface* mWindowSurface; ///< The window rendering surface
915 WindowBase* mWindowBase;
917 std::string mClassName;
918 Dali::Window mParentWindow;
920 OrientationPtr mOrientation;
921 std::vector<int> mAvailableAngles;
924 int mRotationAngle; ///< The angle of the rotation
925 int mWindowWidth; ///< The width of the window
926 int mWindowHeight; ///< The height of the window
927 int mNativeWindowId; ///< The Native Window Id
929 EventHandlerPtr mEventHandler; ///< The window events handler
930 OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
933 SignalType mDeleteRequestSignal;
934 FocusChangeSignalType mFocusChangeSignal;
935 ResizeSignalType mResizeSignal;
936 VisibilityChangedSignalType mVisibilityChangedSignal;
937 TransitionEffectEventSignalType mTransitionEffectEventSignal;
938 KeyboardRepeatSettingsChangedSignalType mKeyboardRepeatSettingsChangedSignal;
939 AuxiliaryMessageSignalType mAuxiliaryMessageSignal;
940 AccessibilityHighlightSignalType mAccessibilityHighlightSignal;
941 MovedSignalType mMovedSignal;
942 OrientationChangedSignalType mOrientationChangedSignal;
943 MouseInOutEventSignalType mMouseInOutEventSignal;
944 MouseRelativeEventSignalType mMouseRelativeEventSignal;
945 MoveCompletedSignalType mMoveCompletedSignal;
946 ResizeCompletedSignalType mResizeCompletedSignal;
947 InsetsChangedSignalType mInsetsChangedSignal;
948 PointerConstraintsSignalType mPointerConstraintsSignal;
950 Dali::KeyEvent mLastKeyEvent;
952 bool mIsTransparent : 1;
953 bool mIsFocusAcceptable : 1;
956 bool mOpaqueState : 1;
957 bool mWindowRotationAcknowledgement : 1;
959 bool mIsWindowRotating : 1; ///< The window rotating flag.
960 bool mIsEnabledUserGeometry : 1; ///< The user geometry enable flag.
961 bool mIsEmittedWindowCreatedEvent : 1; ///< The Window Created Event emit flag for accessibility.
964 } // namespace Adaptor
965 } // namespace Internal
967 // Helpers for public-api forwarding methods
969 inline Internal::Adaptor::Window& GetImplementation(Dali::Window& window)
971 DALI_ASSERT_ALWAYS(window && "Window handle is empty");
972 BaseObject& object = window.GetBaseObject();
973 return static_cast<Internal::Adaptor::Window&>(object);
976 inline const Internal::Adaptor::Window& GetImplementation(const Dali::Window& window)
978 DALI_ASSERT_ALWAYS(window && "Window handle is empty");
979 const BaseObject& object = window.GetBaseObject();
980 return static_cast<const Internal::Adaptor::Window&>(object);
985 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H