// INTERNAL HEADERS
#include <window-render-surface.h>
#include <drag-and-drop-detector-impl.h>
-#include <indicator-impl.h>
+#include <ecore-indicator-impl.h>
#include <window-visibility-observer.h>
#include <orientation-impl.h>
};
-Window* Window::New(const PositionSize& posSize, const std::string& name, bool isTransparent)
+Window* Window::New(const PositionSize& posSize, const std::string& name, const std::string& className, bool isTransparent)
{
Window* window = new Window();
window->mIsTransparent = isTransparent;
- window->Initialize(posSize, name);
+ window->Initialize(posSize, name, className);
return window;
}
return mSurface;
}
-void Window::SetIndicatorStyle( Dali::Window::IndicatorStyle style )
-{
- mIndicatorStyle = style;
-}
-
void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
{
DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "visible : %d\n", visibleMode );
Window::Window()
: mSurface(NULL),
- mIndicatorStyle(Dali::Window::CHANGEABLE_COLOR),
mIndicatorVisible(Dali::Window::VISIBLE),
mIndicatorIsShown(false),
mShowRotatedIndicatorOnClose(false),
mNextIndicatorOrientation(Dali::Window::PORTRAIT),
mIndicatorOpacityMode(Dali::Window::OPAQUE),
mOverlay(NULL),
- mAdaptor(NULL)
+ mAdaptor(NULL),
+ mEventHandler(NULL),
+ mPreferredOrientation(Dali::Window::PORTRAIT)
{
}
delete mSurface;
}
-void Window::Initialize(const PositionSize& windowPosition, const std::string& name)
+void Window::Initialize(const PositionSize& windowPosition, const std::string& name, const std::string& className)
{
// 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 );
+ SetClass( name, className );
+ windowSurface->Map();
+
+ mSurface = windowSurface;
+
mOrientation = Orientation::New(this);
// create event handler for Wayland window
{
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();
{
}
-void Window::IndicatorClosed( Indicator* indicator )
+void Window::IndicatorClosed( IndicatorInterface* indicator )
{
DALI_LOG_TRACE_METHOD( gWindowLogFilter );
}
}
+void Window::IndicatorVisibilityChanged(bool isVisible)
+{
+ mIndicatorVisibilityChangedSignal.Emit(isVisible);
+}
+
void Window::SetIndicatorActorRotation()
{
DALI_LOG_TRACE_METHOD( gWindowLogFilter );
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;
}
}
return mDragAndDropDetector;
}
+Dali::Any Window::GetNativeHandle() const
+{
+ if(mEventHandler)
+ {
+ return mEventHandler->mEcoreWindow;
+ }
+ else
+ {
+ return Dali::Any();
+ }
+}
+
void Window::OnStart()
{
DoShowIndicator( mIndicatorOrientation );
mAdaptor = NULL;
}
-OrientationPtr Window::GetOrientation()
-{
- return mOrientation;
-}
-
void Window::AddAvailableOrientation(Dali::Window::WindowOrientation orientation)
{
bool found = false;