- DALI_ASSERT_ALWAYS( !mStarted && "Adaptor already started" );
- mStarted = true;
-
- // Create one overlay for the main window only
- Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation(adaptor);
- Integration::Core& core = adaptorImpl.GetCore();
- mOverlay = &core.GetSystemOverlay();
-
- // Only create render task list for the overlay once
- if (!mOverlay->GetOverlayRenderTasks())
- {
- Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New();
-
- Dali::Actor overlayRootActor = mOverlay->GetDefaultRootActor();
- Dali::CameraActor overlayCameraActor = mOverlay->GetDefaultCameraActor();
- Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor );
-
- mOverlay->SetOverlayRenderTasks( overlayRenderTaskList );
- }
-
- mAdaptor = &adaptorImpl;
- mAdaptor->AddObserver( *this );
-
- // Can only create the detector when we know the Core has been instantiated.
- mDragAndDropDetector = DragAndDropDetector::New();
- mAdaptor->SetDragAndDropDetector( &GetImplementation( mDragAndDropDetector ) );
-
- if( mOrientation )
- {
- mOrientation->SetAdaptor(adaptor);
- }
-
- if( mIndicator != NULL )
- {
- mIndicator->SetAdaptor(mAdaptor);
- }