Add to set MIME type to the input panel and add the callback 03/205903/6
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 10 May 2019 07:55:10 +0000 (16:55 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 25 Jul 2019 04:19:34 +0000 (13:19 +0900)
- Added an API to set the allowed MIME type to deliver to the input panel.
- Added a callback to receive the content of the input method URI.

Change-Id: I6fb970d392fb66a438bd4590440c01503c572c45
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali/devel-api/adaptor-framework/input-method-context.cpp
dali/devel-api/adaptor-framework/input-method-context.h
dali/internal/input/common/input-method-context-impl.h
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.cpp
dali/internal/input/tizen-wayland/input-method-context-impl-ecore-wl.h
dali/internal/input/ubuntu-x11/input-method-context-impl-x.cpp
dali/internal/input/ubuntu-x11/input-method-context-impl-x.h
dali/internal/input/windows/input-method-context-impl-win.cpp
dali/internal/input/windows/input-method-context-impl-win.h

index a63c3e2..e5deaca 100755 (executable)
@@ -181,6 +181,11 @@ std::string InputMethodContext::GetInputPanelLocale()
   return Internal::Adaptor::InputMethodContext::GetImplementation(*this).GetInputPanelLocale();
 }
 
+void InputMethodContext::SetContentMIMETypes( const std::string& mimeTypes )
+{
+  Internal::Adaptor::InputMethodContext::GetImplementation(*this).SetContentMIMETypes( mimeTypes );
+}
+
 bool InputMethodContext::FilterEventKey( const Dali::KeyEvent& keyEvent )
 {
   return Internal::Adaptor::InputMethodContext::GetImplementation(*this).FilterEventKey( keyEvent );
@@ -237,6 +242,11 @@ InputMethodContext::KeyboardTypeSignalType& InputMethodContext::KeyboardTypeChan
   return Internal::Adaptor::InputMethodContext::GetImplementation(*this).KeyboardTypeChangedSignal();
 }
 
