summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/canvas/evas_focus.c
blob: 5b5a6c7acfb394f78ed63bff7efd3208c7f0f162 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include "evas_common.h"
#include "evas_private.h"

/* private calls */

/* local calls */

/* public calls */

/**
 * To be documented.
 *
 * FIXME: To be fixed.
 *
 */
void
evas_object_focus_set(Evas_Object *obj, Evas_Bool focus)
{
   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
   return;
   MAGIC_CHECK_END();

   if (focus)
     {
	if (obj->focused) return;
	if (obj->layer->evas->focused)
	  evas_object_focus_set(obj->layer->evas->focused, 0);
	obj->focused = 1;
	obj->layer->evas->focused = obj;
	evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL);
     }
   else
     {
	if (!obj->focused) return;
	obj->focused = 0;
	obj->layer->evas->focused = NULL;
	evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL);
     }
}

/**
 * To be documented.
 *
 * FIXME: To be fixed.
 *
 */
Evas_Bool
evas_object_focus_get(Evas_Object *obj)
{
   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
   return 0;
   MAGIC_CHECK_END();
   return obj->focused;
}

/**
 * To be documented.
 *
 * FIXME: To be fixed.
 *
 */
Evas_Object *
evas_focus_get(Evas *e)
{
   MAGIC_CHECK(e, Evas, MAGIC_EVAS);
   return NULL;
   MAGIC_CHECK_END();
   return e->focused;
}