X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fwayland%2Fwindow-impl-wl.cpp;h=9f2ef45f17af8ee36e920cbadee32bb050414cef;hb=e3835b131a0967f82800c17419baf56e31cdb32a;hp=808ae52e550f13bb255250e0d34951641ec2abec;hpb=30c75259aa5c7efc846d69ccdb293ca9e836aca0;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/wayland/window-impl-wl.cpp b/adaptors/wayland/window-impl-wl.cpp index 808ae52..9f2ef45 100644 --- a/adaptors/wayland/window-impl-wl.cpp +++ b/adaptors/wayland/window-impl-wl.cpp @@ -148,28 +148,6 @@ RenderSurface* Window::GetSurface() return mSurface; } -void Window::SetIndicatorStyle( Dali::Window::IndicatorStyle style ) -{ - mIndicatorStyle = style; -} - -void Window::ShowIndicator( bool show ) -{ - DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "%s\n", show?"SHOW":"HIDE" ); - DALI_ASSERT_DEBUG(mOverlay); - - if(show) - { - mIndicatorVisible = Dali::Window::VISIBLE; - } - else - { - mIndicatorVisible = Dali::Window::INVISIBLE; - } - - DoShowIndicator( mIndicatorOrientation ); -} - void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode ) { DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "visible : %d\n", visibleMode ); @@ -201,7 +179,6 @@ void Window::SetClass(std::string name, std::string klass) Window::Window() : mSurface(NULL), - mIndicatorStyle(Dali::Window::CHANGEABLE_COLOR), mIndicatorVisible(Dali::Window::VISIBLE), mIndicatorIsShown(false), mShowRotatedIndicatorOnClose(false), @@ -221,6 +198,12 @@ Window::~Window() { delete mEventHandler; + if( mIndicator ) + { + mIndicator->Close(); + delete mIndicator; + } + if ( mAdaptor ) { mAdaptor->RemoveObserver( *this ); @@ -235,8 +218,11 @@ void Window::Initialize(const PositionSize& windowPosition, const std::string& n { // create an Wayland window by default Any surface; - Any display; - mSurface = new ECore::WindowRenderSurface( windowPosition, surface, display, name, mIsTransparent ); + ECore::WindowRenderSurface* windowSurface = new ECore::WindowRenderSurface( windowPosition, surface, name, mIsTransparent ); + windowSurface->Map(); + + mSurface = windowSurface; + mOrientation = Orientation::New(this); // create event handler for Wayland window @@ -249,7 +235,7 @@ void Window::DoShowIndicator( Dali::Window::WindowOrientation lastOrientation ) { if( mIndicatorVisible != Dali::Window::INVISIBLE ) { - mIndicator = new Indicator( mAdaptor, mIndicatorOrientation, mIndicatorStyle, this ); + mIndicator = new Indicator( mAdaptor, mIndicatorOrientation, this ); mIndicator->SetOpacityMode( mIndicatorOpacityMode ); Dali::Actor actor = mIndicator->GetActor(); SetIndicatorActorRotation(); @@ -321,6 +307,11 @@ void Window::IndicatorClosed( Indicator* indicator ) } } +void Window::IndicatorVisibilityChanged(bool isVisible) +{ + mIndicatorVisibilityChangedSignal.Emit(isVisible); +} + void Window::SetIndicatorActorRotation() { DALI_LOG_TRACE_METHOD( gWindowLogFilter ); @@ -332,22 +323,22 @@ void Window::SetIndicatorActorRotation() case Dali::Window::PORTRAIT: actor.SetParentOrigin( ParentOrigin::TOP_CENTER ); actor.SetAnchorPoint( AnchorPoint::TOP_CENTER ); - actor.SetRotation( Degree(0), Vector3::ZAXIS ); + actor.SetOrientation( Degree(0), Vector3::ZAXIS ); break; case Dali::Window::PORTRAIT_INVERSE: actor.SetParentOrigin( ParentOrigin::BOTTOM_CENTER ); actor.SetAnchorPoint( AnchorPoint::TOP_CENTER ); - actor.SetRotation( Degree(180), Vector3::ZAXIS ); + actor.SetOrientation( Degree(180), Vector3::ZAXIS ); break; case Dali::Window::LANDSCAPE: actor.SetParentOrigin( ParentOrigin::CENTER_LEFT ); actor.SetAnchorPoint( AnchorPoint::TOP_CENTER ); - actor.SetRotation( Degree(270), Vector3::ZAXIS ); + actor.SetOrientation( Degree(270), Vector3::ZAXIS ); break; case Dali::Window::LANDSCAPE_INVERSE: actor.SetParentOrigin( ParentOrigin::CENTER_RIGHT ); actor.SetAnchorPoint( AnchorPoint::TOP_CENTER ); - actor.SetRotation( Degree(90), Vector3::ZAXIS ); + actor.SetOrientation( Degree(90), Vector3::ZAXIS ); break; } } @@ -369,6 +360,18 @@ Dali::DragAndDropDetector Window::GetDragAndDropDetector() const return mDragAndDropDetector; } +Dali::Any Window::GetNativeHandle() const +{ + if(mEventHandler) + { + return mEventHandler->mEcoreWindow; + } + else + { + return Dali::Any(); + } +} + void Window::OnStart() { DoShowIndicator( mIndicatorOrientation ); @@ -405,11 +408,6 @@ void Window::OnDestroy() mAdaptor = NULL; } -OrientationPtr Window::GetOrientation() -{ - return mOrientation; -} - void Window::AddAvailableOrientation(Dali::Window::WindowOrientation orientation) { bool found = false;