+InputMethodContext::ContentReceivedSignalType& InputMethodContext::ContentReceivedSignal()
+{
+  return Internal::Adaptor::InputMethodContext::GetImplementation(*this).ContentReceivedSignal();
+}
+
 InputMethodContext::InputMethodContext(Internal::Adaptor::InputMethodContext *impl)
   : BaseHandle(impl)
 {
index 5a3950c..e67f5fd 100755 (executable)
@@ -177,6 +177,7 @@ public:
   typedef Signal< void ( KeyboardType ) > KeyboardTypeSignalType; ///< keyboard type
   typedef Signal< void ( int ) > KeyboardResizedSignalType;  ///< Keyboard resized signal
   typedef Signal< void ( int ) > LanguageChangedSignalType;  ///< Language changed signal
+  typedef Signal< void ( const std::string&, const std::string&, const std::string& ) > ContentReceivedSignalType; ///< Content received signal
 
 public:
 
@@ -397,6 +398,16 @@ public:
   std::string GetInputPanelLocale();
 
   /**
+   * @brief Sets the allowed MIME Types to deliver to the input panel.
+   *
+   * ex) std::string mimeTypes = "text/plain,image/png,image/gif,application/pdf";
+   *
+   * You can receive a media content URI and its MIME type from ContentReceivedSignal(). @see ContentReceivedSignal
+   * @param[in] mimeTypes The allowed MIME types
+   */
+  void SetContentMIMETypes( const std::string& mimeTypes );
+
+  /**
    * @brief Process event key down or up, whether filter a key to isf.
    *
    * @param[in] keyEvent The event key to be handled.
@@ -504,6 +515,18 @@ public:
    */
   KeyboardTypeSignalType& KeyboardTypeChangedSignal();
 
+  /**
+   * @brief Connect to this signal to be notified when the content, such as images, of input method is received.
+   *
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallbackName( const std::string& contentUri, const std::string& description, const std::string& contentMIMEType );
+   * @endcode
+   *
+   * @return The signal to connect to.
+   */
+  ContentReceivedSignalType& ContentReceivedSignal();
+
 public:
 
   /**
index 49387c1..33ab2a6 100755 (executable)
@@ -54,6 +54,7 @@ public:
   using KeyboardTypeSignalType = Dali::InputMethodContext::KeyboardTypeSignalType;
   using LanguageChangedSignalType = Dali::InputMethodContext::LanguageChangedSignalType;
   using KeyboardResizedSignalType = Dali::InputMethodContext::KeyboardResizedSignalType;
+  using ContentReceivedSignalType = Dali::InputMethodContext::ContentReceivedSignalType;
 
 public:
 
@@ -117,12 +118,12 @@ public:
   /**
    * @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()
@@ -133,12 +134,17 @@ public:
   /**
    * @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
   /**
@@ -232,6 +238,11 @@ public:
   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; }
@@ -288,6 +299,11 @@ public:  // Signals
    */
   KeyboardTypeSignalType& KeyboardTypeChangedSignal() { return mKeyboardTypeChangedSignal; }
 
+  /**
+   * @copydoc Dali::InputMethodContext::ContentReceivedSignal()
+   */
+  ContentReceivedSignalType& ContentReceivedSignal() { return mContentReceivedSignal; }
+
 public:
 
   /**
@@ -313,6 +329,7 @@ protected:
   KeyboardResizedSignalType  mKeyboardResizeSignal;
   LanguageChangedSignalType  mKeyboardLanguageChangedSignal;
   KeyboardTypeSignalType     mKeyboardTypeChangedSignal;
+  ContentReceivedSignalType  mContentReceivedSignal;
 
 public:
 
index accf6f2..fbff9ad 100755 (executable)
@@ -123,21 +123,21 @@ size_t Utf8SequenceLength(const unsigned char leadByte)
 }
 
 // Static function calls used by ecore 'c' style callback registration
-void Commit( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+void Commit( void *data, Ecore_IMF_Context *imfContext, void *eventInfo )
 {
   if ( data )
   {
     InputMethodContextEcoreWl* inputMethodContext = reinterpret_cast< InputMethodContextEcoreWl* > ( data );
-    inputMethodContext->CommitReceived( data, imfContext, event_info );
+    inputMethodContext->CommitReceived( data, imfContext, eventInfo );
   }
 }
 
-void PreEdit( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+void PreEdit( void *data, Ecore_IMF_Context *imfContext, void *eventInfo )
 {
   if ( data )
   {
     InputMethodContextEcoreWl* inputMethodContext = reinterpret_cast< InputMethodContextEcoreWl* > ( data );
-    inputMethodContext->PreEditChanged( data, imfContext, event_info );
+    inputMethodContext->PreEditChanged( data, imfContext, eventInfo );
   }
 }
 
@@ -235,24 +235,36 @@ void InputPanelKeyboardTypeChangedCallback( void *data, Ecore_IMF_Context *conte
  * Called when an IMF delete surrounding event is received.
  * Here we tell the application that it should delete a certain range.
  */
-void ImfDeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+void ImfDeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *eventInfo )
 {
   if ( data )
   {
     InputMethodContextEcoreWl* inputMethodContext = reinterpret_cast< InputMethodContextEcoreWl* > ( data );
-    inputMethodContext->DeleteSurrounding( data, imfContext, event_info );
+    inputMethodContext->DeleteSurrounding( data, imfContext, eventInfo );
   }
 }
 
 /**
  * Called when the input method sends a private command.
  */
-void PrivateCommand( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+void PrivateCommand( void *data, Ecore_IMF_Context *imfContext, void *eventInfo )
 {
   if ( data )
   {
     InputMethodContextEcoreWl* inputMethodContext = reinterpret_cast< InputMethodContextEcoreWl* > ( data );
-    inputMethodContext->SendPrivateCommand( data, imfContext, event_info );
+    inputMethodContext->SendPrivateCommand( data, imfContext, eventInfo );
+  }
+}
+
+/**
+ * Called when the input method commits content, such as an image.
+ */
+void CommitContent( void *data, Ecore_IMF_Context *imfContext, void *eventInfo )
+{
+  if ( data )
+  {
+    InputMethodContextEcoreWl* inputMethodContext = reinterpret_cast< InputMethodContextEcoreWl* > ( data );
+    inputMethodContext->SendCommitContent( data, imfContext, eventInfo );
   }
 }
 
@@ -377,6 +389,7 @@ void InputMethodContextEcoreWl::ConnectCallbacks()
     ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_COMMIT,               Commit,     this );
     ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING,   ImfDeleteSurrounding, this );
     ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_PRIVATE_COMMAND_SEND, PrivateCommand, this );
