-static bool
-add_new_text_input(struct tinyds_server *server)
-{
- struct tinyds_text_input *text_input;
-
- text_input = calloc(1, sizeof *text_input);
- if (!text_input)
- return false;
-
- text_input->text_input_mgr = ds_tizen_text_input_manager_create(server->display);
- if (!text_input->text_input_mgr) {
- free(text_input);
- ds_err("Could not create ds_tizen_text_input_manager");
- return false;
- }
-
- wl_list_init(&text_input->input_methods);
-
- text_input->destroy.notify = text_input_mgr_handle_destroy;
- ds_tizen_text_input_manager_add_destroy_listener(text_input->text_input_mgr,
- &text_input->destroy);
-
- text_input->new_text_input.notify = text_input_mgr_handle_new_text_input;
- ds_tizen_text_input_manager_add_new_text_input_listener(text_input->text_input_mgr,
- &text_input->new_text_input);
-
- text_input->server = server;
- server->text_input = text_input;
-
- ds_inf("Text_Input (%p) added", text_input);
-
- return true;
-}
-
-static bool
-add_new_input_method(struct tinyds_server *server)
-{
- struct tinyds_input_method *input_method;
-
- input_method = calloc(1, sizeof *input_method);
- if (!input_method)
- return false;
-
- input_method->input_method = ds_tizen_input_method_create(server->display);
- if (!input_method->input_method) {
- free(input_method);
- ds_err("Could not create ds_tizen_input_method");
- return false;
- }
- input_method->destroy.notify = input_method_handle_destroy;
- ds_tizen_input_method_add_destroy_listener(input_method->input_method,
- &input_method->destroy);
-
- input_method->input_method_mgr = ds_tizen_input_method_manager_create(server->display);
- if (!input_method->input_method_mgr) {
- free(input_method);
- ds_err("Could not create ds_tizen_input_method_manager");
- return false;
- }
-
- input_method->mgr_destroy.notify = input_method_mgr_handle_destroy;
- ds_tizen_input_method_manager_add_destroy_listener(input_method->input_method_mgr,
- &input_method->mgr_destroy);
-
- input_method->new_im_context.notify = input_method_handle_new_im_context;
- ds_tizen_input_method_add_new_input_method_context_listener(input_method->input_method,
- &input_method->new_im_context);
-
- input_method->server = server;
- server->input_method = input_method;
-
- ds_inf("Input_Method (%p) added", input_method);
-
- return true;
-}
-