return Internal::Adaptor::InputMethodContext::GetImplementation(*this).FilterEventKey( keyEvent );
}
+void InputMethodContext::AllowTextPrediction( bool prediction )
+{
+ Internal::Adaptor::InputMethodContext::GetImplementation(*this).AllowTextPrediction( prediction );
+}
+
+bool InputMethodContext::IsTextPredictionAllowed() const
+{
+ return Internal::Adaptor::InputMethodContext::GetImplementation(*this).IsTextPredictionAllowed();
+}
+
InputMethodContext::ActivatedSignalType& InputMethodContext::ActivatedSignal()
{
return Internal::Adaptor::InputMethodContext::GetImplementation(*this).ActivatedSignal();
*/
bool FilterEventKey( const Dali::KeyEvent& keyEvent );
+ /**
+ * @brief Sets whether the IM context should allow to use the text prediction.
+ *
+ * @param[in] prediction Whether to allow text prediction or not.
+ */
+ void AllowTextPrediction( bool prediction );
+
+ /**
+ * @brief Gets whether the IM context allow to use the text prediction.
+ *
+ * @return Whether the IM allow text prediction or not.
+ */
+ bool IsTextPredictionAllowed() const;
public:
// Signals
*/
virtual bool FilterEventKey( const Dali::KeyEvent& keyEvent ) { return false; }
+ /**
+ * @copydoc Dali::InputMethodContext::AllowTextPrediction()
+ */
+ virtual void AllowTextPrediction( bool prediction ) {}
+
+ /**
+ * @copydoc Dali::InputMethodContext::IsTextPredictionAllowed()
+ */
+ virtual bool IsTextPredictionAllowed() const { return false; }
public: // Signals
/**
return eventHandled;
}
+void InputMethodContextEcoreWl::AllowTextPrediction( bool prediction )
+{
+ DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::AllowTextPrediction\n" );
+
+ if( mIMFContext )
+ {
+ ecore_imf_context_prediction_allow_set( mIMFContext, prediction );
+ }
+}
+
+bool InputMethodContextEcoreWl::IsTextPredictionAllowed() const
+{
+ DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextEcoreWl::IsTextPredictionAllowed\n" );
+ bool prediction = false;
+ if( mIMFContext )
+ {
+ prediction = ecore_imf_context_prediction_allow_get( mIMFContext );
+ }
+ return prediction;
+}
+
bool InputMethodContextEcoreWl::ProcessEventKeyDown( const KeyEvent& keyEvent )
{
bool eventHandled( false );
*/
bool FilterEventKey( const Dali::KeyEvent& keyEvent ) override;
+ /**
+ * @copydoc Dali::InputMethodContext::AllowTextPrediction()
+ */
+ void AllowTextPrediction( bool prediction ) override;
+
+ /**
+ * @copydoc Dali::InputMethodContext::IsTextPredictionAllowed()
+ */
+ bool IsTextPredictionAllowed() const override;
private:
/**
* Context created the first time and kept until deleted.
return eventHandled;
}
+void InputMethodContextX::AllowTextPrediction( bool prediction )
+{
+ DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::AllowTextPrediction\n" );
+
+ if( mIMFContext )
+ {
+ ecore_imf_context_prediction_allow_set( mIMFContext, prediction );
+ }
+}
+
+bool InputMethodContextX::IsTextPredictionAllowed() const
+{
+ DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextX::IsTextPredictionAllowed\n" );
+ bool prediction = false;
+ if( mIMFContext )
+ {
+ prediction = ecore_imf_context_prediction_allow_get( mIMFContext );
+ }
+ return prediction;
+}
+
bool InputMethodContextX::ProcessEventKeyDown( const KeyEvent& keyEvent )
{
bool eventHandled( false );
*/
bool FilterEventKey( const Dali::KeyEvent& keyEvent ) override;
+ /**
+ * @copydoc Dali::InputMethodContext::AllowTextPrediction()
+ */
+ void AllowTextPrediction( bool prediction ) override;
+
+ /**
+ * @copydoc Dali::InputMethodContext::IsTextPredictionAllowed()
+ */
+ bool IsTextPredictionAllowed() const override;
private:
/**
* Context created the first time and kept until deleted.