+    ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_COMMIT_CONTENT,       CommitContent, this );
 
     ecore_imf_context_input_panel_event_callback_add( mIMFContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT,    InputPanelStateChangeCallback, this );
     ecore_imf_context_input_panel_event_callback_add( mIMFContext, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, InputPanelLanguageChangeCallback, this );
@@ -397,6 +410,7 @@ void InputMethodContextEcoreWl::DisconnectCallbacks()
     ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_COMMIT,               Commit );
     ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING,   ImfDeleteSurrounding );
     ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_PRIVATE_COMMAND_SEND, PrivateCommand );
+    ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_COMMIT_CONTENT,       CommitContent );
 
     ecore_imf_context_input_panel_event_callback_del( mIMFContext, ECORE_IMF_INPUT_PANEL_STATE_EVENT,    InputPanelStateChangeCallback     );
     ecore_imf_context_input_panel_event_callback_del( mIMFContext, ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, InputPanelLanguageChangeCallback  );
@@ -470,7 +484,7 @@ void InputMethodContextEcoreWl::SetRestoreAfterFocusLost( bool toggle )
  * We are still predicting what the user is typing.  The latest string is what the InputMethodContext module thinks
  * the user wants to type.
  */
-void InputMethodContextEcoreWl::PreEditChanged( void*, ImfContext* imfContext, void* event_info )
+void InputMethodContextEcoreWl::PreEditChanged( void*, ImfContext* imfContext, void* eventInfo )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::PreEditChanged\n" );
   auto context = reinterpret_cast<Ecore_IMF_Context*>(imfContext);
@@ -548,13 +562,13 @@ void InputMethodContextEcoreWl::PreEditChanged( void*, ImfContext* imfContext, v
   free( preEditString );
 }
 
