*/
// EXTERNAL INCLUDES
+#include <functional>
+#include <memory>
+#include <dali/public-api/actors/actor.h>
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/object/base-object.h>
#include <dali/integration-api/events/key-event-integ.h>
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/input-method-context.h>
-#include <memory>
-
namespace Dali
{
using KeyboardTypeSignalType = Dali::InputMethodContext::KeyboardTypeSignalType;
using LanguageChangedSignalType = Dali::InputMethodContext::LanguageChangedSignalType;
using KeyboardResizedSignalType = Dali::InputMethodContext::KeyboardResizedSignalType;
+ using ContentReceivedSignalType = Dali::InputMethodContext::ContentReceivedSignalType;
public:
/**
* Create a new input method context instance.
*/
- static InputMethodContextPtr New();
+ static InputMethodContextPtr New( Dali::Actor actor );
/**
* Initialize the object.
/**
* @copydoc Dali::InputMethodContext::PreEditChanged()
*/
- virtual void PreEditChanged( void *data, ImfContext* imfContext, void *event_info ) {}
+ virtual void PreEditChanged( void *data, ImfContext* imfContext, void *eventInfo ) {}
/**
* @copydoc Dali::InputMethodContext::CommitReceived()
*/
- virtual void CommitReceived( void *data, ImfContext* imfContext, void *event_info ) {}
+ virtual void CommitReceived( void *data, ImfContext* imfContext, void *eventInfo ) {}
/**
* @copydoc Dali::InputMethodContext::RetrieveSurrounding()
/**
* @copydoc Dali::InputMethodContext::DeleteSurrounding()
*/
- virtual void DeleteSurrounding( void *data, ImfContext* imfContext, void *event_info ) {}
+ virtual void DeleteSurrounding( void *data, ImfContext* imfContext, void *eventInfo ) {}
/**
* @copydoc Dali::InputMethodContext::SendPrivateCommand()
*/
- virtual void SendPrivateCommand( void* data, ImfContext* imfContext, void* event_info ) {}
+ virtual void SendPrivateCommand( void* data, ImfContext* imfContext, void* eventInfo ) {}
+
+ /**
+ * @copydoc Dali::InputMethodContext::SendCommitContent()
+ */
+ virtual void SendCommitContent( void* data, ImfContext* imfContext, void* eventInfo ) {}
// Cursor related
/**
virtual std::string GetInputPanelLocale() { return std::string(); }
/**
+ * @copydoc Dali::InputMethodContext::SetContentMIMETypes()
+ */
+ virtual void SetContentMIMETypes( const std::string& mimeTypes ) {}
+
+ /**
* @copydoc Dali::InputMethodContext::FilterEventKey()
*/
virtual bool FilterEventKey( const Dali::KeyEvent& keyEvent ) { return false; }
*/
virtual Dali::InputMethodContext::InputPanelLanguage GetInputPanelLanguage() const { return Dali::InputMethodContext::InputPanelLanguage(); }
+ /**
+ * @copydoc Dali::InputMethodContext::SetInputPanelPosition()
+ */
+ virtual void SetInputPanelPosition( unsigned int x, unsigned int y ) {}
+
+ /**
+ * @copydoc Dali::InputMethodContext::GetPreeditStyle()
+ */
+ virtual void GetPreeditStyle( Dali::InputMethodContext::PreEditAttributeDataContainer& attrs ) const {}
+
public: // Signals
/**
*/
KeyboardTypeSignalType& KeyboardTypeChangedSignal() { return mKeyboardTypeChangedSignal; }
+ /**
+ * @copydoc Dali::InputMethodContext::ContentReceivedSignal()
+ */
+ ContentReceivedSignalType& ContentReceivedSignal() { return mContentReceivedSignal; }
+
public:
/**
* Constructor
*/
- InputMethodContext() = default;
+ InputMethodContext();
/**
* Destructor
InputMethodContext& operator=( InputMethodContext& ) = delete;
protected:
+ /**
+ * @brief Struct for providing Operation enumeration
+ */
+ struct Operation
+ {
+ enum Type
+ {
+ ALLOW_TEXT_PREDICTION = 0,
+ AUTO_ENABLE_INPUT_PANEL,
+ NOTIFY_TEXT_INPUT_MULTILINE,
+ SET_CONTENT_MIME_TYPES,
+ SET_INPUT_PANEL_DATA,
+ SET_INPUT_PANEL_LANGUAGE,
+ SET_INPUT_PANEL_POSITION,
+ SET_RETURN_KEY_STATE,
+ MAX_COUNT
+ };
+ };
+
+ using OperationList = std::vector< std::function<void()> >;
+
+ /**
+ * @brief Apply backup operations to the InputMethodContext
+ */
+ void ApplyBackupOperations();
+
+protected:
ActivatedSignalType mActivatedSignal;
KeyboardEventSignalType mEventSignal;
KeyboardResizedSignalType mKeyboardResizeSignal;
LanguageChangedSignalType mKeyboardLanguageChangedSignal;
KeyboardTypeSignalType mKeyboardTypeChangedSignal;
+ ContentReceivedSignalType mContentReceivedSignal;
+ OperationList mBackupOperations;
public: