File tree Expand file tree Collapse file tree
flutter/shell/platform/tizen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ constexpr char kUpdateEditingStateMethod[] =
2525constexpr char kPerformActionMethod [] = " TextInputClient.performAction" ;
2626constexpr char kSetPlatformViewClient [] = " TextInput.setPlatformViewClient" ;
2727constexpr char kTextCapitalization [] = " textCapitalization" ;
28+ constexpr char kTextEnableSuggestions [] = " enableSuggestions" ;
2829constexpr char kTextInputAction [] = " inputAction" ;
2930constexpr char kTextInputType [] = " inputType" ;
3031constexpr char kTextInputTypeName [] = " name" ;
@@ -162,6 +163,15 @@ void TextInputChannel::HandleMethodCall(
162163 }
163164
164165 client_id_ = client_id_json.GetInt ();
166+
167+ auto enable_suggestions_iter =
168+ client_config.FindMember (kTextEnableSuggestions );
169+ if (enable_suggestions_iter != client_config.MemberEnd () &&
170+ enable_suggestions_iter->value .IsBool ()) {
171+ bool enable = enable_suggestions_iter->value .GetBool ();
172+ input_method_context_->SetEnableSuggestions (enable);
173+ }
174+
165175 input_action_ = " " ;
166176 auto input_action_iter = client_config.FindMember (kTextInputAction );
167177 if (input_action_iter != client_config.MemberEnd () &&
Original file line number Diff line number Diff line change @@ -273,6 +273,13 @@ bool TizenInputMethodContext::IsInputPanelShown() {
273273 return state == ECORE_IMF_INPUT_PANEL_STATE_SHOW ;
274274}
275275
276+ void TizenInputMethodContext::SetEnableSuggestions (bool enable) {
277+ FT_ASSERT (imf_context_);
278+
279+ ecore_imf_context_prediction_allow_set (imf_context_,
280+ enable ? EINA_TRUE : EINA_FALSE );
281+ }
282+
276283void TizenInputMethodContext::SetInputAction (const std::string& input_action) {
277284 FT_ASSERT (imf_context_);
278285 Ecore_IMF_Input_Panel_Return_Key_Type return_key_type =
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ class TizenInputMethodContext {
5757
5858 bool IsInputPanelShown ();
5959
60+ void SetEnableSuggestions (bool enable);
61+
6062 void SetInputAction (const std::string& input_action);
6163
6264 void SetInputPanelLayout (const std::string& layout);
You can’t perform that action at this time.
0 commit comments