-void InputMethodContextEcoreWl::CommitReceived( void*, ImfContext* imfContext, void* event_info )
+void InputMethodContextEcoreWl::CommitReceived( void*, ImfContext* imfContext, void* eventInfo )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::CommitReceived\n" );
 
   if ( Dali::Adaptor::IsAvailable() )
   {
-    const std::string keyString( static_cast<char*>( event_info ) );
+    const std::string keyString( static_cast<char*>( eventInfo ) );
 
     Dali::InputMethodContext handle( this );
     Dali::InputMethodContext::EventData eventData( Dali::InputMethodContext::COMMIT, keyString, 0, 0 );
@@ -605,13 +619,13 @@ bool InputMethodContextEcoreWl::RetrieveSurrounding( void* data, ImfContext* imf
  * Called when an InputMethodContext delete surrounding event is received.
  * Here we tell the application that it should delete a certain range.
  */
-void InputMethodContextEcoreWl::DeleteSurrounding( void* data, ImfContext* imfContext, void* event_info )
+void InputMethodContextEcoreWl::DeleteSurrounding( void* data, ImfContext* imfContext, void* eventInfo )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::DeleteSurrounding\n" );
 
   if( Dali::Adaptor::IsAvailable() )
   {
-    Ecore_IMF_Event_Delete_Surrounding* deleteSurroundingEvent = static_cast<Ecore_IMF_Event_Delete_Surrounding*>( event_info );
+    Ecore_IMF_Event_Delete_Surrounding* deleteSurroundingEvent = static_cast<Ecore_IMF_Event_Delete_Surrounding*>( eventInfo );
 
     Dali::InputMethodContext::EventData imfData( Dali::InputMethodContext::DELETE_SURROUNDING, std::string(), deleteSurroundingEvent->offset, deleteSurroundingEvent->n_chars );
     Dali::InputMethodContext handle( this );
@@ -622,13 +636,13 @@ void InputMethodContextEcoreWl::DeleteSurrounding( void* data, ImfContext* imfCo
 /**
  * Called when the input method sends a private command.
  */
-void InputMethodContextEcoreWl::SendPrivateCommand( void* data, ImfContext* imfContext, void* event_info )
+void InputMethodContextEcoreWl::SendPrivateCommand( void* data, ImfContext* imfContext, void* eventInfo )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::SendPrivateCommand\n" );
 
   if( Dali::Adaptor::IsAvailable() )
   {
-    const char* privateCommandSendEvent = static_cast<const char*>( event_info );
+    const char* privateCommandSendEvent = static_cast<const char*>( eventInfo );
 
     Dali::InputMethodContext::EventData imfData( Dali::InputMethodContext::PRIVATE_COMMAND, privateCommandSendEvent, 0, 0 );
     Dali::InputMethodContext handle( this );
@@ -636,6 +650,25 @@ void InputMethodContextEcoreWl::SendPrivateCommand( void* data, ImfContext* imfC
   }
 }
 
+/**
+ * Called when the input method commits content, such as an image.
+ */
+void InputMethodContextEcoreWl::SendCommitContent( void* data, ImfContext* imfContext, void* eventInfo )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::SendCommitContent\n" );
+
+  if( Dali::Adaptor::IsAvailable() )
+  {
+    Ecore_IMF_Event_Commit_Content* commitContent = static_cast<Ecore_IMF_Event_Commit_Content *>( eventInfo );
+    if( commitContent )
+    {
+      DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::SendCommitContent commit content : %s, description : %s, mime type : %s\n",
+                                                 commitContent->content_uri, commitContent->description, commitContent->mime_types );
+      mContentReceivedSignal.Emit( commitContent->content_uri, commitContent->description, commitContent->mime_types );
+    }
+  }
+}
+
 void InputMethodContextEcoreWl::NotifyCursorPosition()
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::NotifyCursorPosition\n" );
@@ -914,6 +947,16 @@ std::string InputMethodContextEcoreWl::GetInputPanelLocale()
   return locale;
 }
 
+void InputMethodContextEcoreWl::SetContentMIMETypes( const std::string& mimeTypes )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::SetContentMIMETypes\n" );
+
+  if( mIMFContext )
+  {
+    ecore_imf_context_mime_type_accept_set( mIMFContext, mimeTypes.c_str() );
+  }
+}
+
 bool InputMethodContextEcoreWl::FilterEventKey( const Dali::KeyEvent& keyEvent )
 {
   bool eventHandled( false );
index ad7117c..3d2e170 100755 (executable)
@@ -108,12 +108,12 @@ public:
   /**
    * @copydoc Dali::InputMethodContext::PreEditChanged()
    */
-  void PreEditChanged( void *data, ImfContext *imfContext, void *event_info ) override;
+  void PreEditChanged( void *data, ImfContext *imfContext, void *eventInfo ) override;
 
   /**
    * @copydoc Dali::InputMethodContext::NotifyCursorPosition()
    */
-  void CommitReceived( void *data, ImfContext *imfContext, void *event_info ) override;
+  void CommitReceived( void *data, ImfContext *imfContext, void *eventInfo ) override;
 
   /**
    * @copydoc Dali::InputMethodContext::NotifyCursorPosition()
@@ -123,12 +123,17 @@ public:
   /**
    * @copydoc Dali::InputMethodContext::DeleteSurrounding()
    */
-  void DeleteSurrounding( void *data, ImfContext *imfContext, void *event_info ) override;
+  void DeleteSurrounding( void *data, ImfContext *imfContext, void *eventInfo ) override;
 
  /**
   * @copydoc Dali::InputMethodContext::SendPrivateCommand()
   */
-  void SendPrivateCommand( void* data, ImfContext* imfContext, void* event_info ) override;
+  void SendPrivateCommand( void* data, ImfContext* imfContext, void* eventInfo ) override;
+
+  /**
+   * @copydoc Dali::InputMethodContext::SendCommitContent()
+   */
+   void SendCommitContent( void* data, ImfContext* imfContext, void* eventInfo ) override;
 
   // Cursor related
   /**
@@ -222,6 +227,11 @@ public:
   std::string GetInputPanelLocale() override;
 
   /**
+   * @copydoc Dali::InputMethodContext::SetContentMIMETypes()
+   */
+  void SetContentMIMETypes( const std::string& mimeTypes ) override;
+
+  /**
    * @copydoc Dali::InputMethodContext::FilterEventKey()
    */
   bool FilterEventKey( const Dali::KeyEvent& keyEvent ) override;
index d398555..60cba35 100755 (executable)
@@ -76,21 +76,21 @@ size_t Utf8SequenceLength(const unsigned char leadByte)
 }
 
 // Static function calls used by ecore 'c' style callback registration
