@@ -41,11 +41,12 @@ static const char* GetImfMethod() {
4141 Eina_List* modules;
4242
4343 modules = ecore_imf_context_available_ids_get ();
44- if (!modules)
44+ if (!modules) {
4545 return nullptr ;
46+ }
4647
4748 void * module ;
48- EINA_LIST_FREE (modules, module ) { return ( const char *) module ; }
49+ EINA_LIST_FREE (modules, module ) { return static_cast < const char *>( module ) ; }
4950
5051 return nullptr ;
5152}
@@ -59,29 +60,29 @@ static bool IsASCIIPrintableKey(char c) {
5960
6061static bool TextInputTypeToEcoreIMFInputPanelLayout (
6162 std::string text_input_type,
62- Ecore_IMF_Input_Panel_Layout& panel_layout) {
63+ Ecore_IMF_Input_Panel_Layout* panel_layout) {
6364 if (text_input_type == " TextInputType.text" ||
6465 text_input_type == " TextInputType.multiline" ) {
65- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
66+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
6667 } else if (text_input_type == " TextInputType.number" ) {
67- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER;
68+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER;
6869 } else if (text_input_type == " TextInputType.phone" ) {
69- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER;
70+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER;
7071 } else if (text_input_type == " TextInputType.datetime" ) {
71- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_DATETIME;
72+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_DATETIME;
7273 } else if (text_input_type == " TextInputType.emailAddress" ) {
73- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL;
74+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL;
7475 } else if (text_input_type == " TextInputType.url" ) {
75- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_URL;
76+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_URL;
7677 } else if (text_input_type == " TextInputType.visiblePassword" ) {
77- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD;
78+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD;
7879 } else if (text_input_type == " TextInputType.name" ||
7980 text_input_type == " TextInputType.address" ) {
8081 FT_LOGW (
8182 " Actual requested text input type is [%s], but select "
8283 " TextInputType.text as fallback type" ,
8384 text_input_type.c_str ());
84- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
85+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
8586 } else {
8687 return false ;
8788 }
@@ -91,11 +92,11 @@ static bool TextInputTypeToEcoreIMFInputPanelLayout(
9192void TextInputChannel::CommitCallback (void * data,
9293 Ecore_IMF_Context* ctx,
9394 void * event_info) {
94- TextInputChannel* self = ( TextInputChannel*) data;
95+ TextInputChannel* self = static_cast < TextInputChannel*>( data) ;
9596 if (!self) {
9697 return ;
9798 }
98- char * str = ( char *) event_info;
99+ char * str = static_cast < char *>( event_info) ;
99100 if (self->engine_ && self->engine_ ->platform_view_channel &&
100101 self->engine_ ->platform_view_channel ->CurrentFocusedViewId () > -1 ) {
101102 self->engine_ ->platform_view_channel ->DispatchCompositionEndEvent (str);
@@ -108,7 +109,7 @@ void TextInputChannel::CommitCallback(void* data,
108109void TextInputChannel::PreeditCallback (void * data,
109110 Ecore_IMF_Context* ctx,
110111 void * event_info) {
111- TextInputChannel* self = ( TextInputChannel*) data;
112+ TextInputChannel* self = static_cast < TextInputChannel*>( data) ;
112113 if (!self) {
113114 return ;
114115 }
@@ -130,14 +131,12 @@ void TextInputChannel::PreeditCallback(void* data,
130131void TextInputChannel::PrivateCommandCallback (void * data,
131132 Ecore_IMF_Context* ctx,
132133 void * event_info) {
133- // TODO
134134 FT_UNIMPLEMENTED ();
135135}
136136
137137void TextInputChannel::DeleteSurroundingCallback (void * data,
138138 Ecore_IMF_Context* ctx,
139139 void * event_info) {
140- // TODO
141140 FT_UNIMPLEMENTED ();
142141}
143142
@@ -150,7 +149,7 @@ void TextInputChannel::InputPanelStateChangedCallback(
150149 FT_LOGW (" No Data" );
151150 return ;
152151 }
153- TextInputChannel* self = ( TextInputChannel*) data;
152+ TextInputChannel* self = static_cast < TextInputChannel*>( data) ;
154153 switch (value) {
155154 case ECORE_IMF_INPUT_PANEL_STATE_SHOW:
156155 self->SetSoftwareKeyboardShowing ();
@@ -173,7 +172,7 @@ void TextInputChannel::InputPanelGeometryChangedCallback(
173172 FT_LOGW (" No Data" );
174173 return ;
175174 }
176- TextInputChannel* self = ( TextInputChannel*) data;
175+ TextInputChannel* self = static_cast < TextInputChannel*>( data) ;
177176 ecore_imf_context_input_panel_geometry_get (
178177 self->imf_context_ , &self->current_keyboard_geometry_ .x ,
179178 &self->current_keyboard_geometry_ .y , &self->current_keyboard_geometry_ .w ,
@@ -263,7 +262,8 @@ TextInputChannel::TextInputChannel(flutter::BinaryMessenger* messenger,
263262 }
264263 if (imf_context_) {
265264 ecore_imf_context_client_window_set (
266- imf_context_, (void *)engine_->renderer ->GetWindowId ());
265+ imf_context_,
266+ reinterpret_cast <void *>(engine_->renderer ->GetWindowId ()));
267267 RegisterIMFCallback ();
268268 } else {
269269 FT_LOGE (" Failed to create imfContext" );
@@ -296,7 +296,7 @@ void TextInputChannel::HandleMethodCall(
296296 } else if (method.compare (kHideMethod ) == 0 ) {
297297 HideSoftwareKeyboard ();
298298 } else if (method.compare (kSetPlatformViewClient ) == 0 ) {
299- // TODO: implement if necessary
299+ FT_UNIMPLEMENTED ();
300300 } else if (method.compare (kClearClientMethod ) == 0 ) {
301301 active_model_ = nullptr ;
302302 } else if (method.compare (kSetClientMethod ) == 0 ) {
@@ -403,7 +403,7 @@ bool TextInputChannel::FilterEvent(Ecore_Event_Key* keyDownEvent) {
403403 bool handled = false ;
404404
405405#ifdef TIZEN_RENDERER_EVAS_GL
406- // TODO: Hardware keyboard not supported when running in Evas GL mode.
406+ // Hardware keyboard not supported when running in Evas GL mode.
407407 bool isIME = true ;
408408#else
409409 bool isIME = ecore_imf_context_keyboard_mode_get (imf_context_) ==
@@ -618,7 +618,7 @@ void TextInputChannel::ShowSoftwareKeyboard() {
618618 if (imf_context_ && !is_software_keyboard_showing_) {
619619 is_software_keyboard_showing_ = true ;
620620 Ecore_IMF_Input_Panel_Layout panel_layout;
621- if (TextInputTypeToEcoreIMFInputPanelLayout (input_type_, panel_layout)) {
621+ if (TextInputTypeToEcoreIMFInputPanelLayout (input_type_, & panel_layout)) {
622622 ecore_imf_context_input_panel_layout_set (imf_context_, panel_layout);
623623 }
624624 ecore_imf_context_input_panel_show (imf_context_);
0 commit comments