X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fcommon%2Fwindow-impl.h;h=12de6a0d763ea4639e0464db5e087705d28cfefc;hb=49a5bbf8c0b254cfc0f558dae28351c1e7ac2993;hp=3a56b27cab24fa01d4f7ea2f08ea5e1ee95ac8d9;hpb=9eaa0f472de1629358812f464200203bc2ee5bf8;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git
diff --git a/adaptors/common/window-impl.h b/adaptors/common/window-impl.h
index 3a56b27..12de6a0 100644
--- a/adaptors/common/window-impl.h
+++ b/adaptors/common/window-impl.h
@@ -2,7 +2,7 @@
#define __DALI_INTERNAL_WINDOW_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,8 +24,8 @@
// INTERNAL INCLUDES
#include
+#include
#include
-#include
#include
#include
#include
@@ -34,6 +34,7 @@
namespace Dali
{
class Adaptor;
+class RenderSurface;
namespace Integration
{
@@ -44,8 +45,6 @@ namespace Internal
{
namespace Adaptor
{
-class RenderSurface;
-class Indicator;
class Orientation;
class Window;
@@ -55,19 +54,23 @@ typedef IntrusivePtr OrientationPtr;
/**
* Window provides a surface to render onto with orientation & indicator properties.
*/
-class Window : public Dali::BaseObject, public Indicator::Observer, public LifeCycleObserver
+class Window : public Dali::BaseObject, public IndicatorInterface::Observer, public LifeCycleObserver
{
public:
typedef Dali::Window::IndicatorSignalType IndicatorSignalType;
+ typedef Dali::Window::FocusSignalType FocusSignalType;
+ typedef Dali::Window::ResizedSignalType ResizedSignalType;
+ typedef Signal< void () > SignalType;
/**
* Create a new Window. This should only be called once by the Application class
- * @param[in] windowPosition The position and size of the window
+ * @param[in] positionSize The position and size of the window
* @param[in] name The window title
+ * @param[in] className The window class name
* @param[in] isTransparent Whether window is transparent
* @return A newly allocated Window
*/
- static Window* New(const PositionSize& posSize, const std::string& name, bool isTransparent = false);
+ static Window* New(const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent = false);
/**
* Pass the adaptor back to the overlay. This allows the window to access Core's overlay.
@@ -82,11 +85,6 @@ public:
RenderSurface* GetSurface();
/**
- * @copydoc Dali::Window::SetIndicatorStyle()
- */
- void SetIndicatorStyle( Dali::Window::IndicatorStyle style );
-
- /**
* @copydoc Dali::Window::ShowIndicator()
*/
void ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode );
@@ -122,11 +120,6 @@ public:
void Activate();
/**
- * @copydoc Dali::Window::GetOrientation()
- */
- OrientationPtr GetOrientation();
-
- /**
* @copydoc Dali::Window::AddAvailableOrientation()
*/
void AddAvailableOrientation(Dali::Window::WindowOrientation orientation);
@@ -167,10 +160,155 @@ public:
Dali::Any GetNativeHandle() const;
/**
+ * @copydoc Dali::Window::SetAcceptFocus()
+ */
+ void SetAcceptFocus( bool accept );
+
+ /**
+ * @copydoc Dali::Window::IsFocusAcceptable()
+ */
+ bool IsFocusAcceptable() const;
+
+ /**
+ * @copydoc Dali::Window::Show()
+ */
+ void Show();
+
+ /**
+ * @copydoc Dali::Window::Hide()
+ */
+ void Hide();
+
+ /**
+ * @copydoc Dali::Window::IsVisible() const
+ */
+ bool IsVisible() const;
+
+ /**
+ * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
+ */
+ unsigned int GetSupportedAuxiliaryHintCount() const;
+
+ /**
+ * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
+ */
+ std::string GetSupportedAuxiliaryHint( unsigned int index ) const;
+
+ /**
+ * @copydoc Dali::Window::AddAuxiliaryHint()
+ */
+ unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value );
+
+ /**
+ * @copydoc Dali::Window::RemoveAuxiliaryHint()
+ */
+ bool RemoveAuxiliaryHint( unsigned int id );
+
+ /**
+ * @copydoc Dali::Window::SetAuxiliaryHintValue()
+ */
+ bool SetAuxiliaryHintValue( unsigned int id, const std::string& value );
+
+ /**
+ * @copydoc Dali::Window::GetAuxiliaryHintValue()
+ */
+ std::string GetAuxiliaryHintValue( unsigned int id ) const;
+
+ /**
+ * @copydoc Dali::Window::GetAuxiliaryHintId()
+ */
+ unsigned int GetAuxiliaryHintId( const std::string& hint ) const;
+
+ /**
+ * @copydoc Dali::Window::SetInputRegion()
+ */
+ void SetInputRegion( const Rect< int >& inputRegion );
+
+ /**
+ * @copydoc Dali::Window::SetType()
+ */
+ void SetType( Dali::Window::Type type );
+
+ /**
+ * @copydoc Dali::Window::GetType() const
+ */
+ Dali::Window::Type GetType() const;
+
+ /**
+ * @copydoc Dali::Window::SetNotificationLevel()
+ */
+ bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level );
+
+ /**
+ * @copydoc Dali::Window::GetNotificationLevel()
+ */
+ Dali::Window::NotificationLevel::Type GetNotificationLevel() const;
+
+ /**
+ * @copydoc Dali::Window::SetOpaqueState()
+ */
+ void SetOpaqueState( bool opaque );
+
+ /**
+ * @copydoc Dali::Window::IsOpaqueState()
+ */
+ bool IsOpaqueState() const;
+
+ /**
+ * @copydoc Dali::Window::SetScreenOffMode()
+ */
+ bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode);
+
+ /**
+ * @copydoc Dali::Window::GetScreenOffMode()
+ */
+ Dali::Window::ScreenOffMode::Type GetScreenOffMode() const;
+
+ /**
+ * @copydoc Dali::Window::SetBrightness()
+ */
+ bool SetBrightness( int brightness );
+
+ /**
+ * @copydoc Dali::Window::GetBrightness()
+ */
+ int GetBrightness() const;
+
+ /**
+ * @copydoc Dali::Window::SetSize()
+ */
+ void SetSize( Dali::Window::WindowSize size );
+
+ /**
+ * @copydoc Dali::Window::GetSize()
+ */
+ Dali::Window::WindowSize GetSize() const;
+
+ /**
+ * @copydoc Dali::Window::SetPosition()
+ */
+ void SetPosition( Dali::Window::WindowPosition position );
+
+ /**
+ * @copydoc Dali::Window::GetPosition()
+ */
+ Dali::Window::WindowPosition GetPosition() const;
+
+ /**
+ * @copydoc Dali::Window::SetTransparency()
+ */
+ void SetTransparency( bool transparent );
+
+ /**
* Called from Orientation after the Change signal has been sent
*/
void RotationDone( int orientation, int width, int height );
+ /**
+ * Set the indicator visible mode
+ */
+ void SetIndicatorVisibleMode( Dali::Window::IndicatorVisibleMode mode );
+
private:
/**
* Private constructor.
@@ -186,7 +324,7 @@ private:
/**
* Second stage initialization
*/
- void Initialize(const PositionSize& posSize, const std::string& name);
+ void Initialize(const PositionSize& positionSize, const std::string& name, const std::string& className);
/**
* Shows / hides the indicator bar.
@@ -210,20 +348,20 @@ private:
*/
void SetIndicatorProperties( bool isShown, Dali::Window::WindowOrientation lastOrientation );
-private: // Indicator::Observer interface
+private: // IndicatorInterface::Observer interface
/**
- * @copydoc Dali::Internal::Adaptor::Indicator::Observer::IndicatorTypeChanged()
+ * @copydoc Dali::Internal::Adaptor::IndicatorInterface::Observer::IndicatorTypeChanged()
*/
- virtual void IndicatorTypeChanged( Indicator::Type type );
+ virtual void IndicatorTypeChanged( IndicatorInterface::Type type );
/**
- * @copydoc Dali::Internal::Adaptor::Indicator::Observer::IndicatorClosed()
+ * @copydoc Dali::Internal::Adaptor::IndicatorInterface::Observer::IndicatorClosed()
*/
- virtual void IndicatorClosed(Indicator* indicator);
+ virtual void IndicatorClosed( IndicatorInterface* indicator);
/**
- * @copydoc Dali::Internal::Adaptor::Indicator::Observer::IndicatorVisibilityChanged()
+ * @copydoc Dali::Internal::Adaptor::IndicatorInterface::Observer::IndicatorVisibilityChanged()
*/
virtual void IndicatorVisibilityChanged( bool isVisible );
@@ -255,30 +393,51 @@ private: // Adaptor::Observer interface
virtual void OnDestroy();
public: // Signals
+
/**
* The user should connect to this signal to get a timing when indicator was shown / hidden.
*/
IndicatorSignalType& IndicatorVisibilityChangedSignal() { return mIndicatorVisibilityChangedSignal; }
+ /**
+ * @copydoc Dali::Window::FocusChangedSignal()
+ */
+ FocusSignalType& FocusChangedSignal() { return mFocusChangedSignal; }
+
+ /**
+ * @copydoc Dali::Window::ResizedSignal()
+ */
+ ResizedSignalType& ResizedSignal() { return mResizedSignal; }
+
+ /**
+ * This signal is emitted when the window is requesting to be deleted
+ */
+ SignalType& DeleteRequestSignal() { return mDeleteRequestSignal; }
+
private:
- typedef std::vector DiscardedIndicators;
+ typedef std::vector< std::pair< std::string, std::string > > AuxiliaryHints;
RenderSurface* mSurface;
- Dali::Window::IndicatorStyle mIndicatorStyle; ///< indicator style
Dali::Window::IndicatorVisibleMode mIndicatorVisible; ///< public state
bool mIndicatorIsShown:1; ///< private state
bool mShowRotatedIndicatorOnClose:1;
bool mStarted:1;
bool mIsTransparent:1;
bool mWMRotationAppSet:1;
- Indicator* mIndicator;
+ bool mEcoreEventHander:1;
+ bool mIsFocusAcceptable:1;
+ bool mVisible:1;
+ bool mOpaqueState:1;
+ bool mResizeEnabled:1;
+ IndicatorInterface* mIndicator;
Dali::Window::WindowOrientation mIndicatorOrientation;
Dali::Window::WindowOrientation mNextIndicatorOrientation;
Dali::Window::IndicatorBgOpacity mIndicatorOpacityMode;
Integration::SystemOverlay* mOverlay;
Adaptor* mAdaptor;
Dali::DragAndDropDetector mDragAndDropDetector;
+ Dali::Window::Type mType;
struct EventHandler;
EventHandler* mEventHandler;
@@ -287,8 +446,14 @@ private:
std::vector mAvailableOrientations;
Dali::Window::WindowOrientation mPreferredOrientation;
+ std::vector< std::string > mSupportedAuxiliaryHints;
+ AuxiliaryHints mAuxiliaryHints;
+
// Signals
IndicatorSignalType mIndicatorVisibilityChangedSignal;
+ FocusSignalType mFocusChangedSignal;
+ ResizedSignalType mResizedSignal;
+ SignalType mDeleteRequestSignal;
};
} // namespace Adaptor