summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJihoon Kim <imfine98@gmail.com>2013-01-08 03:51:40 +0000
committerJihoon Kim <imfine98@gmail.com>2013-01-08 03:51:40 +0000
commitabeb2f2f646daac92913f62be09120868683dd23 (patch)
tree5be2b1b6e09ab23271d2a664a14b4e1ad9f7c83c /src
parent478de3ec7674b0bc5be2e0531a0ee9fea79069ba (diff)
efl/ecore_imf: move the docs to header related to ecore_imf_evas API
SVN revision: 82379
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_imf/Ecore_IMF_Evas.h118
-rw-r--r--src/lib/ecore_imf/ecore_imf_evas.c111
2 files changed, 118 insertions, 111 deletions
diff --git a/src/lib/ecore_imf/Ecore_IMF_Evas.h b/src/lib/ecore_imf/Ecore_IMF_Evas.h
index 5f7cdb90f3..b6c4fc206b 100644
--- a/src/lib/ecore_imf/Ecore_IMF_Evas.h
+++ b/src/lib/ecore_imf/Ecore_IMF_Evas.h
@@ -30,17 +30,135 @@
30# endif 30# endif
31#endif /* ! _WIN32 */ 31#endif /* ! _WIN32 */
32 32
33/**
34 * @defgroup Ecore_IMF_Evas_Group Ecore Input Method Context Evas Helper Functions
35 * @ingroup Ecore_IMF_Lib_Group
36 *
37 * Helper functions to make it easy to use Evas with Ecore_IMF.
38 * Converts each event from Evas to the corresponding event of Ecore_IMF.
39 *
40 * An example of usage of these functions can be found at:
41 * @li @ref ecore_imf_example_c
42 */
43
33#ifdef __cplusplus 44#ifdef __cplusplus
34extern "C" { 45extern "C" {
35#endif 46#endif
36 47
48/**
49 * Converts a "mouse_in" event from Evas to the corresponding event of Ecore_IMF.
50 *
51 * @param evas_event The received Evas event.
52 * @param imf_event The location to store the converted Ecore_IMF event.
53 * @ingroup Ecore_IMF_Evas_Group
54 */
37EAPI void ecore_imf_evas_event_mouse_in_wrap(Evas_Event_Mouse_In *evas_event, Ecore_IMF_Event_Mouse_In *imf_event); 55EAPI void ecore_imf_evas_event_mouse_in_wrap(Evas_Event_Mouse_In *evas_event, Ecore_IMF_Event_Mouse_In *imf_event);
56
57/**
58 * Converts a "mouse_out" event from Evas to the corresponding event of Ecore_IMF.
59 *
60 * @param evas_event The received Evas event.
61 * @param imf_event The location to store the converted Ecore_IMF event.
62 * @ingroup Ecore_IMF_Evas_Group
63 */
38EAPI void ecore_imf_evas_event_mouse_out_wrap(Evas_Event_Mouse_Out *evas_event, Ecore_IMF_Event_Mouse_Out *imf_event); 64EAPI void ecore_imf_evas_event_mouse_out_wrap(Evas_Event_Mouse_Out *evas_event, Ecore_IMF_Event_Mouse_Out *imf_event);
65
66/**
67 * Converts a "mouse_move" event from Evas to the corresponding event of Ecore_IMF.
68 *
69 * @param evas_event The received Evas event.
70 * @param imf_event The location to store the converted Ecore_IMF event.
71 * @ingroup Ecore_IMF_Evas_Group
72 */
39EAPI void ecore_imf_evas_event_mouse_move_wrap(Evas_Event_Mouse_Move *evas_event, Ecore_IMF_Event_Mouse_Move *imf_event); 73EAPI void ecore_imf_evas_event_mouse_move_wrap(Evas_Event_Mouse_Move *evas_event, Ecore_IMF_Event_Mouse_Move *imf_event);
74
75/**
76 * Converts a "mouse_down" event from Evas to the corresponding event of Ecore_IMF.
77 *
78 * @param evas_event The received Evas event.
79 * @param imf_event The location to store the converted Ecore_IMF event.
80 * @ingroup Ecore_IMF_Evas_Group
81 */
40EAPI void ecore_imf_evas_event_mouse_down_wrap(Evas_Event_Mouse_Down *evas_event, Ecore_IMF_Event_Mouse_Down *imf_event); 82EAPI void ecore_imf_evas_event_mouse_down_wrap(Evas_Event_Mouse_Down *evas_event, Ecore_IMF_Event_Mouse_Down *imf_event);
83
84/**
85 * Converts a "mouse_up" event from Evas to the corresponding event of Ecore_IMF.
86 *
87 * @param evas_event The received Evas event.
88 * @param imf_event The location to store the converted Ecore_IMF event.
89 * @ingroup Ecore_IMF_Evas_Group
90 */
41EAPI void ecore_imf_evas_event_mouse_up_wrap(Evas_Event_Mouse_Up *evas_event, Ecore_IMF_Event_Mouse_Up *imf_event); 91EAPI void ecore_imf_evas_event_mouse_up_wrap(Evas_Event_Mouse_Up *evas_event, Ecore_IMF_Event_Mouse_Up *imf_event);
92
93/**
94 * Converts a "mouse_wheel" event from Evas to the corresponding event of Ecore_IMF.
95 *
96 * @param evas_event The received Evas event.
97 * @param imf_event The location to store the converted Ecore_IMF event.
98 * @ingroup Ecore_IMF_Evas_Group
99 */
42EAPI void ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_event, Ecore_IMF_Event_Mouse_Wheel *imf_event); 100EAPI void ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_event, Ecore_IMF_Event_Mouse_Wheel *imf_event);
101
102/**
103 * Converts a "key_down" event from Evas to the corresponding event of Ecore_IMF.
104 *
105 * @param evas_event The received Evas event.
106 * @param imf_event The location to store the converted Ecore_IMF event.
107 * @ingroup Ecore_IMF_Evas_Group
108 *
109 * Example
110 * @code
111 * static void
112 * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
113 * {
114 * Evas_Event_Key_Down *ev = event_info;
115 * if (!ev->keyname) return;
116 *
117 * if (imf_context)
118 * {
119 * Ecore_IMF_Event_Key_Down ecore_ev;
120 * ecore_imf_evas_event_key_down_wrap(ev, &ecore_ev);
121 * if (ecore_imf_context_filter_event(imf_context,
122 * ECORE_IMF_EVENT_KEY_DOWN,
123 * (Ecore_IMF_Event *)&ecore_ev))
124 * return;
125 * }
126 * }
127 *
128 * evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, data);
129 * @endcode
130 */
43EAPI void ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event, Ecore_IMF_Event_Key_Down *imf_event); 131EAPI void ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event, Ecore_IMF_Event_Key_Down *imf_event);
132
133/**
134 * Converts a "key_up" event from Evas to the corresponding event of Ecore_IMF.
135 *
136 * @param evas_event The received Evas event.
137 * @param imf_event The location to store the converted Ecore_IMF event.
138 * @ingroup Ecore_IMF_Evas_Group
139 *
140 * Example
141 * @code
142 * static void
143 * _key_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
144 * {
145 * Evas_Event_Key_Up *ev = event_info;
146 * if (!ev->keyname) return;
147 *
148 * if (imf_context)
149 * {
150 * Ecore_IMF_Event_Key_Up ecore_ev;
151 * ecore_imf_evas_event_key_up_wrap(ev, &ecore_ev);
152 * if (ecore_imf_context_filter_event(imf_context,
153 * ECORE_IMF_EVENT_KEY_UP,
154 * (Ecore_IMF_Event *)&ecore_ev))
155 * return;
156 * }
157 * }
158 *
159 * evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_UP, _key_up_cb, data);
160 * @endcode
161 */
44EAPI void ecore_imf_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event, Ecore_IMF_Event_Key_Up *imf_event); 162EAPI void ecore_imf_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event, Ecore_IMF_Event_Key_Up *imf_event);
45 163
46#ifdef __cplusplus 164#ifdef __cplusplus
diff --git a/src/lib/ecore_imf/ecore_imf_evas.c b/src/lib/ecore_imf/ecore_imf_evas.c
index 8c37e99239..50339624e2 100644
--- a/src/lib/ecore_imf/ecore_imf_evas.c
+++ b/src/lib/ecore_imf/ecore_imf_evas.c
@@ -7,17 +7,6 @@
7#include "ecore_private.h" 7#include "ecore_private.h"
8#include "Ecore_IMF_Evas.h" 8#include "Ecore_IMF_Evas.h"
9 9
10/**
11 * @defgroup Ecore_IMF_Evas_Group Ecore Input Method Context Evas Helper Functions
12 * @ingroup Ecore_IMF_Lib_Group
13 *
14 * Helper functions to make it easy to use Evas with Ecore_IMF.
15 * Converts each event from Evas to the corresponding event of Ecore_IMF.
16 *
17 * An example of usage of these functions can be found at:
18 * @li @ref ecore_imf_example_c
19 */
20
21static const char *_ecore_imf_evas_event_empty = ""; 10static const char *_ecore_imf_evas_event_empty = "";
22 11
23/* Converts the Evas modifiers to Ecore_IMF keyboard modifiers */ 12/* Converts the Evas modifiers to Ecore_IMF keyboard modifiers */
@@ -73,13 +62,6 @@ _ecore_imf_evas_event_mouse_flags_wrap(Evas_Button_Flags evas_flags,
73 *imf_flags |= ECORE_IMF_MOUSE_TRIPLE_CLICK; 62 *imf_flags |= ECORE_IMF_MOUSE_TRIPLE_CLICK;
74} 63}
75 64
76/**
77 * Converts a "mouse_in" event from Evas to the corresponding event of Ecore_IMF.
78 *
79 * @param evas_event The received Evas event.
80 * @param imf_event The location to store the converted Ecore_IMF event.
81 * @ingroup Ecore_IMF_Evas_Group
82 */
83EAPI void 65EAPI void
84ecore_imf_evas_event_mouse_in_wrap(Evas_Event_Mouse_In *evas_event, 66ecore_imf_evas_event_mouse_in_wrap(Evas_Event_Mouse_In *evas_event,
85 Ecore_IMF_Event_Mouse_In *imf_event) 67 Ecore_IMF_Event_Mouse_In *imf_event)
@@ -97,13 +79,6 @@ ecore_imf_evas_event_mouse_in_wrap(Evas_Event_Mouse_In *evas_event,
97 _ecore_imf_evas_event_locks_wrap(evas_event->locks, &imf_event->locks); 79 _ecore_imf_evas_event_locks_wrap(evas_event->locks, &imf_event->locks);
98} 80}
99 81
100/**
101 * Converts a "mouse_out" event from Evas to the corresponding event of Ecore_IMF.
102 *
103 * @param evas_event The received Evas event.
104 * @param imf_event The location to store the converted Ecore_IMF event.
105 * @ingroup Ecore_IMF_Evas_Group
106 */
107EAPI void 82EAPI void
108ecore_imf_evas_event_mouse_out_wrap(Evas_Event_Mouse_Out *evas_event, 83ecore_imf_evas_event_mouse_out_wrap(Evas_Event_Mouse_Out *evas_event,
109 Ecore_IMF_Event_Mouse_Out *imf_event) 84 Ecore_IMF_Event_Mouse_Out *imf_event)
@@ -121,13 +96,6 @@ ecore_imf_evas_event_mouse_out_wrap(Evas_Event_Mouse_Out *evas_event,
121 _ecore_imf_evas_event_locks_wrap(evas_event->locks, &imf_event->locks); 96 _ecore_imf_evas_event_locks_wrap(evas_event->locks, &imf_event->locks);
122} 97}
123 98
124/**
125 * Converts a "mouse_move" event from Evas to the corresponding event of Ecore_IMF.
126 *
127 * @param evas_event The received Evas event.
128 * @param imf_event The location to store the converted Ecore_IMF event.
129 * @ingroup Ecore_IMF_Evas_Group
130 */
131EAPI void 99EAPI void
132ecore_imf_evas_event_mouse_move_wrap(Evas_Event_Mouse_Move *evas_event, 100ecore_imf_evas_event_mouse_move_wrap(Evas_Event_Mouse_Move *evas_event,
133 Ecore_IMF_Event_Mouse_Move *imf_event) 101 Ecore_IMF_Event_Mouse_Move *imf_event)
@@ -149,13 +117,6 @@ ecore_imf_evas_event_mouse_move_wrap(Evas_Event_Mouse_Move *evas_event,
149 _ecore_imf_evas_event_locks_wrap(evas_event->locks, &imf_event->locks); 117 _ecore_imf_evas_event_locks_wrap(evas_event->locks, &imf_event->locks);
150} 118}
151 119
152/**
153 * Converts a "mouse_down" event from Evas to the corresponding event of Ecore_IMF.
154 *
155 * @param evas_event The received Evas event.
156 * @param imf_event The location to store the converted Ecore_IMF event.
157 * @ingroup Ecore_IMF_Evas_Group
158 */
159EAPI void 120EAPI void
160ecore_imf_evas_event_mouse_down_wrap(Evas_Event_Mouse_Down *evas_event, 121ecore_imf_evas_event_mouse_down_wrap(Evas_Event_Mouse_Down *evas_event,
161 Ecore_IMF_Event_Mouse_Down *imf_event) 122 Ecore_IMF_Event_Mouse_Down *imf_event)
@@ -174,13 +135,6 @@ ecore_imf_evas_event_mouse_down_wrap(Evas_Event_Mouse_Down *evas_event,
174 _ecore_imf_evas_event_mouse_flags_wrap(evas_event->flags, &imf_event->flags); 135 _ecore_imf_evas_event_mouse_flags_wrap(evas_event->flags, &imf_event->flags);
175} 136}
176 137
177/**
178 * Converts a "mouse_up" event from Evas to the corresponding event of Ecore_IMF.
179 *
180 * @param evas_event The received Evas event.
181 * @param imf_event The location to store the converted Ecore_IMF event.
182 * @ingroup Ecore_IMF_Evas_Group
183 */
184EAPI void 138EAPI void
185ecore_imf_evas_event_mouse_up_wrap(Evas_Event_Mouse_Up *evas_event, 139ecore_imf_evas_event_mouse_up_wrap(Evas_Event_Mouse_Up *evas_event,
186 Ecore_IMF_Event_Mouse_Up *imf_event) 140 Ecore_IMF_Event_Mouse_Up *imf_event)
@@ -199,13 +153,6 @@ ecore_imf_evas_event_mouse_up_wrap(Evas_Event_Mouse_Up *evas_event,
199 _ecore_imf_evas_event_mouse_flags_wrap(evas_event->flags, &imf_event->flags); 153 _ecore_imf_evas_event_mouse_flags_wrap(evas_event->flags, &imf_event->flags);
200} 154}
201 155
202/**
203 * Converts a "mouse_wheel" event from Evas to the corresponding event of Ecore_IMF.
204 *
205 * @param evas_event The received Evas event.
206 * @param imf_event The location to store the converted Ecore_IMF event.
207 * @ingroup Ecore_IMF_Evas_Group
208 */
209EAPI void 156EAPI void
210ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_event, 157ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_event,
211 Ecore_IMF_Event_Mouse_Wheel *imf_event) 158 Ecore_IMF_Event_Mouse_Wheel *imf_event)
@@ -225,35 +172,6 @@ ecore_imf_evas_event_mouse_wheel_wrap(Evas_Event_Mouse_Wheel *evas_event,
225 imf_event->timestamp = evas_event->timestamp; 172 imf_event->timestamp = evas_event->timestamp;
226} 173}
227 174
228/**
229 * Converts a "key_down" event from Evas to the corresponding event of Ecore_IMF.
230 *
231 * @param evas_event The received Evas event.
232 * @param imf_event The location to store the converted Ecore_IMF event.
233 * @ingroup Ecore_IMF_Evas_Group
234 *
235 * Example
236 * @code
237 * static void
238 * _key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
239 * {
240 * Evas_Event_Key_Down *ev = event_info;
241 * if (!ev->keyname) return;
242 *
243 * if (imf_context)
244 * {
245 * Ecore_IMF_Event_Key_Down ecore_ev;
246 * ecore_imf_evas_event_key_down_wrap(ev, &ecore_ev);
247 * if (ecore_imf_context_filter_event(imf_context,
248 * ECORE_IMF_EVENT_KEY_DOWN,
249 * (Ecore_IMF_Event *)&ecore_ev))
250 * return;
251 * }
252 * }
253 *
254 * evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, data);
255 * @endcode
256 */
257EAPI void 175EAPI void
258ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event, 176ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event,
259 Ecore_IMF_Event_Key_Down *imf_event) 177 Ecore_IMF_Event_Key_Down *imf_event)
@@ -270,35 +188,6 @@ ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event,
270 _ecore_imf_evas_event_locks_wrap(evas_event->locks, &imf_event->locks); 188 _ecore_imf_evas_event_locks_wrap(evas_event->locks, &imf_event->locks);
271} 189}
272 190
273/**
274 * Converts a "key_up" event from Evas to the corresponding event of Ecore_IMF.
275 *
276 * @param evas_event The received Evas event.
277 * @param imf_event The location to store the converted Ecore_IMF event.
278 * @ingroup Ecore_IMF_Evas_Group
279 *
280 * Example
281 * @code
282 * static void
283 * _key_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
284 * {
285 * Evas_Event_Key_Up *ev = event_info;
286 * if (!ev->keyname) return;
287 *
288 * if (imf_context)
289 * {
290 * Ecore_IMF_Event_Key_Up ecore_ev;
291 * ecore_imf_evas_event_key_up_wrap(ev, &ecore_ev);
292 * if (ecore_imf_context_filter_event(imf_context,
293 * ECORE_IMF_EVENT_KEY_UP,
294 * (Ecore_IMF_Event *)&ecore_ev))
295 * return;
296 * }
297 * }
298 *
299 * evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_UP, _key_up_cb, data);
300 * @endcode
301 */
302EAPI void 191EAPI void
303ecore_imf_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event, 192ecore_imf_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event,
304 Ecore_IMF_Event_Key_Up *imf_event) 193 Ecore_IMF_Event_Key_Up *imf_event)