-void Commit( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+void Commit( void *data, Ecore_IMF_Context *imfContext, void *eventInfo )
 {
   if ( data )
   {
     InputMethodContextX* inputMethodContext = reinterpret_cast< InputMethodContextX* > ( data );
-    inputMethodContext->CommitReceived( data, imfContext, event_info );
+    inputMethodContext->CommitReceived( data, imfContext, eventInfo );
   }
 }
 
-void PreEdit( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+void PreEdit( void *data, Ecore_IMF_Context *imfContext, void *eventInfo )
 {
   if ( data )
   {
     InputMethodContextX* inputMethodContext = reinterpret_cast< InputMethodContextX* > ( data );
-    inputMethodContext->PreEditChanged( data, imfContext, event_info );
+    inputMethodContext->PreEditChanged( data, imfContext, eventInfo );
   }
 }
 
@@ -111,12 +111,12 @@ Eina_Bool ImfRetrieveSurrounding(void *data, Ecore_IMF_Context *imfContext, char
  * Called when an InputMethodContext delete surrounding event is received.
  * Here we tell the application that it should delete a certain range.
  */
-void ImfDeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info )
+void ImfDeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *eventInfo )
 {
   if ( data )
   {
     InputMethodContextX* inputMethodContext = reinterpret_cast< InputMethodContextX* > ( data );
-    inputMethodContext->DeleteSurrounding( data, imfContext, event_info );
+    inputMethodContext->DeleteSurrounding( data, imfContext, eventInfo );
   }
 }
 
@@ -314,7 +314,7 @@ void InputMethodContextX::SetRestoreAfterFocusLost( bool toggle )
  * We are still predicting what the user is typing.  The latest string is what the InputMethodContext module thinks
  * the user wants to type.
  */
-void InputMethodContextX::PreEditChanged( void*, ImfContext* imfContext, void* event_info )
+void InputMethodContextX::PreEditChanged( void*, ImfContext* imfContext, void* eventInfo )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::PreEditChanged\n" );
   auto context = reinterpret_cast<Ecore_IMF_Context*>(imfContext);
@@ -391,13 +391,13 @@ void InputMethodContextX::PreEditChanged( void*, ImfContext* imfContext, void* e
   free( preEditString );
 }
 
-void InputMethodContextX::CommitReceived( void*, ImfContext* imfContext, void* event_info )
+void InputMethodContextX::CommitReceived( void*, ImfContext* imfContext, void* eventInfo )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::CommitReceived\n" );
 
   if ( Dali::Adaptor::IsAvailable() )
   {
-    const std::string keyString( static_cast<char*>( event_info ) );
+    const std::string keyString( static_cast<char*>( eventInfo ) );
 
     Dali::InputMethodContext handle( this );
     Dali::InputMethodContext::EventData eventData( Dali::InputMethodContext::COMMIT, keyString, 0, 0 );
@@ -446,13 +446,13 @@ bool InputMethodContextX::RetrieveSurrounding( void* data, ImfContext* imfContex
  * Called when an InputMethodContext delete surrounding event is received.
  * Here we tell the application that it should delete a certain range.
  */
-void InputMethodContextX::DeleteSurrounding( void* data, ImfContext* imfContext, void* event_info )
+void InputMethodContextX::DeleteSurrounding( void* data, ImfContext* imfContext, void* eventInfo )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::DeleteSurrounding\n" );
 
   if( Dali::Adaptor::IsAvailable() )
   {
-    Ecore_IMF_Event_Delete_Surrounding* deleteSurroundingEvent = static_cast<Ecore_IMF_Event_Delete_Surrounding*>( event_info );
+    Ecore_IMF_Event_Delete_Surrounding* deleteSurroundingEvent = static_cast<Ecore_IMF_Event_Delete_Surrounding*>( eventInfo );
 
     Dali::InputMethodContext::EventData imfData( Dali::InputMethodContext::DELETE_SURROUNDING, std::string(), deleteSurroundingEvent->offset, deleteSurroundingEvent->n_chars );
     Dali::InputMethodContext handle( this );
@@ -703,6 +703,12 @@ std::string InputMethodContextX::GetInputPanelLocale()
   return locale;
 }
 
+void InputMethodContextX::SetContentMIMETypes( const std::string& mimeTypes )
+{
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::SetContentMIMETypes\n" );
+  // ecore_imf_context_mime_type_accept_set() is supported from ecore-imf 1.20.0 version.
+}
+
 bool InputMethodContextX::FilterEventKey( const Dali::KeyEvent& keyEvent )
 {
   bool eventHandled( false );
index 4c2b1b5..894d0f1 100755 (executable)
@@ -112,12 +112,12 @@ public:
   /**
    * @copydoc Dali::InputMethodContext::PreEditChanged()
    */
-  void PreEditChanged( void* data, ImfContext* imfContext, void* event_info ) override;
+  void PreEditChanged( void* data, ImfContext* imfContext, void* eventInfo ) override;
 
   /**
    * @copydoc Dali::InputMethodContext::NotifyCursorPosition()
    */
-  void CommitReceived( void* data, ImfContext* imfContext, void* event_info ) override;
+  void CommitReceived( void* data, ImfContext* imfContext, void* eventInfo ) override;
 
   /**
    * @copydoc Dali::InputMethodContext::NotifyCursorPosition()
@@ -127,12 +127,18 @@ public:
   /**
    * @copydoc Dali::InputMethodContext::DeleteSurrounding()
    */
-  void DeleteSurrounding( void* data, ImfContext* imfContext, void* event_info ) override;
+  void DeleteSurrounding( void* data, ImfContext* imfContext, void* eventInfo ) override;
 
   /**
    * @copydoc Dali::InputMethodContext::SendPrivateCommand()
    */
-  void SendPrivateCommand( void* data, ImfContext* imfContext, void* event_info ) override
+  void SendPrivateCommand( void* data, ImfContext* imfContext, void* eventInfo ) override
+  {}
+
+  /**
+   * @copydoc Dali::InputMethodContext::SendCommitContent()
+   */
+  void SendCommitContent( void* data, ImfContext* imfContext, void* eventInfo ) override
   {}
 
   // Cursor related
@@ -227,6 +233,11 @@ public:
   std::string GetInputPanelLocale() override;
 
   /**
+   * @copydoc Dali::InputMethodContext::SetContentMIMETypes()
+   */
+  void SetContentMIMETypes( const std::string& mimeTypes ) override;
+
+  /**
    * @copydoc Dali::InputMethodContext::FilterEventKey()
    */
   bool FilterEventKey( const Dali::KeyEvent& keyEvent ) override;
index 6bbfac1..ee3ff2b 100755 (executable)
@@ -148,18 +148,18 @@ void InputMethodContextWin::SetRestoreAfterFocusLost( bool toggle )
  * We are still predicting what the user is typing.  The latest string is what the InputMethodContext module thinks\r
  * the user wants to type.\r
  */\r
-void InputMethodContextWin::PreEditChanged( void*, ImfContext* imfContext, void* event_info )\r
+void InputMethodContextWin::PreEditChanged( void*, ImfContext* imfContext, void* eventInfo )\r
 {\r
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::PreEditChanged\n" );\r
 }\r
 \r
-void InputMethodContextWin::CommitReceived( void*, ImfContext* imfContext, void* event_info )\r
+void InputMethodContextWin::CommitReceived( void*, ImfContext* imfContext, void* eventInfo )\r
 {\r
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::CommitReceived\n" );\r
 \r
   if ( Dali::Adaptor::IsAvailable() )\r
   {\r
-    const std::string keyString( static_cast<char*>( event_info ) );\r
+    const std::string keyString( static_cast<char*>( eventInfo ) );\r
 \r
     Dali::InputMethodContext handle( this );\r
     Dali::InputMethodContext::EventData eventData( Dali::InputMethodContext::COMMIT, keyString, 0, 0 );\r
@@ -208,7 +208,7 @@ bool InputMethodContextWin::RetrieveSurrounding( void* data, ImfContext* imfCont
  * Called when an InputMethodContext delete surrounding event is received.\r
  * Here we tell the application that it should delete a certain range.\r
  */\r
-void InputMethodContextWin::DeleteSurrounding( void* data, ImfContext* imfContext, void* event_info )\r
+void InputMethodContextWin::DeleteSurrounding( void* data, ImfContext* imfContext, void* eventInfo )\r
 {\r
   DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::DeleteSurrounding\n" );\r
 }\r
@@ -335,6 +335,11 @@ std::string InputMethodContextWin::GetInputPanelLocale()
   return locale;\r
 }\r
 \r
+void InputMethodContextWin::SetContentMIMETypes( const std::string& mimeTypes )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::SetContentMIMETypes\n" );\r
+}\r
+\r
 bool InputMethodContextWin::FilterEventKey( const Dali::KeyEvent& keyEvent )\r
 {\r
   bool eventHandled( false );\r
index d2a03fc..e1c1e33 100755 (executable)
@@ -110,12 +110,12 @@ public:
   /**\r
    * @copydoc Dali::InputMethodContext::PreEditChanged()\r
    */\r
-  void PreEditChanged( void* data, ImfContext* imfContext, void* event_info ) override;\r
+  void PreEditChanged( void* data, ImfContext* imfContext, void* eventInfo ) override;\r
 \r
   /**\r
    * @copydoc Dali::InputMethodContext::NotifyCursorPosition()\r
    */\r
-  void CommitReceived( void* data, ImfContext* imfContext, void* event_info ) override;\r
+  void CommitReceived( void* data, ImfContext* imfContext, void* eventInfo ) override;\r
 \r
   /**\r
    * @copydoc Dali::InputMethodContext::NotifyCursorPosition()\r
@@ -125,12 +125,18 @@ public:
   /**\r
    * @copydoc Dali::InputMethodContext::DeleteSurrounding()\r
    */\r
-  void DeleteSurrounding( void* data, ImfContext* imfContext, void* event_info ) override;\r
+  void DeleteSurrounding( void* data, ImfContext* imfContext, void* eventInfo ) override;\r
 \r
   /**\r
    * @copydoc Dali::InputMethodContext::SendPrivateCommand()\r
    */\r
-  void SendPrivateCommand( void* data, ImfContext* imfContext, void* event_info ) override\r
+  void SendPrivateCommand( void* data, ImfContext* imfContext, void* eventInfo ) override\r
+  {}\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::SendCommitContent()\r
+   */\r
+  void SendCommitContent( void* data, ImfContext* imfContext, void* eventInfo ) override\r
   {}\r
 \r
   // Cursor related\r
@@ -225,6 +231,11 @@ public:
   std::string GetInputPanelLocale() override;\r
 \r
   /**\r
+   * @copydoc Dali::InputMethodContext::SetContentMIMETypes()\r
+   */\r
+  void SetContentMIMETypes( const std::string& mimeTypes ) override;\r
+\r
+  /**\r
    * @copydoc Dali::InputMethodContext::FilterEventKey()\r
    */\r
   bool FilterEventKey( const Dali::KeyEvent& keyEvent ) override;\r