-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevas_object.js
More file actions
77 lines (62 loc) · 1.07 KB
/
evas_object.js
File metadata and controls
77 lines (62 loc) · 1.07 KB
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
70
71
72
73
74
75
76
77
/* functions to create and manipulate evas objects */
function _evas_object_add(evas, type)
{
this.type = type;
this.x = 0;
this.y = 0;
this.w = 1;
this.h = 1;
this.visible = false;
return this;
}
function evas_object_add(evas, type)
{
var o = new _evas_object_add(evas, type);
evas_object_append(evas, o);
return o;
}
function evas_object_evas_get(o)
{
return o.evas;
}
function evas_object_del(o)
{
evas_object_del(evas_object_evas_get(o), o);
}
function evas_object_visible_get(o)
{
return o.visible;
}
function evas_object_show(o, v)
{
o.visible = v;
}
function evas_object_move(o, x, y)
{
o.x = x;
o.y = y;
}
function evas_object_resize(o, w, h)
{
o.w = w;
o.h = h;
}
function evas_object_geometry_get(o)
{
return {x : o.x, y : o.y, w : o.w, h : o.h};
}
function evas_object_rectangle_add(evas)
{
var o = evas_object_add(evas, EVAS_OBJECT_RECTANGLE);
o.color = "white";
return o;
}
function evas_object_rectangle_color_set(o, c)
{
o.color = c;
}
function evas_object_rectangle_color_get(o)
{
console.log("Rectangle color: %s", o.color);
return o.color;
}