Moved ECore specific indicator-impl out of common
[platform/core/uifw/dali-adaptor.git] / adaptors / wayland / imf-manager-impl.h
index fe6e477..ff5c61f 100644 (file)
 #include <Ecore_Wayland.h>
 
 #include <dali/public-api/object/base-object.h>
-#include <imf-manager.h>
 #include <dali/integration-api/events/key-event-integ.h>
 
 // INTERNAL INCLUDES
-
+#include <imf-manager.h>
 
 namespace Dali
 {
 
+class RenderSurface;
+
 namespace Internal
 {
 
 namespace Adaptor
 {
 
-class RenderSurface;
-
 class ImfManager : public Dali::BaseObject
 {
 public:
-  typedef Dali::ImfManager::ImfManagerSignalV2 ImfManagerSignalV2;
-  typedef Dali::ImfManager::ImfEventSignalV2 ImfEventSignalV2;
+  typedef Dali::ImfManager::ImfManagerSignalType ImfManagerSignalType;
+  typedef Dali::ImfManager::ImfEventSignalType ImfEventSignalType;
 
 public:
 
   /**
-   * Create the IMF manager.
+   * Check whether the ImfManager is available.
+   * @return true if available, false otherwise
+   */
+  static bool IsAvailable();
+
+  /**
+   * Get the IMF manager instance, it creates the instance if it has not already been created.
+   * Internally, a check should be made using IsAvailable() before this is called as we do not want
+   * to create an instance if not needed by applications.
+   * @see IsAvailable()
    */
   static Dali::ImfManager Get();
 
@@ -92,9 +100,9 @@ public:
   bool RestoreAfterFocusLost() const;
 
   /**
-   * @copydoc Dali::ImfManager::SetRestoreAferFocusLost()
+   * @copydoc Dali::ImfManager::SetRestoreAfterFocusLost()
    */
-  void SetRestoreAferFocusLost( bool toggle );
+  void SetRestoreAfterFocusLost( bool toggle );
 
   /**
    * @copydoc Dali::ImfManager::PreEditChanged()
@@ -123,36 +131,36 @@ public:
   void NotifyCursorPosition();
 
   /**
-   * @copydoc Dali::ImfManager::GetCursorPosition()
+   * @copydoc Dali::ImfManager::SetCursorPosition()
    */
-  int GetCursorPosition();
+  void SetCursorPosition( unsigned int cursorPosition );
 
   /**
-   * @copydoc Dali::ImfManager::SetCursorPosition()
+   * @copydoc Dali::ImfManager::GetCursorPosition()
    */
-  void SetCursorPosition( unsigned int cursorPosition );
+  unsigned int GetCursorPosition() const;
 
   /**
    * @copydoc Dali::ImfManager::SetSurroundingText()
    */
-  void SetSurroundingText( std::string text );
+  void SetSurroundingText( const std::string& text );
 
   /**
    * @copydoc Dali::ImfManager::GetSurroundingText()
    */
-  std::string GetSurroundingText();
+  const std::string& GetSurroundingText() const;
 
 public:  // Signals
 
   /**
    * @copydoc Dali::ImfManager::ActivatedSignal()
    */
-  ImfManagerSignalV2& ActivatedSignal() { return mActivatedSignalV2; }
+  ImfManagerSignalType& ActivatedSignal() { return mActivatedSignal; }
 
   /**
    * @copydoc Dali::ImfManager::EventReceivedSignal()
    */
-  ImfEventSignalV2& EventReceivedSignal() { return mEventSignalV2; }
+  ImfEventSignalType& EventReceivedSignal() { return mEventSignal; }
 
 protected:
 
@@ -182,8 +190,8 @@ private:
 
   std::vector<Dali::Integration::KeyEvent> mKeyEvents; ///< Stores key events to be sent from idle call-back.
 
-  ImfManagerSignalV2      mActivatedSignalV2;
-  ImfEventSignalV2        mEventSignalV2;
+  ImfManagerSignalType      mActivatedSignal;
+  ImfEventSignalType        mEventSignal;
 
 public: