aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2016-07-26 18:21:02 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2016-08-02 14:13:40 -0300
commitfa58855f7765bcbfc1a5bd9b666fc017298ea62c (patch)
tree98a1bbf0cba7cd9c2637972616939dfaa8160e8a
parenteo_js: Instead of abort, throw an Exception (diff)
downloadefl-fa58855f7765bcbfc1a5bd9b666fc017298ea62c.tar.gz
efl_js: Update JS examplesdevs/felipealmeida/js-next
Changing imports, functions, etc.
-rw-r--r--src/examples/elementary/bg_example_01.js13
-rw-r--r--src/examples/elementary/bg_example_02.js16
-rw-r--r--src/examples/elementary/box_js_example_01.js24
-rw-r--r--src/examples/elementary/box_js_example_02.js55
-rw-r--r--src/examples/elementary/bubble_example_01.js29
-rw-r--r--src/examples/elementary/button_example_00.js8
-rw-r--r--src/examples/elementary/button_example_01.js129
-rw-r--r--src/examples/elementary/calendar_example_01.js12
-rw-r--r--src/examples/elementary/calendar_example_02.js13
-rw-r--r--src/examples/elementary/calendar_example_03.js12
-rw-r--r--src/examples/elementary/calendar_example_04.js30
-rw-r--r--src/examples/elementary/calendar_example_05.js15
-rw-r--r--src/examples/elementary/clock_example.js27
-rw-r--r--src/examples/elementary/datetime_example.js49
-rw-r--r--src/examples/elementary/icon_example_01.js11
15 files changed, 231 insertions, 212 deletions
diff --git a/src/examples/elementary/bg_example_01.js b/src/examples/elementary/bg_example_01.js
index 227259b63a..2a4e9214d7 100644
--- a/src/examples/elementary/bg_example_01.js
+++ b/src/examples/elementary/bg_example_01.js
@@ -1,13 +1,14 @@
-var elm = require('elm')
+var efl = require('efl');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Bg Plain");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Bg Plain");
win.setAutohide(true);
-bg = new elm.Elm.Bg(win);
-bg.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bg);
+bg = new efl.Elm.Bg(win);
+bg.setColor(255, 0,0,255)
+bg.setHintWeight(1.0, 1.0);
+win.pack(bg);
bg.setVisible(true);
win.setSize(320,320);
diff --git a/src/examples/elementary/bg_example_02.js b/src/examples/elementary/bg_example_02.js
index e8e1a63e0f..72a9f49d60 100644
--- a/src/examples/elementary/bg_example_02.js
+++ b/src/examples/elementary/bg_example_02.js
@@ -1,18 +1,18 @@
-elm = require('elm');
+var efl = require('efl');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Bg Image");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Bg Plain");
win.setAutohide(true);
-bg = new elm.Elm.Bg(win);
+bg = new efl.Elm.Bg(win);
bg.setLoadSize(20,20);
-bg.setOption(elm.Elm.Bg.Option.CENTER);
+bg.setOption(efl.Elm.Bg.Option.CENTER);
//TODO: elm_app_data_dir_get
-bg.setFile('../../data/images/plant_01.jpg', null);
-bg.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bg);
+bg.setFile(__dirname + '/../../../data/elementary/images/plant_01.jpg', null);
+bg.setHintWeight(1.0, 1.0);
+win.pack(bg);
bg.setVisible(true);
win.setSize(320, 320);
diff --git a/src/examples/elementary/box_js_example_01.js b/src/examples/elementary/box_js_example_01.js
index ba7761da5c..e09d56abbc 100644
--- a/src/examples/elementary/box_js_example_01.js
+++ b/src/examples/elementary/box_js_example_01.js
@@ -1,27 +1,27 @@
-var elm = require('elm')
+var efl = require('efl');
-win = new elm.Elm.WinStandard(null);
-win.setTitle('title');
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText('title');
win.setAutohide(true);
-bg = new elm.Elm.Bg(win);
-bg.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bg);
+bg = new efl.Elm.Bg(win);
+bg.setHintWeight(1.0, 1.0);
+win.pack(bg);
bg.setVisible(true);
-bx = new elm.Elm.Box(win);
-bx.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bx);
+bx = new efl.Efl.Ui.Box(win);
+bx.setHintWeight(1.0, 1.0);
+win.pack(bx);
-entry = new elm.Elm.Label(win);
+entry = new efl.Elm.Label(win);
entry.setSize(100, 100);
entry.setText(null, "Texto");
console.log('Texto: ', entry.getText(null));
-entry.setSizeHintWeight(1.0, 1.0);
-entry.setSizeHintAlign(-1.0, -1.0);
+entry.setHintWeight(1.0, 1.0);
+entry.setHintAlign(-1.0, -1.0);
entry.setWrapWidth(50);
bx.packEnd(entry);
entry.setVisible(true);
diff --git a/src/examples/elementary/box_js_example_02.js b/src/examples/elementary/box_js_example_02.js
index 63684df026..99e74f58ea 100644
--- a/src/examples/elementary/box_js_example_02.js
+++ b/src/examples/elementary/box_js_example_02.js
@@ -1,16 +1,15 @@
var efl = require('efl')
-var elm = require('elm')
_add_cb = function(){
- var btn = new elm.Elm.Button(win);
+ var btn = new efl.Elm.Button(win);
btn.setText("elm.text", "I do nothing");
bx.packEnd(btn);
btn.setVisible(true);
}
_clear_cb = function(){
- bx.clear();
+ bx.clearPack();
}
_unpack_cb = function(btn){
@@ -18,61 +17,63 @@ _unpack_cb = function(btn){
btn.setColor(128, 64, 0, 128)
}
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Box example");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Box example");
win.setAutohide(true);
-bg = new elm.Elm.Bg(win);
-bg.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bg);
+bg = new efl.Elm.Bg(win);
+bg.setHintWeight(1.0, 1.0);
+win.pack(bg);
bg.setVisible(true);
-bigbox = new elm.Elm.Box(win)
-bigbox.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bigbox);
+bigbox = new efl.Efl.Ui.Box(win)
+bigbox.setHintWeight(1.0, 1.0);
+win.pack(bigbox);
-bx = new elm.Elm.Box(win)
-bx.setSizeHintWeight(1.0, 1.0);
-bx.setHorizontal(true);
+bx = new efl.Efl.Ui.Box(win);
+bx.setHintWeight(1.0, 1.0);
+// conflicts from Efl.Orientation and Elm.Widget
+bx.setOrientation(efl.Efl.Orient.HORIZONTAL);
bigbox.packEnd(bx);
bx.setVisible(true);
-bt = new elm.Elm.Button(win);
+bt = new efl.Elm.Button(win);
bt.setText("elm.text", "Add");
bx.packEnd(bt);
bt.setVisible(true);
bt.on('clicked', _add_cb);
-bt = new elm.Elm.Button(win);
+bt = new efl.Elm.Button(win);
bt.setText("elm.text", "Clear");
bx.packEnd(bt);
bt.setVisible(true);
bt.on('clicked', _clear_cb);
-bx = new elm.Elm.Box(win)
-bx.setSizeHintWeight(1.0, 1.0);
-bx.setSizeHintAlign(-1.0, -1.0);
-bx.setHorizontal(true);
+bx = new efl.Efl.Ui.Box(win)
+bx.setHintWeight(1.0, 1.0);
+bx.setHintAlign(-1.0, -1.0);
+// conflicts from Efl.Orientation and Elm.Widget
+bx.setOrientation(efl.Efl.Orient.HORIZONTAL);
bigbox.packEnd(bx);
bx.setVisible(true);
-bt = new elm.Elm.Button(win);
+bt = new efl.Elm.Button(win);
bt.setText("elm.text", "Button 1");
bx.packEnd(bt);
-bt.setSizeHintWeight(1.0, 1.0);
-bt.setSizeHintAlign(-1.0, -1.0);
+bt.setHintWeight(1.0, 1.0);
+bt.setHintAlign(-1.0, -1.0);
bt.setVisible(true);
bt.on('clicked', _unpack_cb);
-bt = new elm.Elm.Button(win);
+bt = new efl.Elm.Button(win);
bt.setText("elm.text", "Button 2");
bx.packEnd(bt);
-bt.setSizeHintWeight(1.0, 0.0);
-bt.setSizeHintAlign(1.0, 0.5);
+bt.setHintWeight(1.0, 0.0);
+bt.setHintAlign(1.0, 0.5);
bt.setVisible(true);
bt.on('clicked', _unpack_cb);
-bt = new elm.Elm.Button(win);
+bt = new efl.Elm.Button(win);
bt.setText("elm.text", "Button 3");
bx.packEnd(bt);
bt.setVisible(true);
diff --git a/src/examples/elementary/bubble_example_01.js b/src/examples/elementary/bubble_example_01.js
index d7b912b378..dcd889572c 100644
--- a/src/examples/elementary/bubble_example_01.js
+++ b/src/examples/elementary/bubble_example_01.js
@@ -1,31 +1,30 @@
efl = require('efl');
-elm = require('elm');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Bg Plain");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Bg Plain");
win.setAutohide(true);
-bg = new elm.Elm.Bg(win);
-bg.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bg);
+bg = new efl.Elm.Bg(win);
+bg.setHintWeight(1.0, 1.0);
+win.pack(bg);
bg.setVisible(true);
-label1 = new elm.Elm.Label(win);
-label1.setText(null, "Bubble with no icon, info or label");
+label1 = new efl.Elm.Label(win);
+label1.setText(null, "Bubble with icon, info and label");
label1.setVisible(true);
console.log(efl);
-icon = new efl.Evas.Rectangle(win);
+icon = new efl.Efl.Canvas.Rectangle(win);
icon.setColor( 0, 0, 255, 255);
icon.setVisible(true);
-bubble1 = new elm.Elm.Bubble(win);
-bubble1.contentSet("icon", icon);
+bubble1 = new efl.Elm.Bubble(win);
+// bubble1.setContent(icon);
bubble1.setText("info", "INFO");
bubble1.setText(null, "LABEL");
-bubble1.contentSet(null, label1);
+bubble1.setContent(label1);
bubble1.setSize(300, 100);
bubble1.setVisible(true);
@@ -40,12 +39,12 @@ bubble1.on('clicked',
bubble1.setPos(corner);
});
-label2 = new elm.Elm.Label(win);
+label2 = new efl.Elm.Label(win);
label2.setText(null, "Bubble with no icon, info or label");
label2.setVisible(true);
-bubble2 = new elm.Elm.Bubble(win);
-bubble2.contentSet(null, label2);
+bubble2 = new efl.Elm.Bubble(win);
+bubble2.setContent(label2);
bubble2.setSize(200, 50);
bubble2.setPosition(0, 110);
bubble2.setVisible(true);
diff --git a/src/examples/elementary/button_example_00.js b/src/examples/elementary/button_example_00.js
index f122bf1994..5a3674a71e 100644
--- a/src/examples/elementary/button_example_00.js
+++ b/src/examples/elementary/button_example_00.js
@@ -1,16 +1,16 @@
efl = require('efl');
-win = new efl.Elm.Win.Standard(null);
-win.setTitle("Hello, World!");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Hello, World!");
win.setAutohide(true);
btn = new efl.Elm.Button(win);
btn.setText(null, "Good-Bye, World!");
btn.setSize(120, 30);
btn.setPosition(60, 15);
-btn.setSizeHintWeight(1.0, 1.0);
-btn.setSizeHintAlign(1.0, 1.0);
+btn.setHintWeight(1.0, 1.0);
+btn.setHintAlign(1.0, 1.0);
btn.setVisible(true);
btn.on('clicked', function () { console.log('clicked'); } );
diff --git a/src/examples/elementary/button_example_01.js b/src/examples/elementary/button_example_01.js
index a959427c91..31e51d7b8d 100644
--- a/src/examples/elementary/button_example_01.js
+++ b/src/examples/elementary/button_example_01.js
@@ -1,5 +1,4 @@
efl = require('efl');
-elm = require('elm');
_btn_options_cb = function(_btn) {
var text = _btn.getText("elm.text");
@@ -31,13 +30,15 @@ _btn_cursors_move = function(_btn) {
console.log ("cursor move: ", size[0], size[1]);
if (!icon_still) {
- var icon = new elm.Elm.Icon(mid);
+ var icon = new efl.Elm.Icon(mid);
var icon_still_p = mid.contentUnset("icon");
if (icon_still_p) {
icon_still_p.setVisible(false);
}
- icon.setStandard("chat");
- mid.contentSet("icon", icon);
+ // FIXME fix icon support
+ // icon.setStandard("chat");
+ // mid.setContent("icon", icon);
+ mid.setText("elm.text", "chat");
}
if (_btn.getPosition()[1] == up.getPosition()[1]) {
@@ -56,78 +57,80 @@ _btn_cursors_move = function(_btn) {
ax += 0.05;
if (ax > 1.0) ax = 1.0;
}
- mid.setSizeHintAlign(ax, ay);
+ mid.setHintAlign(ax, ay);
}
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Button example");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Button example");
win.setAutohide(true);
-icon_still = new elm.Elm.Icon(win);
-mid = new elm.Elm.Button(win);
-up = new elm.Elm.Button(win);
-down = new elm.Elm.Button(win);
-left = new elm.Elm.Button(win);
-right = new elm.Elm.Button(win);
+icon_still = new efl.Elm.Icon(win);
+mid = new efl.Elm.Button(win);
+up = new efl.Elm.Button(win);
+down = new efl.Elm.Button(win);
+left = new efl.Elm.Button(win);
+right = new efl.Elm.Button(win);
_btn_cursors_release = function() {
if (icon_still)
{
- mid.contentSet("icon", icon_still);
+ // FIXME fix icon support
+ // mid.setContent("icon", icon_still);
icon_still = null;
+ mid.setText("elm.text", "icon_still");
}
}
-box = new elm.Elm.Box(win);
-box.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(box);
+box = new efl.Efl.Ui.Box(win);
+box.setHintWeight(1.0, 1.0);
+win.pack(box);
box.setVisible(true);
-box_initial = new elm.Elm.Box(win);
-box_initial.setHorizontal(true);
-box_initial.setSizeHintWeight(1.0, 0.0);
+box_initial = new efl.Efl.Ui.Box(win);
+box_initial.setOrientation(efl.Efl.Orient.HORIZONTAL);
+box_initial.setHintWeight(1.0, 0.0);
box.packEnd(box_initial);
box_initial.setVisible(true);
-btn = new elm.Elm.Button(win);
+btn = new efl.Elm.Button(win);
btn.setText("elm.text", "Initial: 0.0");
box_initial.packEnd(btn);
btn.setVisible(true);
btn.on('clicked', _btn_options_cb);
-btn2 = new elm.Elm.Button(win);
+btn2 = new efl.Elm.Button(win);
btn2.setText("elm.text", "Initial: 1.0");
box_initial.packEnd(btn2);
btn2.setVisible(true);
btn2.on('clicked', _btn_options_cb);
-btn3 = new elm.Elm.Button(win);
+btn3 = new efl.Elm.Button(win);
btn3.setText("elm.text", "Initial: 5.0");
box_initial.packEnd(btn3);
btn3.setVisible(true);
btn3.on('clicked', _btn_options_cb);
-box_gap = new elm.Elm.Box(win);
-box_gap.setHorizontal(true);
-box_gap.setSizeHintWeight(1.0, 0.0);
+box_gap = new efl.Efl.Ui.Box(win);
+box_gap.setOrientation(efl.Efl.Orient.HORIZONTAL);
+box_gap.setHintWeight(1.0, 0.0);
box.packEnd(box_gap);
box_gap.setVisible(true);
-btn4 = new elm.Elm.Button(win);
+btn4 = new efl.Elm.Button(win);
btn4.setText("elm.text", "Gap: 0.1");
box_gap.packEnd(btn4);
btn4.setVisible(true);
btn4.on('clicked', _btn_options_cb);
-btn5 = new elm.Elm.Button(win);
+btn5 = new efl.Elm.Button(win);
btn5.setText("elm.text", "Gap: 0.5");
box_gap.packEnd(btn5);
btn5.setVisible(true);
btn5.on('clicked', _btn_options_cb);
-btn6 = new elm.Elm.Button(win);
+btn6 = new efl.Elm.Button(win);
btn6.setText("elm.text", "Gap: 1.0");
box_gap.packEnd(btn6);
btn6.setVisible(true);
@@ -136,72 +139,82 @@ btn6.on('clicked', _btn_options_cb);
up.setAutorepeat(true);
up.setAutorepeatInitialTimeout(1.0);
up.setAutorepeatGapTimeout(0.5);
-up.setSizeHintWeight(1.0, 0.0);
-up.setSizeHintAlign(-1.0, 0.0);
+up.setHintWeight(1.0, 0.0);
+up.setHintAlign(-1.0, 0.0);
box.packEnd(up);
up.setVisible(true);
up.on('repeated', _btn_cursors_move)
up.on('unpressed', _btn_cursors_release);
-icon_up = new elm.Elm.Icon(win);
-icon_up.setStandard("arrow_up");
-up.contentSet("icon", icon_up);
-
-box_inferior = new elm.Elm.Box(win);
-box_inferior.setHorizontal(true);
-box_inferior.setSizeHintWeight(1.0, 1.0);
-box_inferior.setSizeHintAlign(-1.0, -1.0);
+// FIXME fix icon support.
+// icon_up = new efl.Elm.Icon(win);
+// icon_up.setIcon("arrow_up");
+// up.setIcon(icon_up);
+up.setText("elm.text", "up");
+
+box_inferior = new efl.Efl.Ui.Box(win);
+box_inferior.setOrientation(efl.Efl.Orient.HORIZONTAL);
+box_inferior.setHintWeight(1.0, 1.0);
+box_inferior.setHintAlign(-1.0, -1.0);
box.packEnd(box_inferior);
box_inferior.setVisible(true);
left.setAutorepeat(true);
left.setAutorepeatInitialTimeout(1.0);
left.setAutorepeatGapTimeout(0.5);
-left.setSizeHintWeight(0.0, 1.0);
-left.setSizeHintAlign(0.0, -1.0);
+left.setHintWeight(0.0, 1.0);
+left.setHintAlign(0.0, -1.0);
box_inferior.packEnd(left);
left.setVisible(true);
left.on('repeated', _btn_cursors_move)
left.on('unpressed', _btn_cursors_release);
-icon_left = new elm.Elm.Icon(win);
-icon_left.setStandard("arrow_left");
-left.contentSet("icon", icon_left);
+// FIXME fix icon support
+// icon_left = new efl.Elm.Icon(win);
+// icon_left.setStandard("arrow_left");
+// left.setContent("icon", icon_left);
+left.setText("elm.text", "left");
-mid.setSizeHintWeight(1.0, 1.0);
+mid.setHintWeight(1.0, 1.0);
box_inferior.packEnd(mid);
mid.setVisible(true);
-icon_mid = new elm.Elm.Icon(win);
-icon_mid.setStandard("close");
-mid.contentSet("icon", icon_mid);
+// FIXME fix icon support
+// icon_mid = new efl.Elm.Icon(win);
+// icon_mid.setStandard("close");
+// mid.setContent("icon", icon_mid);
+mid.setText("elm.text", "Close");
right.setAutorepeat(true);
right.setAutorepeatInitialTimeout(1.0);
right.setAutorepeatGapTimeout(0.5);
-right.setSizeHintWeight(0.0, 1.0);
-right.setSizeHintAlign(0.0, -1.0);
+right.setHintWeight(0.0, 1.0);
+right.setHintAlign(0.0, -1.0);
box_inferior.packEnd(right);
right.setVisible(true);
right.on('repeated', _btn_cursors_move);
right.on('unpressed', _btn_cursors_release);
-icon_right = new elm.Elm.Icon(win);
-icon_right.setStandard("arrow_right");
-right.contentSet("icon", icon_right);
+// FIXME fix icon support
+// icon_right = new efl.Elm.Icon(win);
+// icon_right.setStandard("arrow_right");
+// right.setIcon(icon_right);
+right.setText("elm.text", "right");
down.setAutorepeat(true);
down.setAutorepeatInitialTimeout(1.0);
down.setAutorepeatGapTimeout(0.5);
-down.setSizeHintWeight(1.0, 0.0);
-down.setSizeHintAlign(-1.0, 0.0);
+down.setHintWeight(1.0, 0.0);
+down.setHintAlign(-1.0, 0.0);
box.packEnd(down);
down.setVisible(true);
down.on('repeated', _btn_cursors_move);
down.on('unpressed', _btn_cursors_release);
-icon_down = new elm.Elm.Icon(win);
-icon_down.setStandard("arrow_down");
-down.contentSet("icon", icon_down);
+// FIXME fix icon support
+// icon_down = new efl.Elm.Icon(win);
+// icon_down.setStandard("arrow_down");
+// down.setIcon(icon_down);
+down.setText("elm.text", "Down");
win.setSize(300, 320);
win.setVisible(true);
diff --git a/src/examples/elementary/calendar_example_01.js b/src/examples/elementary/calendar_example_01.js
index 980bf83a29..bd0f1113ca 100644
--- a/src/examples/elementary/calendar_example_01.js
+++ b/src/examples/elementary/calendar_example_01.js
@@ -1,14 +1,14 @@
efl = require('efl');
-elm = require('elm');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Calendar Creation Example");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Calendar Creation Example");
win.setAutohide(true);
-cal = new elm.Elm.Calendar(win);
-cal.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(cal);
+cal = new efl.Elm.Calendar(win);
+cal.setHintWeight(1.0, 1.0);
+win.pack(cal);
+win.setSize(240, 240);
cal.setVisible(true);
win.setVisible(true);
diff --git a/src/examples/elementary/calendar_example_02.js b/src/examples/elementary/calendar_example_02.js
index c8b53fd755..535519266b 100644
--- a/src/examples/elementary/calendar_example_02.js
+++ b/src/examples/elementary/calendar_example_02.js
@@ -1,15 +1,16 @@
-elm = require('elm');
+efl = require('efl');
//var weekdays = ["S", "M", "T", "W", "T", "F", "S"];
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Calendar Layout Formatting Example");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Calendar Layout Formatting Example");
win.setAutohide(true);
-cal = new elm.Elm.Calendar(win);
-cal.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(cal);
+cal = new efl.Elm.Calendar(win);
+cal.setHintWeight(1.0, 1.0);
+win.pack(cal);
+win.setSize(240, 240);
//cal.format_function_set(funtion);
//cal.weekdays_names_set(weekdays);
diff --git a/src/examples/elementary/calendar_example_03.js b/src/examples/elementary/calendar_example_03.js
index 481079fc68..af6ed84148 100644
--- a/src/examples/elementary/calendar_example_03.js
+++ b/src/examples/elementary/calendar_example_03.js
@@ -1,14 +1,14 @@
efl = require('efl');
-elm = require('elm');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Calendar Min/Max Year Example");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Calendar Min/Max Year Example");
win.setAutohide(true);
-cal = new elm.Elm.Calendar(win);
-cal.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(cal);
+cal = new efl.Elm.Calendar(win);
+cal.setHintWeight(1.0, 1.0);
+win.pack(cal);
+win.setSize(240, 240);
cal.setMinMaxYear(2020,2022);
cal.setVisible(true);
diff --git a/src/examples/elementary/calendar_example_04.js b/src/examples/elementary/calendar_example_04.js
index 7f1094149a..5f2352593b 100644
--- a/src/examples/elementary/calendar_example_04.js
+++ b/src/examples/elementary/calendar_example_04.js
@@ -1,27 +1,26 @@
-elm = require('efl');
-elm = require('elm');
+efl = require('efl');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Calendar Day Selection Example");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Calendar Day Selection Example");
win.setAutohide(true);
-box = new elm.Elm.Box(win);
-box.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(box);
+box = new efl.Efl.Ui.Box(win);
+box.setHintWeight(1.0, 1.0);
+win.pack(box);
box.setVisible(true);
-cal = new elm.Elm.Calendar(win);
-cal.setSizeHintWeight(1.0, 1.0);
-cal.setSizeHintAlign(-1.0, -1.0);
-cal.setSelectMode(elm.Elm.Calendar.Select.Mode.NONE);
-win.resizeObjectAdd(cal);
+cal = new efl.Elm.Calendar(win);
+cal.setHintWeight(1.0, 1.0);
+cal.setHintAlign(-1.0, -1.0);
+cal.setSelectMode(efl.Elm.Calendar.Select.Mode.NONE);
+win.pack(cal);
cal.setVisible(true);
box.packEnd(cal);
-cal2 = new elm.Elm.Calendar(win);
-cal2.setSizeHintWeight(1.0, 1.0);
-cal2.setSizeHintAlign(-1.0, -1.0);
+cal2 = new efl.Elm.Calendar(win);
+cal2.setHintWeight(1.0, 1.0);
+cal2.setHintAlign(-1.0, -1.0);
// selected_time_set uses tm* struct
//dateCurrent = new Date();
//dateSelected = dateCurrent.getSeconds() + 2 * 3600 * 24;
@@ -29,4 +28,5 @@ cal2.setSizeHintAlign(-1.0, -1.0);
cal2.setVisible(true);
box.packEnd(cal2);
+win.setSize(240, 480);
win.setVisible(true);
diff --git a/src/examples/elementary/calendar_example_05.js b/src/examples/elementary/calendar_example_05.js
index 7759b2da8b..d29f8b58b4 100644
--- a/src/examples/elementary/calendar_example_05.js
+++ b/src/examples/elementary/calendar_example_05.js
@@ -1,5 +1,5 @@
-elm = require('elm');
+efl = require('efl');
_print_cal_info_cb = function ()
{
@@ -7,7 +7,7 @@ _print_cal_info_cb = function ()
var interval = cal.getInterval();
var mm_yr = cal.getMinMaxYear();
- var sel_enable = cal.getSelectMode() != elm.Elm.Calendar.Select.Mode.NONE;
+ var sel_enable = cal.getSelectMode() != efl.Elm.Calendar.Select.Mode.NONE;
var wds = cal.getWeekdaysNames();
console.log("weekdays= " + wds + ", interval= " + interval +
@@ -15,13 +15,14 @@ _print_cal_info_cb = function ()
}
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Calendar Getters Example");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Calendar Getters Example");
win.setAutohide(true);
-cal = new elm.Elm.Calendar(win);
-cal.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(cal);
+cal = new efl.Elm.Calendar(win);
+cal.setHintWeight(1.0, 1.0);
+win.pack(cal);
+win.setSize(240, 240);
cal.on('changed', _print_cal_info_cb);
diff --git a/src/examples/elementary/clock_example.js b/src/examples/elementary/clock_example.js
index f13c07e721..313a30d3a0 100644
--- a/src/examples/elementary/clock_example.js
+++ b/src/examples/elementary/clock_example.js
@@ -1,30 +1,32 @@
-elm = require('elm');
+efl = require('efl');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Clock Example");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Clock Example");
win.setAutohide(true);
+win.setSize(480, 240);
-bx = new elm.Elm.Box(win);
-bx.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bx);
+bx = new efl.Efl.Ui.Box(win);
+bx.setHintWeight(1.0, 1.0);
+win.pack(bx);
bx.setVisible(true);
+bx.setOrientation(efl.Efl.Orient.VERTICAL);
-ck = new elm.Elm.Clock(win);
+ck = new efl.Elm.Clock(win);
bx.packEnd(ck);
ck.setVisible(true);
-ck2 = new elm.Elm.Clock(win);
+ck2 = new efl.Elm.Clock(win);
ck2.setShowAmPm(true);
bx.packEnd(ck2);
ck2.setVisible(true);
-ck3 = new elm.Elm.Clock(win);
+ck3 = new efl.Elm.Clock(win);
ck3.setShowSeconds(true);
ck3.setTime(10, 11, 12);
bx.packEnd(ck3);
ck3.setVisible(true);
-ck4 = new elm.Elm.Clock(win);
+ck4 = new efl.Elm.Clock(win);
ck4.setEdit(true);
ck4.setShowSeconds(true);
ck4.setShowAmPm(true);
@@ -32,12 +34,13 @@ ck4.setTime(10, 11, 12);
bx.packEnd(ck4);
ck4.setVisible(true);
-ck5 = new elm.Elm.Clock(win);
+ck5 = new efl.Elm.Clock(win);
ck5.setShowSeconds(true);
ck5.setEdit(true);
-digedit = elm.Elm.Clock.EditMode.HOUR_UNIT | elm.Elm.Clock.EditMode.MIN_UNIT | elm.Elm.Clock.EditMode.SEC_UNIT;
+digedit = efl.Elm.Clock.EditMode.HOUR_UNIT | efl.Elm.Clock.EditMode.MIN_UNIT | efl.Elm.Clock.EditMode.SEC_UNIT;
ck5.setEditMode(digedit);
bx.packEnd(ck5);
ck5.setVisible(true);
+
win.setVisible(true);
diff --git a/src/examples/elementary/datetime_example.js b/src/examples/elementary/datetime_example.js
index 92b361ec8a..0047d03c24 100644
--- a/src/examples/elementary/datetime_example.js
+++ b/src/examples/elementary/datetime_example.js
@@ -1,41 +1,42 @@
-elm = require('elm');
+efl = require('efl');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Datetime");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Datetime");
win.setAutohide(true);
+win.setSize(320,240);
-bg = new elm.Elm.Bg(win);
-bg.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bg);
+bg = new efl.Elm.Bg(win);
+bg.setHintWeight(1.0, 1.0);
+win.pack(bg);
bg.setVisible(true);
-bx = new elm.Elm.Box(win);
-bx.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(bx);
+bx = new efl.Efl.Ui.Box(win);
+bx.setHintWeight(1.0, 1.0);
+win.pack(bx);
bx.setVisible(true);
-datetime = new elm.Elm.Datetime(bx);
-datetime.setSizeHintWeight(1.0, 1.0);
-datetime.setSizeHintAlign(-1.0, 0.5);
-datetime.fieldVisibleSet(elm.Elm.Datetime.FieldType.HOUR, false);
-datetime.fieldVisibleSet(elm.Elm.Datetime.FieldType.MINUTE, false);
-datetime.fieldVisibleSet(elm.Elm.Datetime.FieldType.AMPM, false);
+datetime = new efl.Elm.Datetime(bx);
+datetime.setHintWeight(1.0, 1.0);
+datetime.setHintAlign(-1.0, 0.5);
+datetime.setFieldVisible(efl.Elm.Datetime.FieldType.HOUR, false);
+datetime.setFieldVisible(efl.Elm.Datetime.FieldType.MINUTE, false);
+datetime.setFieldVisible(efl.Elm.Datetime.FieldType.AMPM, false);
bx.packEnd(datetime);
datetime.setVisible(true);
-datetime = new elm.Elm.Datetime(bx);
-datetime.setSizeHintWeight(1.0, 1.0);
-datetime.setSizeHintAlign(-1.0, 0.5);
-datetime.fieldVisibleSet(elm.Elm.Datetime.FieldType.YEAR, false);
-datetime.fieldVisibleSet(elm.Elm.Datetime.FieldType.MONTH, false);
-datetime.fieldVisibleSet(elm.Elm.Datetime.FieldType.DATE, false);
+datetime = new efl.Elm.Datetime(bx);
+datetime.setHintWeight(1.0, 1.0);
+datetime.setHintAlign(-1.0, 0.5);
+datetime.setFieldVisible(efl.Elm.Datetime.FieldType.YEAR, false);
+datetime.setFieldVisible(efl.Elm.Datetime.FieldType.MONTH, false);
+datetime.setFieldVisible(efl.Elm.Datetime.FieldType.DATE, false);
bx.packEnd(datetime);
datetime.setVisible(true);
-datetime = new elm.Elm.Datetime(bx);
-datetime.setSizeHintWeight(1.0, 1.0);
-datetime.setSizeHintAlign(-1.0, 0.5);
+datetime = new efl.Elm.Datetime(bx);
+datetime.setHintWeight(1.0, 1.0);
+datetime.setHintAlign(-1.0, 0.5);
bx.packEnd(datetime);
datetime.setVisible(true);
diff --git a/src/examples/elementary/icon_example_01.js b/src/examples/elementary/icon_example_01.js
index a1689349c9..78f6e2b1e1 100644
--- a/src/examples/elementary/icon_example_01.js
+++ b/src/examples/elementary/icon_example_01.js
@@ -1,12 +1,11 @@
efl = require('efl');
-elm = require('elm');
-win = new elm.Elm.WinStandard(null);
-win.setTitle("Icon Plain");
+win = new efl.Efl.Ui.Win.Standard(null);
+win.setText("Icon Plain");
win.setAutohide(true);
-icon = new elm.Elm.Icon(win);
+icon = new efl.Elm.Icon(win);
//icon.order_lookup_set(ELM_ICON_LOOKUP_THEME_FDO); Ja eh o default
icon.setStandard("home");
@@ -25,8 +24,8 @@ icon.setResizable(false, true);
icon.setSmooth(false);
icon.setFillOutside(true);
-icon.setSizeHintWeight(1.0, 1.0);
-win.resizeObjectAdd(icon);
+icon.setHintWeight(1.0, 1.0);
+win.pack(icon);
icon.setVisible(true);
win.setSize(320, 320);