diff options
Diffstat (limited to 'libraries/evas/src/lib/canvas/evas_focus.c')
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_focus.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_focus.c b/libraries/evas/src/lib/canvas/evas_focus.c deleted file mode 100644 index 29da7e7..0000000 --- a/libraries/evas/src/lib/canvas/evas_focus.c +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | #include "evas_common.h" | ||
2 | #include "evas_private.h" | ||
3 | |||
4 | /* private calls */ | ||
5 | |||
6 | /* local calls */ | ||
7 | |||
8 | /* public calls */ | ||
9 | |||
10 | EAPI void | ||
11 | evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) | ||
12 | { | ||
13 | int event_id = 0; | ||
14 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
15 | return; | ||
16 | MAGIC_CHECK_END(); | ||
17 | |||
18 | _evas_object_event_new(); | ||
19 | |||
20 | event_id = _evas_event_counter; | ||
21 | if (focus) | ||
22 | { | ||
23 | if (obj->focused) goto end; | ||
24 | if (obj->layer->evas->focused) | ||
25 | evas_object_focus_set(obj->layer->evas->focused, 0); | ||
26 | obj->focused = 1; | ||
27 | obj->layer->evas->focused = obj; | ||
28 | evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id); | ||
29 | evas_event_callback_call(obj->layer->evas, | ||
30 | EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj); | ||
31 | } | ||
32 | else | ||
33 | { | ||
34 | if (!obj->focused) goto end; | ||
35 | obj->focused = 0; | ||
36 | obj->layer->evas->focused = NULL; | ||
37 | evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id); | ||
38 | evas_event_callback_call(obj->layer->evas, | ||
39 | EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj); | ||
40 | } | ||
41 | end: | ||
42 | _evas_post_event_callback_call(obj->layer->evas); | ||
43 | } | ||
44 | |||
45 | EAPI Eina_Bool | ||
46 | evas_object_focus_get(const Evas_Object *obj) | ||
47 | { | ||
48 | MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); | ||
49 | return 0; | ||
50 | MAGIC_CHECK_END(); | ||
51 | return obj->focused; | ||
52 | } | ||
53 | |||
54 | EAPI Evas_Object * | ||
55 | evas_focus_get(const Evas *e) | ||
56 | { | ||
57 | MAGIC_CHECK(e, Evas, MAGIC_EVAS); | ||
58 | return NULL; | ||
59 | MAGIC_CHECK_END(); | ||
60 | return e->focused; | ||
61 | } | ||