summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_focus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_focus.c')
-rw-r--r--src/lib/evas/canvas/evas_focus.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/lib/evas/canvas/evas_focus.c b/src/lib/evas/canvas/evas_focus.c
index cac96b6..2ea81b7 100644
--- a/src/lib/evas/canvas/evas_focus.c
+++ b/src/lib/evas/canvas/evas_focus.c
@@ -7,22 +7,14 @@
7 7
8/* public calls */ 8/* public calls */
9 9
10EAPI void 10EOLIAN void
11evas_object_focus_set(Evas_Object *eo_obj, Eina_Bool focus) 11_evas_object_focus_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool focus)
12{ 12{
13 eo_do(eo_obj, evas_obj_focus_set(focus));
14}
15
16void
17_focus_set(Eo *eo_obj, void *_pd, va_list *list)
18{
19 Eina_Bool focus = va_arg(*list, int);
20 13
21 int event_id = 0; 14 int event_id = 0;
22 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); 15 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
23 return; 16 return;
24 MAGIC_CHECK_END(); 17 MAGIC_CHECK_END();
25 Evas_Object_Protected_Data *obj = _pd;
26 18
27 _evas_object_event_new(); 19 _evas_object_event_new();
28 20
@@ -54,24 +46,10 @@ _focus_set(Eo *eo_obj, void *_pd, va_list *list)
54 _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas); 46 _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
55} 47}
56 48
57EAPI Eina_Bool 49EOLIAN Eina_Bool
58evas_object_focus_get(const Evas_Object *eo_obj) 50_evas_object_focus_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
59{ 51{
60 MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ); 52 return obj->focused;
61 return 0;
62 MAGIC_CHECK_END();
63 Eina_Bool focus = 0;
64 eo_do((Eo *)eo_obj, evas_obj_focus_get(&focus));
65 return focus;
66}
67
68void
69_focus_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
70{
71 Eina_Bool *focus = va_arg(*list, Eina_Bool *);
72
73 const Evas_Object_Protected_Data *obj = _pd;
74 *focus = obj->focused;
75} 53}
76 54
77EAPI Evas_Object * 55EAPI Evas_Object *