#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();
bool RestoreAfterFocusLost() const;
/**
- * @copydoc Dali::ImfManager::SetRestoreAferFocusLost()
+ * @copydoc Dali::ImfManager::SetRestoreAfterFocusLost()
*/
- void SetRestoreAferFocusLost( bool toggle );
+ void SetRestoreAfterFocusLost( bool toggle );
/**
* @copydoc Dali::ImfManager::PreEditChanged()
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:
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: