Merge from TIZEN 2.3
[platform/core/uifw/e17.git] / src / modules / conf_keybindings / e_mod_main.c
1 #include "e.h"
2 #include "e_mod_main.h"
3
4 /* actual module specifics */
5 static E_Module *conf_module = NULL;
6
7 /* module setup */
8 EAPI E_Module_Api e_modapi =
9 {
10    E_MODULE_API_VERSION,
11    "Settings - Input Controls"
12 };
13
14 EAPI void *
15 e_modapi_init(E_Module *m)
16 {
17    e_configure_registry_category_add("keyboard_and_mouse", 40, _("Input"),
18                                      NULL, "preferences-behavior");
19
20    e_configure_registry_item_add("keyboard_and_mouse/key_bindings", 10,
21                                  _("Key Bindings"), NULL,
22                                  "preferences-desktop-keyboard-shortcuts",
23                                  e_int_config_keybindings);
24    e_configure_registry_item_add("keyboard_and_mouse/mouse_bindings", 20,
25                                  _("Mouse Bindings"), NULL,
26                                  "preferences-desktop-mouse",
27                                  e_int_config_mousebindings);
28    e_configure_registry_item_add("keyboard_and_mouse/acpi_bindings", 30,
29                                  _("ACPI Bindings"), NULL,
30                                  "preferences-system-power-management",
31                                  e_int_config_acpibindings);
32    conf_module = m;
33    e_module_delayed_set(m, 1);
34    return m;
35 }
36
37 EAPI int
38 e_modapi_shutdown(E_Module *m __UNUSED__)
39 {
40    E_Config_Dialog *cfd;
41
42    while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/acpi_bindings")))
43      e_object_del(E_OBJECT(cfd));
44    while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/mouse_bindings")))
45      e_object_del(E_OBJECT(cfd));
46    while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/key_bindings")))
47      e_object_del(E_OBJECT(cfd));
48
49    e_configure_registry_item_del("keyboard_and_mouse/acpi_bindings");
50    e_configure_registry_item_del("keyboard_and_mouse/mouse_bindings");
51    e_configure_registry_item_del("keyboard_and_mouse/key_bindings");
52
53    e_configure_registry_category_del("keyboard_and_mouse");
54
55    conf_module = NULL;
56    return 1;
57 }
58
59 EAPI int
60 e_modapi_save(E_Module *m __UNUSED__)
61 {
62    return 1;
63 }
64