[4.0] Change hint flag when load glyph from FreeType
[platform/core/uifw/dali-adaptor.git] / adaptors / common / window-impl.h
index ceed80a..0f95871 100644 (file)
@@ -30,7 +30,6 @@
 #include <orientation.h>
 #include <render-surface.h>
 #include <drag-and-drop-detector.h>
-#include <window-devel.h>
 
 namespace Dali
 {
@@ -59,18 +58,19 @@ class Window : public Dali::BaseObject, public IndicatorInterface::Observer, pub
 {
 public:
   typedef Dali::Window::IndicatorSignalType IndicatorSignalType;
-  typedef Dali::DevelWindow::FocusSignalType FocusSignalType;
+  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, const std::string& className, 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.
@@ -160,104 +160,155 @@ public:
   Dali::Any GetNativeHandle() const;
 
   /**
-   * @brief Sets whether window accepts focus or not.
-   *
-   * @param[in] accept If focus is accepted or not. Default is true.
+   * @copydoc Dali::Window::SetAcceptFocus()
    */
   void SetAcceptFocus( bool accept );
 
   /**
-   * @brief Returns whether window accepts focus or not.
-   *
-   * @param[in] window The window to accept focus
-   * @return True if the window accept focus, false otherwise
+   * @copydoc Dali::Window::IsFocusAcceptable()
    */
-  bool IsFocusAcceptable();
+  bool IsFocusAcceptable() const;
 
   /**
-   * @brief Shows the window if it is hidden.
+   * @copydoc Dali::Window::Show()
    */
   void Show();
 
   /**
-   * @brief Hides the window if it is showing.
+   * @copydoc Dali::Window::Hide()
    */
   void Hide();
 
   /**
-   * @brief Returns whether the window is showing or not.
-   * @return True if the window is showing, false otherwise.
+   * @copydoc Dali::Window::IsVisible() const
    */
   bool IsVisible() const;
 
   /**
-   * Called from Orientation after the Change signal has been sent
-   */
-  void RotationDone( int orientation, int width, int height );
-
-  /**
-   * @brief Gets the count of supported auxiliary hints of the window.
-   * @return The number of supported auxiliary hints.
-   *
-   * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
-   * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
+   * @copydoc Dali::Window::GetSupportedAuxiliaryHintCount()
    */
-   unsigned int GetSupportedAuxiliaryHintCount();
+   unsigned int GetSupportedAuxiliaryHintCount() const;
 
-  /**
-   * @brief Gets the supported auxiliary hint string of the window.
-   * @param[in] index The index of the supported auxiliary hint lists
-   * @return The auxiliary hint string of the index.
-   *
-   * @note The window auxiliary hint is the value which is used to decide which actions should be made available to the user by the window manager.
-   * If you want to set specific hint to your window, then you should check whether it exists in the supported auxiliary hints.
-   */
-  std::string GetSupportedAuxiliaryHint( unsigned int index );
+   /**
+    * @copydoc Dali::Window::GetSupportedAuxiliaryHint()
+    */
+  std::string GetSupportedAuxiliaryHint( unsigned int index ) const;
 
   /**
-   * @brief Creates an auxiliary hint of the window.
-   * @param[in] hint The auxiliary hint string.
-   * @param[in] value The value string.
-   * @return The ID of created auxiliary hint, or @c 0 on failure.
+   * @copydoc Dali::Window::AddAuxiliaryHint()
    */
   unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value );
 
   /**
-   * @brief Removes an auxiliary hint of the window.
-   * @param[in] id The ID of the auxiliary hint.
-   * @return True if no error occurred, false otherwise.
+   * @copydoc Dali::Window::RemoveAuxiliaryHint()
    */
   bool RemoveAuxiliaryHint( unsigned int id );
 
   /**
-   * @brief Changes a value of the auxiliary hint.
-   * @param[in] id The auxiliary hint ID.
-   * @param[in] value The value string to be set.
-   * @return True if no error occurred, false otherwise.
+   * @copydoc Dali::Window::SetAuxiliaryHintValue()
    */
   bool SetAuxiliaryHintValue( unsigned int id, const std::string& value );
 
   /**
-   * @brief Gets a value of the auxiliary hint.
-   * @param[in] id The auxiliary hint ID.
-   * @return The string value of the auxiliary hint ID, or an empty string if none exists.
+   * @copydoc Dali::Window::GetAuxiliaryHintValue()
    */
   std::string GetAuxiliaryHintValue( unsigned int id ) const;
 
   /**
-   * @brief Gets a ID of the auxiliary hint string.
-   * @param[in] hint The auxiliary hint string.
-   * @return The ID of the auxiliary hint string, or @c 0 if none exists.
+   * @copydoc Dali::Window::GetAuxiliaryHintId()
    */
   unsigned int GetAuxiliaryHintId( const std::string& hint ) const;
 
   /**
-   * @brief Sets a region to get input events.
-   * @param[in] inputRegion The rectangle region to get input events.
-   * @note To set an empty region, pass width and height as 0. An empty input region means the entire window will accept input events.
+   * @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.
@@ -273,7 +324,7 @@ private:
   /**
    * Second stage initialization
    */
-  void Initialize(const PositionSize& posSize, const std::string& name, const std::string& className);
+  void Initialize(const PositionSize& positionSize, const std::string& name, const std::string& className);
 
   /**
    * Shows / hides the indicator bar.
@@ -349,11 +400,16 @@ public: // Signals
   IndicatorSignalType& IndicatorVisibilityChangedSignal() { return mIndicatorVisibilityChangedSignal; }
 
   /**
-   * The user should connect to this signal to get a timing when window gains focus or loses focus.
+   * @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; }
@@ -372,6 +428,9 @@ private:
   bool                             mEcoreEventHander:1;
   bool                             mIsFocusAcceptable:1;
   bool                             mVisible:1;
+  bool                             mIconified:1;
+  bool                             mOpaqueState:1;
+  bool                             mResizeEnabled:1;
   IndicatorInterface*              mIndicator;
   Dali::Window::WindowOrientation  mIndicatorOrientation;
   Dali::Window::WindowOrientation  mNextIndicatorOrientation;
@@ -379,6 +438,7 @@ private:
   Integration::SystemOverlay*      mOverlay;
   Adaptor*                         mAdaptor;
   Dali::DragAndDropDetector        mDragAndDropDetector;
+  Dali::Window::Type          mType;
 
   struct EventHandler;
   EventHandler*                    mEventHandler;
@@ -393,6 +453,7 @@ private:
   // Signals
   IndicatorSignalType mIndicatorVisibilityChangedSignal;
   FocusSignalType     mFocusChangedSignal;
+  ResizedSignalType   mResizedSignal;
   SignalType          mDeleteRequestSignal;
 };