diff options
author | andrunko <andrunko> | 2007-11-19 18:27:11 +0000 |
---|---|---|
committer | andrunko <andrunko@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33> | 2007-11-19 18:27:11 +0000 |
commit | 502b766d664dda3c0a10826bddd8c043a868cfa1 (patch) | |
tree | ef7b1799cd28aad59b1f2d843dbac3e1a24f2052 /legacy/ecore/src/lib/ecore_imf/ecore_imf.c | |
parent | 23d39ab1541513e6681c2dd5330de5acec8fdb9b (diff) |
Added Ecore_IMF module.
Added Ecore_IMF module. This module enables different input methods to be
used with Ecore. Input methods modules can be created using the Ecore_IMF
interface.
Added ecore_evas_window_get method to allow input methods to request
the window related to a given Ecore_Evas when available.
SVN revision: 32775
Diffstat (limited to '')
-rw-r--r-- | legacy/ecore/src/lib/ecore_imf/ecore_imf.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf.c new file mode 100644 index 0000000000..acf7e8d693 --- /dev/null +++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf.c | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 | ||
3 | */ | ||
4 | |||
5 | #include "config.h" | ||
6 | |||
7 | #include "Ecore_IMF.h" | ||
8 | |||
9 | EAPI int ECORE_IMF_EVENT_PREEDIT_START = 0; | ||
10 | EAPI int ECORE_IMF_EVENT_PREEDIT_END = 0; | ||
11 | EAPI int ECORE_IMF_EVENT_PREEDIT_CHANGED = 0; | ||
12 | EAPI int ECORE_IMF_EVENT_COMMIT = 0; | ||
13 | EAPI int ECORE_IMF_EVENT_RETRIEVE_SURROUNDIND = 0; | ||
14 | EAPI int ECORE_IMF_EVENT_DELETE_SURROUNDIND = 0; | ||
15 | |||
16 | static int init_count = 0; | ||
17 | |||
18 | /** | ||
19 | * @defgroup Ecore_IMF_Lib_Group Ecore Input Method Library Functions | ||
20 | * | ||
21 | * Utility functions that set up and shut down the Ecore Input Method | ||
22 | * library. | ||
23 | */ | ||
24 | |||
25 | /** | ||
26 | * Initialises the Ecore_IMF library. | ||
27 | * @return Number of times the library has been initialised without being | ||
28 | * shut down. | ||
29 | * @ingroup Ecore_IMF_Lib_Group | ||
30 | */ | ||
31 | EAPI int | ||
32 | ecore_imf_init(void) | ||
33 | { | ||
34 | if (++init_count != 1) return init_count; | ||
35 | |||
36 | ecore_init(); | ||
37 | ecore_imf_module_init(); | ||
38 | |||
39 | ECORE_IMF_EVENT_PREEDIT_START = ecore_event_type_new(); | ||
40 | ECORE_IMF_EVENT_PREEDIT_END = ecore_event_type_new(); | ||
41 | ECORE_IMF_EVENT_PREEDIT_CHANGED = ecore_event_type_new(); | ||
42 | ECORE_IMF_EVENT_COMMIT = ecore_event_type_new(); | ||
43 | ECORE_IMF_EVENT_RETRIEVE_SURROUNDIND = ecore_event_type_new(); | ||
44 | ECORE_IMF_EVENT_DELETE_SURROUNDIND = ecore_event_type_new(); | ||
45 | |||
46 | return init_count; | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * Shuts down the Ecore_IMF library. | ||
51 | * @return Number of times the library has been initialised without being | ||
52 | * shut down. | ||
53 | * @ingroup Ecore_IMF_Lib_Group | ||
54 | */ | ||
55 | EAPI int | ||
56 | ecore_imf_shutdown(void) | ||
57 | { | ||
58 | if (--init_count != 0) return init_count; | ||
59 | |||
60 | ecore_shutdown(); | ||
61 | ecore_imf_module_shutdown(); | ||
62 | |||
63 | return init_count; | ||
64 | } | ||