Send module name of keyboard Engine
[platform/core/uifw/ise-default.git] / src / include / ise-dbus.h
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef _ISE_DBUS_H_
18 #define _ISE_DBUS_H_
19
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <glib.h>
23 #include <gio/gio.h>
24 #include <dbus/dbus.h>
25 #include <vector>
26 #include "ise.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #define ENGINE_LOADER_DBUS_NAME          "org.tizen.engine-loader"
33 #define ENGINE_LOADER_OBJECT_PATH        "/org/tizen/engine/loader"
34 #define ENGINE_LOADER_INTERFACE_NAME     "org.tizen.engine_loader"
35 #define ENGINE_LOADER_ISE_INTERFACE_NAME "org.tizen.ise_default"
36
37 typedef struct {
38     GDBusConnection *gdbus_connection;
39     int server_watcher_id;
40     int monitor_id;
41     int server_monitor_id;
42     void *user_data;
43 } engine_loader_dbus_info_s;
44
45 bool engine_loader_dbus_init(void *data);
46 bool engine_loader_dbus_shutdown();
47 void engine_loader_set_imengine(const char *engine_id, const char *module_name);
48 void engine_loader_flush_imengine();
49 void engine_loader_reset_imengine();
50 void engine_loader_send_imengine_event(int command, uint32_t value);
51 bool engine_loader_process_key_event(scim::KeyEvent& key);
52 void engine_loader_focus_in();
53 void engine_loader_focus_out();
54 void engine_loader_update_cursor_position(int cursor_pos);
55 void engine_loader_set_autocapital_type(uint32_t type);
56 void engine_loader_set_prediction_allow(uint32_t prediction_allow);
57 void engine_loader_reset_input_context();
58 void engine_loader_set_layout(uint32_t layout);
59 void engine_loader_set_imdata(const char *imdata, uint32_t len);
60 void engine_loader_set_input_hint(uint32_t input_hint);
61 void engine_loader_update_bidi_direction(uint32_t direction);
62 void engine_loader_trigger_property(const char *property);
63 void engine_loader_show_candidate_more_window();
64 void engine_loader_hide_candidate_more_window();
65 void engine_loader_select_aux(uint32_t item);
66 void engine_loader_select_candidate(uint32_t item);
67 void engine_loader_candidate_table_page_up();
68 void engine_loader_candidate_table_page_down();
69 void engine_loader_change_candidate_page_size(uint32_t size);
70 void engine_loader_set_candidate_item_layout(std::vector<uint32_t> item);
71 void engine_loader_change_candidate_number(uint32_t page_num);
72 void engine_loader_long_press_candidate_item(uint32_t index);
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif /* _ISE_FLOATING_MODE_H_ */