Revert "[Tizen] Add Effect Start/End signal"
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-impl.cpp
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/window-system/common/window-impl.h>
20
21 // EXTERNAL HEADERS
22 #include <dali/integration-api/core.h>
23 #include <dali/public-api/actors/actor.h>
24 #include <dali/public-api/actors/layer.h>
25 #include <dali/public-api/actors/camera-actor.h>
26 #include <dali/public-api/render-tasks/render-task.h>
27 #include <dali/public-api/render-tasks/render-task-list.h>
28 #include <dali/public-api/rendering/frame-buffer.h>
29 #include <dali/devel-api/adaptor-framework/orientation.h>
30 #include <dali/integration-api/events/touch-event-integ.h>
31
32 // INTERNAL HEADERS
33 #include <dali/integration-api/adaptor-framework/render-surface-interface.h>
34 #include <dali/internal/window-system/common/event-handler.h>
35 #include <dali/internal/window-system/common/orientation-impl.h>
36 #include <dali/internal/window-system/common/render-surface-factory.h>
37 #include <dali/internal/window-system/common/window-factory.h>
38 #include <dali/internal/window-system/common/window-base.h>
39 #include <dali/internal/window-system/common/window-render-surface.h>
40 #include <dali/internal/window-system/common/window-visibility-observer.h>
41
42 namespace Dali
43 {
44 namespace Internal
45 {
46 namespace Adaptor
47 {
48
49 namespace
50 {
51
52 #if defined(DEBUG_ENABLED)
53 Debug::Filter* gWindowLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_WINDOW" );
54 #endif
55
56 } // unnamed namespace
57
58 Window* Window::New( const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent )
59 {
60   Window* window = new Window();
61   window->mIsTransparent = isTransparent;
62   window->Initialize( positionSize, name, className );
63   return window;
64 }
65
66 Window::Window()
67 : mWindowSurface( nullptr ),
68   mWindowBase(),
69   mIsTransparent( false ),
70   mIsFocusAcceptable( true ),
71   mIconified( false ),
72   mOpaqueState( false ),
73   mResizeEnabled( false ),
74   mType( Dali::Window::NORMAL ),
75   mParentWindow( NULL ),
76   mPreferredOrientation( Dali::Window::PORTRAIT ),
77   mRotationAngle( 0 ),
78   mWindowWidth( 0 ),
79   mWindowHeight( 0 ),
80   mFocusChangedSignal(),
81   mResizedSignal(),
82   mDeleteRequestSignal(),
83   mFocusChangeSignal(),
84   mResizeSignal(),
85   mVisibilityChangedSignal()
86 {
87 }
88
89 Window::~Window()
90 {
91   if ( mEventHandler )
92   {
93     mEventHandler->RemoveObserver( *this );
94   }
95 }
96
97 void Window::Initialize(const PositionSize& positionSize, const std::string& name, const std::string& className)
98 {
99   // Create a window render surface
100   Any surface;
101   auto renderSurfaceFactory = Dali::Internal::Adaptor::GetRenderSurfaceFactory();
102   mSurface = renderSurfaceFactory->CreateWindowRenderSurface( positionSize, surface, mIsTransparent );
103   mWindowSurface = static_cast<WindowRenderSurface*>( mSurface.get() );
104
105   // Get a window base
106   mWindowBase = mWindowSurface->GetWindowBase();
107
108   // Connect signals
109   mWindowBase->IconifyChangedSignal().Connect( this, &Window::OnIconifyChanged );
110   mWindowBase->FocusChangedSignal().Connect( this, &Window::OnFocusChanged );
111   mWindowBase->DeleteRequestSignal().Connect( this, &Window::OnDeleteRequest );
112
113   mWindowSurface->OutputTransformedSignal().Connect( this, &Window::OnOutputTransformed );
114
115   if( !positionSize.IsEmpty() )
116   {
117     AddAuxiliaryHint( "wm.policy.win.user.geometry", "1" );
118     mResizeEnabled = true;
119   }
120
121   SetClass( name, className );
122
123   mWindowSurface->Map();
124
125   mOrientation = Orientation::New( this );
126 }
127
128 void Window::OnAdaptorSet(Dali::Adaptor& adaptor)
129 {
130   mEventHandler = EventHandlerPtr(new EventHandler( mWindowSurface, *mAdaptor ) );
131   mEventHandler->AddObserver( *this );
132 }
133
134 void Window::OnSurfaceSet( Dali::RenderSurfaceInterface* surface )
135 {
136   mWindowSurface = static_cast<WindowRenderSurface*>( surface );
137 }
138
139 void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
140 {
141 }
142
143 void Window::SetIndicatorBgOpacity( Dali::Window::IndicatorBgOpacity opacityMode )
144 {
145 }
146
147 void Window::RotateIndicator( Dali::Window::WindowOrientation orientation )
148 {
149 }
150
151 void Window::SetClass( std::string name, std::string className )
152 {
153   mName = name;
154   mClassName = className;
155   mWindowBase->SetClass( name, className );
156 }
157
158 std::string Window::GetClassName() const
159 {
160   return mClassName;
161 }
162
163 void Window::Raise()
164 {
165   mWindowBase->Raise();
166   DALI_LOG_RELEASE_INFO( "Window (%p) Raise() \n", this );
167 }
168
169 void Window::Lower()
170 {
171   mWindowBase->Lower();
172   DALI_LOG_RELEASE_INFO( "Window (%p) Lower() \n", this );
173 }
174
175 void Window::Activate()
176 {
177   mWindowBase->Activate();
178   DALI_LOG_RELEASE_INFO( "Window (%p) Activate() \n", this );
179 }
180
181 uint32_t Window::GetLayerCount() const
182 {
183   return mScene.GetLayerCount();
184 }
185
186 Dali::Layer Window::GetLayer( uint32_t depth ) const
187 {
188   return mScene.GetLayer( depth );
189 }
190
191 Dali::RenderTaskList Window::GetRenderTaskList() const
192 {
193   return mScene.GetRenderTaskList();
194 }
195
196 void Window::AddAvailableOrientation( Dali::Window::WindowOrientation orientation )
197 {
198   bool found = false;
199
200   if( orientation <= Dali::Window::LANDSCAPE_INVERSE )
201   {
202     for( std::size_t i = 0; i < mAvailableOrientations.size(); i++ )
203     {
204       if( mAvailableOrientations[i] == orientation )
205       {
206         found = true;
207         break;
208       }
209     }
210
211     if( !found )
212     {
213       mAvailableOrientations.push_back( orientation );
214       SetAvailableOrientations( mAvailableOrientations );
215     }
216   }
217 }
218
219 void Window::RemoveAvailableOrientation( Dali::Window::WindowOrientation orientation )
220 {
221   for( std::vector<Dali::Window::WindowOrientation>::iterator iter = mAvailableOrientations.begin();
222        iter != mAvailableOrientations.end(); ++iter )
223   {
224     if( *iter == orientation )
225     {
226       mAvailableOrientations.erase( iter );
227       break;
228     }
229   }
230   SetAvailableOrientations( mAvailableOrientations );
231 }
232
233 void Window::SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations )
234 {
235   if( orientations.size() > 4 )
236   {
237     DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetAvailableOrientations: Invalid vector size! [%d]\n", orientations.size() );
238     return;
239   }
240
241   mAvailableOrientations = orientations;
242
243   mWindowBase->SetAvailableOrientations( mAvailableOrientations );
244 }
245
246 const std::vector< Dali::Window::WindowOrientation >& Window::GetAvailableOrientations()
247 {
248   return mAvailableOrientations;
249 }
250
251 void Window::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
252 {
253   mPreferredOrientation = orientation;
254
255   mWindowBase->SetPreferredOrientation( mPreferredOrientation );
256 }
257
258 Dali::Window::WindowOrientation Window::GetPreferredOrientation()
259 {
260   return mPreferredOrientation;
261 }
262
263 Dali::Any Window::GetNativeHandle() const
264 {
265   return mWindowSurface->GetNativeWindow();
266 }
267
268 void Window::SetAcceptFocus( bool accept )
269 {
270   mIsFocusAcceptable = accept;
271
272   mWindowBase->SetAcceptFocus( accept );
273 }
274
275 bool Window::IsFocusAcceptable() const
276 {
277   return mIsFocusAcceptable;
278 }
279
280 void Window::Show()
281 {
282   mVisible = true;
283
284   mWindowBase->Show();
285
286   if( !mIconified )
287   {
288     WindowVisibilityObserver* observer( mAdaptor );
289     observer->OnWindowShown();
290
291     Dali::Window handle( this );
292     mVisibilityChangedSignal.Emit( handle, true );
293   }
294
295   DALI_LOG_RELEASE_INFO( "Window (%p) Show(): iconified = %d\n", this, mIconified );
296 }
297
298 void Window::Hide()
299 {
300   mVisible = false;
301
302   mWindowBase->Hide();
303
304   if( !mIconified )
305   {
306     WindowVisibilityObserver* observer( mAdaptor );
307     observer->OnWindowHidden();
308
309     Dali::Window handle( this );
310     mVisibilityChangedSignal.Emit( handle, false );
311   }
312
313   DALI_LOG_RELEASE_INFO( "Window (%p) Hide(): iconified = %d\n", this, mIconified );
314 }
315
316 bool Window::IsVisible() const
317 {
318   return mVisible && !mIconified;
319 }
320
321 unsigned int Window::GetSupportedAuxiliaryHintCount() const
322 {
323   return mWindowBase->GetSupportedAuxiliaryHintCount();
324 }
325
326 std::string Window::GetSupportedAuxiliaryHint( unsigned int index ) const
327 {
328   return mWindowBase->GetSupportedAuxiliaryHint( index );
329 }
330
331 unsigned int Window::AddAuxiliaryHint( const std::string& hint, const std::string& value )
332 {
333   return mWindowBase->AddAuxiliaryHint( hint, value );
334 }
335
336 bool Window::RemoveAuxiliaryHint( unsigned int id )
337 {
338   return mWindowBase->RemoveAuxiliaryHint( id );
339 }
340
341 bool Window::SetAuxiliaryHintValue( unsigned int id, const std::string& value )
342 {
343   return mWindowBase->SetAuxiliaryHintValue( id, value );
344 }
345
346 std::string Window::GetAuxiliaryHintValue( unsigned int id ) const
347 {
348   return mWindowBase->GetAuxiliaryHintValue( id );
349 }
350
351 unsigned int Window::GetAuxiliaryHintId( const std::string& hint ) const
352 {
353   return mWindowBase->GetAuxiliaryHintId( hint );
354 }
355
356 void Window::SetInputRegion( const Rect< int >& inputRegion )
357 {
358   mWindowBase->SetInputRegion( inputRegion );
359
360   DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetInputRegion: x = %d, y = %d, w = %d, h = %d\n", inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height );
361 }
362
363 void Window::SetType( Dali::Window::Type type )
364 {
365   if( type != mType )
366   {
367     mWindowBase->SetType( type );
368
369     mType = type;
370   }
371 }
372
373 Dali::Window::Type Window::GetType() const
374 {
375   return mType;
376 }
377
378 bool Window::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
379 {
380   if( mType != Dali::Window::NOTIFICATION )
381   {
382     DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", mType );
383     return false;
384   }
385
386   return mWindowBase->SetNotificationLevel( level );
387 }
388
389 Dali::Window::NotificationLevel::Type Window::GetNotificationLevel() const
390 {
391   if( mType != Dali::Window::NOTIFICATION )
392   {
393     DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Not supported window type [%d]\n", mType );
394     return Dali::Window::NotificationLevel::NONE;
395   }
396
397   return mWindowBase->GetNotificationLevel();
398 }
399
400 void Window::SetOpaqueState( bool opaque )
401 {
402   mOpaqueState = opaque;
403
404   mWindowBase->SetOpaqueState( opaque );
405
406   DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetOpaqueState: opaque = %d\n", opaque );
407 }
408
409 bool Window::IsOpaqueState() const
410 {
411   return mOpaqueState;
412 }
413
414 bool Window::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
415 {
416   return mWindowBase->SetScreenOffMode( screenOffMode );
417 }
418
419 Dali::Window::ScreenOffMode::Type Window::GetScreenOffMode() const
420 {
421   return mWindowBase->GetScreenOffMode();
422 }
423
424 bool Window::SetBrightness( int brightness )
425 {
426   if( brightness < 0 || brightness > 100 )
427   {
428     DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetBrightness: Invalid brightness value [%d]\n", brightness );
429     return false;
430   }
431
432   return mWindowBase->SetBrightness( brightness );
433 }
434
435 int Window::GetBrightness() const
436 {
437   return mWindowBase->GetBrightness();
438 }
439
440 void Window::SetSize( Dali::Window::WindowSize size )
441 {
442   if( !mResizeEnabled )
443   {
444     AddAuxiliaryHint( "wm.policy.win.user.geometry", "1" );
445     mResizeEnabled = true;
446   }
447
448   PositionSize oldRect = mSurface->GetPositionSize();
449
450   mWindowSurface->MoveResize( PositionSize( oldRect.x, oldRect.y, size.GetWidth(), size.GetHeight() ) );
451
452   PositionSize newRect = mSurface->GetPositionSize();
453
454   // When surface size is updated, inform adaptor of resizing and emit ResizeSignal
455   if( ( oldRect.width != newRect.width ) || ( oldRect.height != newRect.height ) )
456   {
457     Uint16Pair newSize( newRect.width, newRect.height );
458
459     bool forceUpdate = false;
460     if( mWindowBase->IsEglWindowRotationSupported() )
461     {
462       forceUpdate = true;
463     }
464
465     SurfaceResized( forceUpdate );
466
467     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
468
469     Dali::Window handle( this );
470     mResizedSignal.Emit( newSize );
471     mResizeSignal.Emit( handle, newSize );
472
473     mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
474   }
475 }
476
477 Dali::Window::WindowSize Window::GetSize() const
478 {
479   PositionSize positionSize = mSurface->GetPositionSize();
480
481   return Dali::Window::WindowSize( positionSize.width, positionSize.height );
482 }
483
484 void Window::SetPosition( Dali::Window::WindowPosition position )
485 {
486   if( !mResizeEnabled )
487   {
488     AddAuxiliaryHint( "wm.policy.win.user.geometry", "1" );
489     mResizeEnabled = true;
490   }
491
492   PositionSize oldRect = mSurface->GetPositionSize();
493
494   mWindowSurface->MoveResize( PositionSize( position.GetX(), position.GetY(), oldRect.width, oldRect.height ) );
495 }
496
497 Dali::Window::WindowPosition Window::GetPosition() const
498 {
499   PositionSize positionSize = mSurface->GetPositionSize();
500
501   return Dali::Window::WindowPosition( positionSize.x, positionSize.y );
502 }
503
504 void Window::SetPositionSize( PositionSize positionSize )
505 {
506   if( !mResizeEnabled )
507   {
508     AddAuxiliaryHint( "wm.policy.win.user.geometry", "1" );
509     mResizeEnabled = true;
510   }
511
512   PositionSize oldRect = mSurface->GetPositionSize();
513
514   mWindowSurface->MoveResize( positionSize );
515
516   PositionSize newRect = mSurface->GetPositionSize();
517
518   // When surface size is updated, inform adaptor of resizing and emit ResizeSignal
519   if( ( oldRect.width != newRect.width ) || ( oldRect.height != newRect.height ) )
520   {
521     Uint16Pair newSize( newRect.width, newRect.height );
522
523     bool forceUpdate = false;
524     if( mWindowBase->IsEglWindowRotationSupported() )
525     {
526       forceUpdate = true;
527     }
528
529     SurfaceResized( forceUpdate );
530
531     mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
532
533     Dali::Window handle( this );
534     mResizedSignal.Emit( newSize );
535     mResizeSignal.Emit( handle, newSize );
536     mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
537   }
538 }
539
540 Dali::Layer Window::GetRootLayer() const
541 {
542   return mScene.GetRootLayer();
543 }
544
545 void Window::SetTransparency( bool transparent )
546 {
547   mWindowSurface->SetTransparency( transparent );
548 }
549
550 bool Window::GrabKey( Dali::KEY key, KeyGrab::KeyGrabMode grabMode )
551 {
552   return mWindowBase->GrabKey( key, grabMode );
553 }
554
555 bool Window::UngrabKey( Dali::KEY key )
556 {
557   return mWindowBase->UngrabKey( key );
558 }
559
560 bool Window::GrabKeyList( const Dali::Vector< Dali::KEY >& key, const Dali::Vector< KeyGrab::KeyGrabMode >& grabMode, Dali::Vector< bool >& result )
561 {
562   return mWindowBase->GrabKeyList( key, grabMode, result );
563 }
564
565 bool Window::UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dali::Vector< bool >& result )
566 {
567   return mWindowBase->UngrabKeyList( key, result );
568 }
569
570 void Window::OnIconifyChanged( bool iconified )
571 {
572   if( iconified )
573   {
574     mIconified = true;
575
576     if( mVisible )
577     {
578       WindowVisibilityObserver* observer( mAdaptor );
579       observer->OnWindowHidden();
580
581       Dali::Window handle( this );
582       mVisibilityChangedSignal.Emit( handle, false );
583     }
584
585     DALI_LOG_RELEASE_INFO( "Window (%p) Iconified: visible = %d\n", this, mVisible );
586   }
587   else
588   {
589     mIconified = false;
590
591     if( mVisible )
592     {
593       WindowVisibilityObserver* observer( mAdaptor );
594       observer->OnWindowShown();
595
596       Dali::Window handle( this );
597       mVisibilityChangedSignal.Emit( handle, true );
598     }
599
600     DALI_LOG_RELEASE_INFO( "Window (%p) Deiconified: visible = %d\n", this, mVisible );
601   }
602 }
603
604 void Window::OnFocusChanged( bool focusIn )
605 {
606   Dali::Window handle( this );
607   mFocusChangedSignal.Emit( focusIn );
608   mFocusChangeSignal.Emit( handle, focusIn );
609 }
610
611 void Window::OnOutputTransformed()
612 {
613   bool forceUpdate = false;
614   if( mWindowBase->IsEglWindowRotationSupported() )
615   {
616     forceUpdate = true;
617   }
618   PositionSize positionSize = mSurface->GetPositionSize();
619   SurfaceResized( forceUpdate );
620   mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
621   mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
622 }
623
624 void Window::OnDeleteRequest()
625 {
626   mDeleteRequestSignal.Emit();
627 }
628
629 void Window::OnTouchPoint( Dali::Integration::Point& point, int timeStamp )
630 {
631   FeedTouchPoint( point, timeStamp );
632 }
633
634 void Window::OnWheelEvent( Dali::Integration::WheelEvent& wheelEvent )
635 {
636   FeedWheelEvent( wheelEvent );
637 }
638
639 void Window::OnKeyEvent( Dali::Integration::KeyEvent& keyEvent )
640 {
641   FeedKeyEvent( keyEvent );
642 }
643
644 void Window::OnRotation( const RotationEvent& rotation )
645 {
646   mRotationAngle = rotation.angle;
647   mWindowWidth = rotation.width;
648   mWindowHeight = rotation.height;
649
650   // Notify that the orientation is changed
651   mOrientation->OnOrientationChange( rotation );
652
653   mWindowSurface->RequestRotation( mRotationAngle, mWindowWidth, mWindowHeight );
654
655   bool forceUpdate = false;
656   if( mWindowBase->IsEglWindowRotationSupported() )
657   {
658     forceUpdate = true;
659   }
660
661   SurfaceResized( forceUpdate );
662
663   mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
664
665   // Emit signal
666   Dali::Window handle( this );
667   mResizedSignal.Emit( Dali::Window::WindowSize( mWindowWidth, mWindowHeight ) );
668   mResizeSignal.Emit( handle, Dali::Window::WindowSize( mWindowWidth, mWindowHeight ) );
669
670   mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( mWindowWidth, mWindowHeight ) );
671 }
672
673 void Window::OnPause()
674 {
675   if( mEventHandler )
676   {
677     mEventHandler->Pause();
678   }
679 }
680
681 void Window::OnResume()
682 {
683   if( mEventHandler )
684   {
685     mEventHandler->Resume();
686   }
687 }
688
689 void Window::RecalculateTouchPosition( Integration::Point& point )
690 {
691   Vector2 position = point.GetScreenPosition();
692   Vector2 convertedPosition;
693
694   switch( mRotationAngle )
695   {
696     case 90:
697     {
698       convertedPosition.x = static_cast<float>( mWindowWidth ) - position.y;
699       convertedPosition.y = position.x;
700       break;
701     }
702     case 180:
703     {
704       convertedPosition.x = static_cast<float>( mWindowWidth ) - position.x;
705       convertedPosition.y = static_cast<float>( mWindowHeight ) - position.y;
706       break;
707     }
708     case 270:
709     {
710       convertedPosition.x = position.y;
711       convertedPosition.y = static_cast<float>( mWindowHeight ) - position.x;
712       break;
713     }
714     default:
715     {
716       convertedPosition = position;
717       break;
718     }
719   }
720
721   point.SetScreenPosition( convertedPosition );
722 }
723
724 Dali::Window Window::Get( Dali::Actor actor )
725 {
726   Internal::Adaptor::Window* windowImpl = nullptr;
727
728   if ( Internal::Adaptor::Adaptor::IsAvailable() )
729   {
730     Dali::Internal::Adaptor::Adaptor& adaptor = Internal::Adaptor::Adaptor::GetImplementation( Internal::Adaptor::Adaptor::Get() );
731     windowImpl = static_cast<Internal::Adaptor::Window*>( adaptor.GetWindow( actor ) );
732   }
733
734   return Dali::Window( windowImpl );
735 }
736
737 void Window::SetParent( Dali::Window& parent )
738 {
739   if ( DALI_UNLIKELY( parent ) )
740   {
741     mParentWindow = parent;
742     Dali::Window self = Dali::Window( this );
743     // check circular parent window setting
744     if ( Dali::DevelWindow::GetParent( parent ) == self )
745     {
746       Dali::DevelWindow::Unparent( parent );
747     }
748     mWindowBase->SetParent( GetImplementation( mParentWindow ).mWindowBase );
749   }
750 }
751
752 void Window::Unparent()
753 {
754   mWindowBase->SetParent( nullptr );
755   mParentWindow.Reset();
756 }
757
758 Dali::Window Window::GetParent()
759 {
760   return mParentWindow;
761 }
762
763 } // Adaptor
764
765 } // Internal
766
767 } // Dali