@@ -41,11 +41,12 @@ static const char* GetImfMethod() {
41
41
Eina_List* modules;
42
42
43
43
modules = ecore_imf_context_available_ids_get ();
44
- if (!modules)
44
+ if (!modules) {
45
45
return nullptr ;
46
+ }
46
47
47
48
void * module;
48
- EINA_LIST_FREE (modules, module) { return ( const char *) module; }
49
+ EINA_LIST_FREE (modules, module) { return static_cast < const char *>( module) ; }
49
50
50
51
return nullptr ;
51
52
}
@@ -59,29 +60,29 @@ static bool IsASCIIPrintableKey(char c) {
59
60
60
61
static bool TextInputTypeToEcoreIMFInputPanelLayout (
61
62
std::string text_input_type,
62
- Ecore_IMF_Input_Panel_Layout& panel_layout) {
63
+ Ecore_IMF_Input_Panel_Layout* panel_layout) {
63
64
if (text_input_type == " TextInputType.text" ||
64
65
text_input_type == " TextInputType.multiline" ) {
65
- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
66
+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
66
67
} 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;
68
69
} 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;
70
71
} 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;
72
73
} 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;
74
75
} 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;
76
77
} 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;
78
79
} else if (text_input_type == " TextInputType.name" ||
79
80
text_input_type == " TextInputType.address" ) {
80
81
FT_LOGW (
81
82
" Actual requested text input type is [%s], but select "
82
83
" TextInputType.text as fallback type" ,
83
84
text_input_type.c_str ());
84
- panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
85
+ * panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
85
86
} else {
86
87
return false ;
87
88
}
@@ -91,11 +92,11 @@ static bool TextInputTypeToEcoreIMFInputPanelLayout(
91
92
void TextInputChannel::CommitCallback (void * data,
92
93
Ecore_IMF_Context* ctx,
93
94
void * event_info) {
94
- TextInputChannel* self = ( TextInputChannel*) data;
95
+ TextInputChannel* self = static_cast < TextInputChannel*>( data) ;
95
96
if (!self) {
96
97
return ;
97
98
}
98
- char * str = ( char *) event_info;
99
+ char * str = static_cast < char *>( event_info) ;
99
100
if (self->engine_ && self->engine_ ->platform_view_channel &&
100
101
self->engine_ ->platform_view_channel ->CurrentFocusedViewId () > -1 ) {
101
102
self->engine_ ->platform_view_channel ->DispatchCompositionEndEvent (str);
@@ -108,7 +109,7 @@ void TextInputChannel::CommitCallback(void* data,
108
109
void TextInputChannel::PreeditCallback (void * data,
109
110
Ecore_IMF_Context* ctx,
110
111
void * event_info) {
111
- TextInputChannel* self = ( TextInputChannel*) data;
112
+ TextInputChannel* self = static_cast < TextInputChannel*>( data) ;
112
113
if (!self) {
113
114
return ;
114
115
}
@@ -130,14 +131,12 @@ void TextInputChannel::PreeditCallback(void* data,
130
131
void TextInputChannel::PrivateCommandCallback (void * data,
131
132
Ecore_IMF_Context* ctx,
132
133
void * event_info) {
133
- // TODO
134
134
FT_UNIMPLEMENTED ();
135
135
}
136
136
137
137
void TextInputChannel::DeleteSurroundingCallback (void * data,
138
138
Ecore_IMF_Context* ctx,
139
139
void * event_info) {
140
- // TODO
141
140
FT_UNIMPLEMENTED ();
142
141
}
143
142
@@ -150,7 +149,7 @@ void TextInputChannel::InputPanelStateChangedCallback(
150
149
FT_LOGW (" No Data" );
151
150
return ;
152
151
}
153
- TextInputChannel* self = ( TextInputChannel*) data;
152
+ TextInputChannel* self = static_cast < TextInputChannel*>( data) ;
154
153
switch (value) {
155
154
case ECORE_IMF_INPUT_PANEL_STATE_SHOW:
156
155
self->SetSoftwareKeyboardShowing ();
@@ -173,7 +172,7 @@ void TextInputChannel::InputPanelGeometryChangedCallback(
173
172
FT_LOGW (" No Data" );
174
173
return ;
175
174
}
176
- TextInputChannel* self = ( TextInputChannel*) data;
175
+ TextInputChannel* self = static_cast < TextInputChannel*>( data) ;
177
176
ecore_imf_context_input_panel_geometry_get (
178
177
self->imf_context_ , &self->current_keyboard_geometry_ .x ,
179
178
&self->current_keyboard_geometry_ .y , &self->current_keyboard_geometry_ .w ,
@@ -263,7 +262,8 @@ TextInputChannel::TextInputChannel(flutter::BinaryMessenger* messenger,
263
262
}
264
263
if (imf_context_) {
265
264
ecore_imf_context_client_window_set (
266
- imf_context_, (void *)engine_->renderer ->GetWindowId ());
265
+ imf_context_,
266
+ reinterpret_cast <void *>(engine_->renderer ->GetWindowId ()));
267
267
RegisterIMFCallback ();
268
268
} else {
269
269
FT_LOGE (" Failed to create imfContext" );
@@ -296,7 +296,7 @@ void TextInputChannel::HandleMethodCall(
296
296
} else if (method.compare (kHideMethod ) == 0 ) {
297
297
HideSoftwareKeyboard ();
298
298
} else if (method.compare (kSetPlatformViewClient ) == 0 ) {
299
- // TODO: implement if necessary
299
+ FT_UNIMPLEMENTED ();
300
300
} else if (method.compare (kClearClientMethod ) == 0 ) {
301
301
active_model_ = nullptr ;
302
302
} else if (method.compare (kSetClientMethod ) == 0 ) {
@@ -403,7 +403,7 @@ bool TextInputChannel::FilterEvent(Ecore_Event_Key* keyDownEvent) {
403
403
bool handled = false ;
404
404
405
405
#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.
407
407
bool isIME = true ;
408
408
#else
409
409
bool isIME = ecore_imf_context_keyboard_mode_get (imf_context_) ==
@@ -618,7 +618,7 @@ void TextInputChannel::ShowSoftwareKeyboard() {
618
618
if (imf_context_ && !is_software_keyboard_showing_) {
619
619
is_software_keyboard_showing_ = true ;
620
620
Ecore_IMF_Input_Panel_Layout panel_layout;
621
- if (TextInputTypeToEcoreIMFInputPanelLayout (input_type_, panel_layout)) {
621
+ if (TextInputTypeToEcoreIMFInputPanelLayout (input_type_, & panel_layout)) {
622
622
ecore_imf_context_input_panel_layout_set (imf_context_, panel_layout);
623
623
}
624
624
ecore_imf_context_input_panel_show (imf_context_);
0 commit comments