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>
28 #include <dali/public-api/render-tasks/render-task-list.h>
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>
42 class RenderSurfaceInterface;
49 class WindowRenderSurface;
53 using WindowPtr = IntrusivePtr<Window>;
54 using OrientationPtr = IntrusivePtr<Orientation>;
55 using MouseInOutEventPtr = IntrusivePtr<Dali::DevelWindow::MouseInOutEvent>;
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::MoveCompletedSignalType MoveCompletedSignalType;
75 typedef Dali::DevelWindow::ResizeCompletedSignalType ResizeCompletedSignalType;
76 typedef Dali::DevelWindow::InsetsChangedSignalType InsetsChangedSignalType;
77 typedef Signal<void()> SignalType;
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
88 static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false);
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
100 static Window* New(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, Dali::WindowType type, bool isTransparent = false);
103 * @copydoc Dali::Window::SetClass()
105 void SetClass(std::string name, std::string className);
108 * @brief Gets the window class name.
109 * @return The class of the window
111 std::string GetClassName() const;
114 * @copydoc Dali::Window::Raise()
119 * @copydoc Dali::Window::Lower()
124 * @copydoc Dali::Window::Activate()
129 * @copydoc Dali::DevelWindow::Maximize()
131 void Maximize(bool maximize);
134 * @copydoc Dali::DevelWindow::IsMaximized()
136 bool IsMaximized() const;
139 * @copydoc Dali::DevelWindow::SetMaximumSize()
141 void SetMaximumSize(Dali::Window::WindowSize size);
144 * @copydoc Dali::DevelWindow::Minimize()
146 void Minimize(bool minimize);
149 * @copydoc Dali::DevelWindow::IsMinimized()
151 bool IsMinimized() const;
154 * @copydoc Dali::DevelWindow::SetMimimumSize()
156 void SetMimimumSize(Dali::Window::WindowSize size);
159 * @copydoc Dali::Window::GetLayerCount()
161 uint32_t GetLayerCount() const;
164 * @copydoc Dali::Window::GetLayer()
166 Dali::Layer GetLayer(uint32_t depth) const;
169 * @copydoc Dali::DevelWindow::GetRenderTaskList()
171 Dali::RenderTaskList GetRenderTaskList() const;
174 * @brief Get window resource ID assigned by window manager
175 * @return The resource ID of the window
177 std::string GetNativeResourceId() const;
180 * @copydoc Dali::Window::AddAvailableOrientation()
182 void AddAvailableOrientation(WindowOrientation orientation);
185 * @copydoc Dali::Window::RemoveAvailableOrientation()
187 void RemoveAvailableOrientation(WindowOrientation orientation);
190 * @copydoc Dali::Window::SetPreferredOrientation()
192 void SetPreferredOrientation(WindowOrientation orientation);
195 * @copydoc Dali::Window::GetPreferredOrientation()
197 WindowOrientation GetPreferredOrientation();
200 * @copydoc Dali::Window::SetAcceptFocus()
202 void SetAcceptFocus(bool accept);
205 * @copydoc Dali::Window::IsFocusAcceptable()
207 bool IsFocusAcceptable() const;
210 * @copydoc Dali::Window::Show()
215 * @copydoc Dali::Window::Hide()
220 * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
222 unsigned int GetSupportedAuxiliaryHintCount() const;
225 * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
227 std::string GetSupportedAuxiliaryHint(unsigned int index) const;
230 * @copydoc Dali::Window::AddAuxiliaryHint()
232 unsigned int AddAuxiliaryHint(const std::string& hint, const std::string& value);
235 * @copydoc Dali::Window::RemoveAuxiliaryHint()
237 bool RemoveAuxiliaryHint(unsigned int id);
240 * @copydoc Dali::Window::SetAuxiliaryHintValue()
242 bool SetAuxiliaryHintValue(unsigned int id, const std::string& value);
245 * @copydoc Dali::Window::GetAuxiliaryHintValue()
247 std::string GetAuxiliaryHintValue(unsigned int id) const;
250 * @copydoc Dali::Window::GetAuxiliaryHintId()
252 unsigned int GetAuxiliaryHintId(const std::string& hint) const;
255 * @copydoc Dali::Window::SetInputRegion()
257 void SetInputRegion(const Rect<int>& inputRegion);
260 * @copydoc Dali::Window::SetType()
262 void SetType(WindowType type);
265 * @copydoc Dali::Window::GetType() const
267 WindowType GetType() const;
270 * @copydoc Dali::Window::SetNotificationLevel()
272 WindowOperationResult SetNotificationLevel(WindowNotificationLevel level);
275 * @copydoc Dali::Window::GetNotificationLevel()
277 WindowNotificationLevel GetNotificationLevel() const;
280 * @copydoc Dali::Window::SetOpaqueState()
282 void SetOpaqueState(bool opaque);
285 * @copydoc Dali::Window::IsOpaqueState()
287 bool IsOpaqueState() const;
290 * @copydoc Dali::Window::SetScreenOffMode()
292 WindowOperationResult SetScreenOffMode(WindowScreenOffMode screenOffMode);
295 * @copydoc Dali::Window::GetScreenOffMode()
297 WindowScreenOffMode GetScreenOffMode() const;
300 * @copydoc Dali::Window::SetBrightness()
302 WindowOperationResult SetBrightness(int brightness);
305 * @copydoc Dali::Window::GetBrightness()
307 int GetBrightness() const;
310 * @copydoc Dali::Window::SetSize()
312 void SetSize(Dali::Window::WindowSize size);
315 * @copydoc Dali::Window::GetSize()
317 Dali::Window::WindowSize GetSize() const;
320 * @copydoc Dali::Window::SetPosition()
322 void SetPosition(Dali::Window::WindowPosition position);
325 * @copydoc Dali::Window::GetPosition()
327 Dali::Window::WindowPosition GetPosition() const;
330 * @copydoc Dali::DevelWindow::SetPositionSize()
332 void SetPositionSize(PositionSize positionSize);
335 * @copydoc Dali::DevelWindow::GetPositionSize()
337 PositionSize GetPositionSize() const;
340 * @copydoc Dali::Window::SetLayout()
342 void SetLayout(unsigned int numCols, unsigned int numRows, unsigned int column, unsigned int row, unsigned int colSpan, unsigned int rowSpan);
345 * @copydoc Dali::Window::GetRootLayer()
347 Dali::Layer GetRootLayer() const;
350 * @copydoc Dali::Window::SetTransparency()
352 void SetTransparency(bool transparent);
355 * @copydoc Dali::KeyGrab::GrabKey()
357 bool GrabKey(Dali::KEY key, KeyGrab::KeyGrabMode grabMode);
360 * @copydoc Dali::KeyGrab::UngrabKey()
362 bool UngrabKey(Dali::KEY key);
365 * @copydoc Dali::KeyGrab::GrabKeyList()
367 bool GrabKeyList(const Dali::Vector<Dali::KEY>& key, const Dali::Vector<KeyGrab::KeyGrabMode>& grabMode, Dali::Vector<bool>& result);
370 * @copydoc Dali::KeyGrab::UngrabKeyList()
372 bool UngrabKeyList(const Dali::Vector<Dali::KEY>& key, Dali::Vector<bool>& result);
375 * @copydoc Dali::DevelWindow::Get()
377 static Dali::Window Get(Dali::Actor actor);
380 * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent)
382 void SetParent(Dali::Window& parent);
385 * @copydoc Dali::DevelWindow::SetParent(Window window, Window parent, bool belowParent)
387 void SetParent(Dali::Window& parent, bool belowParent);
390 * @copydoc Dali::DevelWindow::Unparent()
395 * @copydoc Dali::DevelWindow::GetParent()
397 Dali::Window GetParent();
400 * @copydoc Dali::DevelWindow::GetCurrentOrientation()
402 WindowOrientation GetCurrentOrientation() const;
405 * @copydoc Dali::DevelWindow::GetPhysicalOrientation()
407 int GetPhysicalOrientation() const;
410 * @copydoc Dali::DevelWindow::SetAvailableOrientations()
412 void SetAvailableOrientations(const Dali::Vector<WindowOrientation>& orientations);
415 * @copydoc Dali::DevelWindow::SetPositionSizeWithOrientation()
417 void SetPositionSizeWithOrientation(PositionSize positionSize, WindowOrientation orientation);
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.
425 * @param[in] highlight If window needs to grab or clear highlight.
427 void EmitAccessibilityHighlightSignal(bool highlight);
430 * @brief Sets the render notification trigger to call when render thread is completed a frame
432 * @param[in] renderNotification to use
434 void SetRenderNotification(TriggerEventInterface* renderNotification);
436 public: // Dali::Internal::Adaptor::SceneHolder
438 * @copydoc Dali::Internal::Adaptor::SceneHolder::GetNativeHandle
440 Dali::Any GetNativeHandle() const override;
443 * @copydoc Dali::Internal::Adaptor::SceneHolder::IsVisible
445 bool IsVisible() const override;
448 * @copydoc Dali::DevelWindow::GetNativeId()
450 int32_t GetNativeId() const;
453 * @copydoc Dali::DevelWindow::RequestMoveToServer()
455 void RequestMoveToServer();
458 * @copydoc Dali::DevelWindow::RequestResizeToServer()
460 void RequestResizeToServer(WindowResizeDirection direction);
463 * @copydoc Dali::DevelWindow::EnableFloatingMode()
465 void EnableFloatingMode(bool enable);
468 * @copydoc Dali::DevelWindow::IsFloatingModeEnabled()
470 bool IsFloatingModeEnabled();
473 * @copydoc Dali::DevelWindow::IncludeInputRegion()
475 void IncludeInputRegion(const Rect<int>& inputRegion);
478 * @copydoc Dali::DevelWindow::ExcludeInputRegion()
480 void ExcludeInputRegion(const Rect<int>& inputRegion);
483 * @copydoc Dali::DevelWindow::SetNeedsRotationCompletedAcknowledgement()
485 void SetNeedsRotationCompletedAcknowledgement(bool needAcknowledgement);
488 * @copydoc Dali::DevelWindow::SendRotationCompletedAcknowledgement()
490 void SendRotationCompletedAcknowledgement();
493 * @copydoc Dali::DevelWindow::IsWindowRotating()
495 bool IsWindowRotating() const;
498 * @copydoc Dali::DevelWindow::GetLastKeyEvent()
500 const Dali::KeyEvent& GetLastKeyEvent() const;
503 * @copydoc Dali::DevelWindow::GetLastTouchEvent()
505 const Dali::TouchEvent& GetLastTouchEvent() const;
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.
514 enum class OrientationMode
521 * Private constructor.
532 * Second stage initialization
534 void Initialize(Any surface, const PositionSize& positionSize, const std::string& name, const std::string& className, WindowType type);
537 * Called when the window becomes iconified or deiconified.
539 void OnIconifyChanged(bool iconified);
542 * Called when the window focus is changed.
544 void OnFocusChanged(bool focusIn);
547 * Called when the output is transformed.
549 void OnOutputTransformed();
552 * Called when the window receives a delete request.
554 void OnDeleteRequest();
557 * Called when the window receives a Transition effect-start/end event.
559 void OnTransitionEffectEvent(WindowEffectState state, WindowEffectType type);
562 * @brief Called when window receives a keyboard repeat event.
564 void OnKeyboardRepeatSettingsChanged();
567 * @brief Called when the window redraw is requested.
569 void OnWindowRedrawRequest();
572 * @brief Called when the window's geometry data is changed by display server or client.
573 * It is based on configure noification event.
575 * @param[in] positionSize the updated window's position and size.
577 void OnUpdatePositionSize(Dali::PositionSize& positionSize);
580 * @brief Called when display server sent the auxiliary message.
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.
586 void OnAuxiliaryMessage(const std::string& key, const std::string& value, const Property::Array& options);
589 * @brief Called when Accessibility is enabled.
591 * This method is to register the window to accessibility bridge.
593 void OnAccessibilityEnabled();
596 * @brief Called when Accessibility is disabled.
598 * This method is to remove the window from accessibility bridge.
600 void OnAccessibilityDisabled();
603 * Called when the window rotation is finished.
605 * This signal is emmit when window rotation is finisehd and WindowRotationCompleted() is called.
607 void OnRotationFinished();
610 * @brief Called when the mouse in or out event is received.
611 * @param[in] mouseInOutEvent the mouse event
613 void OnMouseInOutEvent(const Dali::DevelWindow::MouseInOutEvent& mouseInOutEvent);
616 * @brief Called when the window is moved by display server.
618 * @param[in] position the moved window's position.
620 void OnMoveCompleted(Dali::Window::WindowPosition& position);
623 * @brief Called when the window is resized by display server.
625 * @param[in] positionSize the resized window's size.
627 void OnResizeCompleted(Dali::Window::WindowSize& size);
630 * @brief Set available orientation to window base.
632 void SetAvailableAnlges(const std::vector<int>& angles);
635 * @brief Convert from window orientation to angle using OrientationMode.
637 int ConvertToAngle(WindowOrientation orientation);
640 * @brief Convert from angle to window orientation using OrientationMode.
642 WindowOrientation ConvertToOrientation(int angle) const;
645 * @brief Check available window orientation for Available orientation.
647 bool IsOrientationAvailable(WindowOrientation orientation) const;
650 * @brief Called when window insets are changed by appearing or disappearing indicator, virtual keyboard, or clipboard.
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.
656 void OnInsetsChanged(WindowInsetsPartType partType, WindowInsetsPartState partState, const Extents& insets);
659 private: // Dali::Internal::Adaptor::SceneHolder
661 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnAdaptorSet
663 void OnAdaptorSet(Dali::Adaptor& adaptor) override;
666 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnSurfaceSet
668 void OnSurfaceSet(Dali::RenderSurfaceInterface* surface) override;
671 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnPause
673 void OnPause() override;
676 * @copydoc Dali::Internal::Adaptor::SceneHolder::OnResume
678 void OnResume() override;
681 * @copydoc Dali::Internal::Adaptor::SceneHolder::RecalculatePosition
683 Vector2 RecalculatePosition(const Vector2& position) override;
685 private: // Dali::Internal::Adaptor::EventHandler::Observer
687 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnTouchPoint
689 void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override;
692 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
694 void OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) override;
697 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnKeyEvent
699 void OnKeyEvent(Dali::Integration::KeyEvent& keyEvent) override;
702 * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnRotation
704 void OnRotation(const RotationEvent& rotation) override;
708 * @copydoc Dali::Window::FocusChangeSignal()
710 FocusChangeSignalType& FocusChangeSignal()
712 return mFocusChangeSignal;
716 * @copydoc Dali::Window::ResizedSignal()
718 ResizeSignalType& ResizeSignal()
720 return mResizeSignal;
724 * This signal is emitted when the window is requesting to be deleted
726 SignalType& DeleteRequestSignal()
728 return mDeleteRequestSignal;
732 * @copydoc Dali::DevelWindow::VisibilityChangedSignal()
734 VisibilityChangedSignalType& VisibilityChangedSignal()
736 return mVisibilityChangedSignal;
740 * @copydoc Dali::Window::SignalEventProcessingFinished()
742 Dali::DevelWindow::EventProcessingFinishedSignalType& EventProcessingFinishedSignal()
744 return mScene.EventProcessingFinishedSignal();
748 * @copydoc Dali::DevelWindow::TransitionEffectEventSignal()
750 TransitionEffectEventSignalType& TransitionEffectEventSignal()
752 return mTransitionEffectEventSignal;
756 * @copydoc Dali::DevelWindow::KeyboardRepeatSettingsChangedSignal()
758 KeyboardRepeatSettingsChangedSignalType& KeyboardRepeatSettingsChangedSignal()
760 return mKeyboardRepeatSettingsChangedSignal;
764 * @copydoc Dali::DevelWindow::AuxiliaryMessageSignal()
766 AuxiliaryMessageSignalType& AuxiliaryMessageSignal()
768 return mAuxiliaryMessageSignal;
772 * @copydoc Dali::DevelWindow::AccessibilityHighlightSignal()
774 AccessibilityHighlightSignalType& AccessibilityHighlightSignal()
776 return mAccessibilityHighlightSignal;
780 * @copydoc Dali::DevelWindow::MovedSignal()
782 MovedSignalType& MovedSignal()
788 * @copydoc Dali::DevelWindow::OrientationChangedSignal()
790 OrientationChangedSignalType& OrientationChangedSignal()
792 return mOrientationChangedSignal;
796 * @copydoc Dali::DevelWindow::MouseInOutEventSignal()
798 MouseInOutEventSignalType& MouseInOutEventSignal()
800 return mMouseInOutEventSignal;
804 * @copydoc Dali::DevelWindow::MoveCompletedSignal()
806 MoveCompletedSignalType& MoveCompletedSignal()
808 return mMoveCompletedSignal;
812 * @copydoc Dali::DevelWindow::ResizeCompletedSignal()
814 ResizeCompletedSignalType& ResizeCompletedSignal()
816 return mResizeCompletedSignal;
820 * @copydoc Dali::DevelWindow::InsetsChangedSignal()
822 InsetsChangedSignalType& InsetsChangedSignal()
824 return mInsetsChangedSignal;
828 WindowRenderSurface* mWindowSurface; ///< The window rendering surface
829 WindowBase* mWindowBase;
831 std::string mClassName;
832 Dali::Window mParentWindow;
834 OrientationPtr mOrientation;
835 std::vector<int> mAvailableAngles;
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
843 EventHandlerPtr mEventHandler; ///< The window events handler
844 OrientationMode mOrientationMode; ///< The physical screen mode is portrait or landscape
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;
862 Dali::KeyEvent mLastKeyEvent;
863 Dali::TouchEvent mLastTouchEvent;
865 bool mIsTransparent : 1;
866 bool mIsFocusAcceptable : 1;
868 bool mOpaqueState : 1;
869 bool mWindowRotationAcknowledgement : 1;
871 bool mIsWindowRotating : 1; ///< The window rotating flag.
874 } // namespace Adaptor
875 } // namespace Internal
877 // Helpers for public-api forwarding methods
879 inline Internal::Adaptor::Window& GetImplementation(Dali::Window& window)
881 DALI_ASSERT_ALWAYS(window && "Window handle is empty");
882 BaseObject& object = window.GetBaseObject();
883 return static_cast<Internal::Adaptor::Window&>(object);
886 inline const Internal::Adaptor::Window& GetImplementation(const Dali::Window& window)
888 DALI_ASSERT_ALWAYS(window && "Window handle is empty");
889 const BaseObject& object = window.GetBaseObject();
890 return static_cast<const Internal::Adaptor::Window&>(object);
895 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H