summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2017-05-18 21:23:58 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-06-19 17:36:41 -0300
commitc4558e2910d8453f9e3893d405f916d02656dc9f (patch)
tree99424820b1004365e749831602d9e8f89020bc4f
parenta5e980fbbc24d11daec25436a5bff32ce61911bd (diff)
downloadefl-c4558e2910d8453f9e3893d405f916d02656dc9f.tar.gz
js: Update after many elm/efl.ui changes
- Win.Standard - Photocam to Image.Zoomable rename - Widget namespace changes (elm -> efl.ui) - setText/setPartText changes (see 3eb649b18)
-rw-r--r--src/bindings/js/efl_js/efl_js.cc37
-rw-r--r--src/examples/elementary/bg_example_01.js2
-rw-r--r--src/examples/elementary/bg_example_02.js2
-rw-r--r--src/examples/elementary/box_js_example_01.js6
-rw-r--r--src/examples/elementary/box_js_example_02.js26
-rw-r--r--src/examples/elementary/button_example_00.js6
-rw-r--r--src/examples/elementary/button_example_01.js46
-rw-r--r--src/examples/elementary/calendar_example_01.js2
-rw-r--r--src/examples/elementary/calendar_example_02.js2
-rw-r--r--src/examples/elementary/calendar_example_03.js2
-rw-r--r--src/examples/elementary/calendar_example_04.js2
-rw-r--r--src/examples/elementary/calendar_example_05.js6
-rw-r--r--src/examples/elementary/clock_example.js2
-rw-r--r--src/examples/elementary/icon_example_01.js2
-rw-r--r--src/examples/elementary/layout_example.js4
-rw-r--r--src/examples/elementary/menu_example_01.js4
-rw-r--r--src/examples/elementary/popup_example_01.js6
-rw-r--r--src/examples/elementary/radio_example_01.js18
-rw-r--r--src/examples/elementary/slider_example.js4
-rw-r--r--src/examples/elementary/spinner_example.js2
-rw-r--r--src/examples/elementary/table_example_01.js2
-rw-r--r--src/examples/elementary/thumb_example_01.js2
-rw-r--r--src/examples/elementary/twitter_example_01.js8
23 files changed, 99 insertions, 94 deletions
diff --git a/src/bindings/js/efl_js/efl_js.cc b/src/bindings/js/efl_js/efl_js.cc
index bd85703549..8a5e7ba735 100644
--- a/src/bindings/js/efl_js/efl_js.cc
+++ b/src/bindings/js/efl_js/efl_js.cc
@@ -78,17 +78,27 @@ EAPI void register_text_properties(v8::Handle<v8::Object> global, v8::Isolate* i
}
namespace efl { namespace ui {
+EAPI void register_button(v8::Handle<v8::Object> global, v8::Isolate* isolate);
+EAPI void register_check(v8::Handle<v8::Object> global, v8::Isolate* isolate);
+EAPI void register_progressbar(v8::Handle<v8::Object> global, v8::Isolate* isolate);
+EAPI void register_radio(v8::Handle<v8::Object> global, v8::Isolate* isolate);
+EAPI void register_slider(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_video(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_flip(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_frame(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_box(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_image(v8::Handle<v8::Object> global, v8::Isolate* isolate);
+EAPI void register_win(v8::Handle<v8::Object> global, v8::Isolate* isolate);
}}
-namespace efl { namespace ui { namespace win {
-EAPI void register_standard(v8::Handle<v8::Object> global, v8::Isolate* isolate);
+namespace efl { namespace ui { namespace image {
+EAPI void register_zoomable(v8::Handle<v8::Object> global, v8::Isolate* isolate);
}}}
+namespace efl { namespace ui { namespace image { namespace zoomable {
+EAPI void register_pan(v8::Handle<v8::Object> global, v8::Isolate* isolate);
+}}}}
+
namespace efl { namespace canvas {
EAPI void register_object(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_group(v8::Handle<v8::Object> global, v8::Isolate* isolate);
@@ -158,9 +168,7 @@ EAPI void register_elm_pan(v8::Handle<v8::Object> global, v8::Isolate* isolate);
namespace elm {
EAPI void register_bg(v8::Handle<v8::Object> global, v8::Isolate* isolate);
-EAPI void register_button(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_calendar(v8::Handle<v8::Object> global, v8::Isolate* isolate);
-EAPI void register_check(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_clock(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_colorselector(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_conformant(v8::Handle<v8::Object> global, v8::Isolate* isolate);
@@ -189,16 +197,11 @@ EAPI void register_multibuttonentry(v8::Handle<v8::Object> global, v8::Isolate*
EAPI void register_notify(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_panel(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_panes(v8::Handle<v8::Object> global, v8::Isolate* isolate);
-EAPI void register_photocam(v8::Handle<v8::Object> global, v8::Isolate* isolate);
-EAPI void register_photocam_pan(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_player(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_plug(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_popup(v8::Handle<v8::Object> global, v8::Isolate* isolate);
-EAPI void register_progressbar(v8::Handle<v8::Object> global, v8::Isolate* isolate);
-EAPI void register_radio(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_route(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_scroller(v8::Handle<v8::Object> global, v8::Isolate* isolate);
-EAPI void register_slider(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_spinner(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_systray(v8::Handle<v8::Object> global, v8::Isolate* isolate);
EAPI void register_toolbar(v8::Handle<v8::Object> global, v8::Isolate* isolate);
@@ -327,10 +330,10 @@ EAPI void init(v8::Handle<v8::Object> exports)
// elm::register_box(exports, v8::Isolate::GetCurrent());
elm::register_bg(exports, v8::Isolate::GetCurrent());
- elm::register_button(exports, v8::Isolate::GetCurrent());
+ efl::ui::register_button(exports, v8::Isolate::GetCurrent());
elm::register_calendar(exports, v8::Isolate::GetCurrent());
- elm::register_check(exports, v8::Isolate::GetCurrent());
+ efl::ui::register_check(exports, v8::Isolate::GetCurrent());
// crash
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
@@ -423,9 +426,9 @@ EAPI void init(v8::Handle<v8::Object> exports)
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
elm::register_panes(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
- elm::register_photocam(exports, v8::Isolate::GetCurrent());
+ efl::ui::image::register_zoomable(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
- // elm::register_photocam_pan(exports, v8::Isolate::GetCurrent());
+ // efl::ui::image::zoomable::register_pan(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
elm::register_player(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
@@ -433,9 +436,9 @@ EAPI void init(v8::Handle<v8::Object> exports)
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
elm::register_popup(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
- elm::register_progressbar(exports, v8::Isolate::GetCurrent());
+ efl::ui::register_progressbar(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
- elm::register_radio(exports, v8::Isolate::GetCurrent());
+ efl::ui::register_radio(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
@@ -443,7 +446,7 @@ EAPI void init(v8::Handle<v8::Object> exports)
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
elm::register_scroller(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
- elm::register_slider(exports, v8::Isolate::GetCurrent());
+ efl::ui::register_slider(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
elm::register_spinner(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
@@ -465,7 +468,7 @@ EAPI void init(v8::Handle<v8::Object> exports)
// crash
// elm::register_win(exports, v8::Isolate::GetCurrent());
fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
- efl::ui::win::register_standard(exports, v8::Isolate::GetCurrent());
+ efl::ui::register_win(exports, v8::Isolate::GetCurrent());
// fprintf(stderr, __FILE__ ":%d\n", __LINE__); fflush(stderr);
// elm::register_widget_item(exports, v8::Isolate::GetCurrent());
diff --git a/src/examples/elementary/bg_example_01.js b/src/examples/elementary/bg_example_01.js
index 5b8756fa9e..410cb3a230 100644
--- a/src/examples/elementary/bg_example_01.js
+++ b/src/examples/elementary/bg_example_01.js
@@ -1,7 +1,7 @@
var efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Bg Plain");
win.setAutohide(true);
diff --git a/src/examples/elementary/bg_example_02.js b/src/examples/elementary/bg_example_02.js
index b38cae9281..bd471f8b11 100644
--- a/src/examples/elementary/bg_example_02.js
+++ b/src/examples/elementary/bg_example_02.js
@@ -1,7 +1,7 @@
var efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Bg Plain");
win.setAutohide(true);
diff --git a/src/examples/elementary/box_js_example_01.js b/src/examples/elementary/box_js_example_01.js
index 1cb3b9c5f0..b5a5178921 100644
--- a/src/examples/elementary/box_js_example_01.js
+++ b/src/examples/elementary/box_js_example_01.js
@@ -1,7 +1,7 @@
var efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText('title');
win.setAutohide(true);
@@ -16,9 +16,9 @@ win.setContent(bx);
entry = new efl.Elm.Label(win);
entry.setSize(100, 100);
-entry.setText(null, "Texto");
+entry.setPartText(null, "Texto");
-console.log('Texto: ', entry.getText(null));
+console.log('Texto: ', entry.getPartText(null));
entry.setHintWeight(1.0, 1.0);
entry.setHintAlign(-1.0, -1.0);
diff --git a/src/examples/elementary/box_js_example_02.js b/src/examples/elementary/box_js_example_02.js
index 156ee16921..d18ef82ff2 100644
--- a/src/examples/elementary/box_js_example_02.js
+++ b/src/examples/elementary/box_js_example_02.js
@@ -2,8 +2,8 @@
var efl = require('efl')
_add_cb = function(){
- var btn = new efl.Elm.Button(win);
- btn.setText("elm.text", "I do nothing");
+ var btn = new efl.Efl.Ui.Button(win);
+ btn.setText("I do nothing");
bx.packEnd(btn);
btn.setVisible(true);
}
@@ -17,7 +17,7 @@ _unpack_cb = function(btn){
btn.setColor(128, 64, 0, 128)
}
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Box example");
win.setAutohide(true);
@@ -32,14 +32,14 @@ bx_orient.setOrientation(efl.Efl.Orient.VERTICAL);
bigbox.packEnd(bx);
bx.setVisible(true);
-bt = new efl.Elm.Button(win);
-bt.setText("elm.text", "Add");
+bt = new efl.Efl.Ui.Button(win);
+bt.setText("Add");
bx.packEnd(bt);
bt.setVisible(true);
bt.on('clicked', _add_cb);
-bt = new efl.Elm.Button(win);
-bt.setText("elm.text", "Clear");
+bt = new efl.Efl.Ui.Button(win);
+bt.setText("Clear");
bx.packEnd(bt);
bt.setVisible(true);
bt.on('clicked', _clear_cb);
@@ -52,24 +52,24 @@ bx_orient.setOrientation(efl.Efl.Orient.HORIZONTAL);
bigbox.packEnd(bx);
bx.setVisible(true);
-bt = new efl.Elm.Button(win);
-bt.setText("elm.text", "Button 1");
+bt = new efl.Efl.Ui.Button(win);
+bt.setText("Button 1");
bx.packEnd(bt);
bt.setHintWeight(1.0, 1.0);
bt.setHintAlign(-1.0, -1.0);
bt.setVisible(true);
bt.on('clicked', _unpack_cb);
-bt = new efl.Elm.Button(win);
-bt.setText("elm.text", "Button 2");
+bt = new efl.Efl.Ui.Button(win);
+bt.setText("Button 2");
bx.packEnd(bt);
bt.setHintWeight(1.0, 0.0);
bt.setHintAlign(1.0, 0.5);
bt.setVisible(true);
bt.on('clicked', _unpack_cb);
-bt = new efl.Elm.Button(win);
-bt.setText("elm.text", "Button 3");
+bt = new efl.Efl.Ui.Button(win);
+bt.setText("Button 3");
bx.packEnd(bt);
bt.setVisible(true);
bt.on('clicked', _unpack_cb);
diff --git a/src/examples/elementary/button_example_00.js b/src/examples/elementary/button_example_00.js
index 5a3674a71e..d2ceca256e 100644
--- a/src/examples/elementary/button_example_00.js
+++ b/src/examples/elementary/button_example_00.js
@@ -1,12 +1,12 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Title", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Hello, World!");
win.setAutohide(true);
-btn = new efl.Elm.Button(win);
-btn.setText(null, "Good-Bye, World!");
+btn = new efl.Efl.Ui.Button(win);
+btn.setText("Good-Bye, World!");
btn.setSize(120, 30);
btn.setPosition(60, 15);
btn.setHintWeight(1.0, 1.0);
diff --git a/src/examples/elementary/button_example_01.js b/src/examples/elementary/button_example_01.js
index a6c2df856f..b14e427fe7 100644
--- a/src/examples/elementary/button_example_01.js
+++ b/src/examples/elementary/button_example_01.js
@@ -6,7 +6,7 @@ function setIcon(widget, icon) {
}
_btn_options_cb = function(_btn) {
- var text = _btn.getText("elm.text");
+ var text = _btn.getText();
var lbl = text.split(": ");
var t = parseFloat(lbl[1]);
@@ -64,16 +64,16 @@ _btn_cursors_move = function(_btn) {
}
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Button example");
win.setAutohide(true);
icon_still = new efl.Efl.Ui.Image(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);
+mid = new efl.Efl.Ui.Button(win);
+up = new efl.Efl.Ui.Button(win);
+down = new efl.Efl.Ui.Button(win);
+left = new efl.Efl.Ui.Button(win);
+right = new efl.Efl.Ui.Button(win);
_btn_cursors_release = function() {
if (icon_still)
@@ -94,21 +94,21 @@ box_initial.setHintWeight(1.0, 0.0);
box.packEnd(box_initial);
box_initial.setVisible(true);
-btn = new efl.Elm.Button(win);
-btn.setText("elm.text", "Initial: 0.0");
+btn = new efl.Efl.Ui.Button(win);
+btn.setText("Initial: 0.0");
box_initial.packEnd(btn);
btn.setVisible(true);
btn.on('clicked', _btn_options_cb);
-btn2 = new efl.Elm.Button(win);
-btn2.setText("elm.text", "Initial: 1.0");
+btn2 = new efl.Efl.Ui.Button(win);
+btn2.setText("Initial: 1.0");
box_initial.packEnd(btn2);
btn2.setVisible(true);
btn2.on('clicked', _btn_options_cb);
-btn3 = new efl.Elm.Button(win);
-btn3.setText("elm.text", "Initial: 5.0");
+btn3 = new efl.Efl.Ui.Button(win);
+btn3.setText("Initial: 5.0");
box_initial.packEnd(btn3);
btn3.setVisible(true);
btn3.on('clicked', _btn_options_cb);
@@ -119,25 +119,25 @@ box_gap.setHintWeight(1.0, 0.0);
box.packEnd(box_gap);
box_gap.setVisible(true);
-btn4 = new efl.Elm.Button(win);
-btn4.setText("elm.text", "Gap: 0.1");
+btn4 = new efl.Efl.Ui.Button(win);
+btn4.setText("Gap: 0.1");
box_gap.packEnd(btn4);
btn4.setVisible(true);
btn4.on('clicked', _btn_options_cb);
-btn5 = new efl.Elm.Button(win);
-btn5.setText("elm.text", "Gap: 0.5");
+btn5 = new efl.Efl.Ui.Button(win);
+btn5.setText("Gap: 0.5");
box_gap.packEnd(btn5);
btn5.setVisible(true);
btn5.on('clicked', _btn_options_cb);
-btn6 = new efl.Elm.Button(win);
-btn6.setText("elm.text", "Gap: 1.0");
+btn6 = new efl.Efl.Ui.Button(win);
+btn6.setText("Gap: 1.0");
box_gap.packEnd(btn6);
btn6.setVisible(true);
btn6.on('clicked', _btn_options_cb);
-up.setAutorepeat(true);
+up.setAutorepeatEnabled(true);
up.setAutorepeatInitialTimeout(1.0);
up.setAutorepeatGapTimeout(0.5);
up.setHintWeight(1.0, 0.0);
@@ -157,7 +157,7 @@ box_inferior.setHintAlign(-1.0, -1.0);
box.packEnd(box_inferior);
box_inferior.setVisible(true);
-left.setAutorepeat(true);
+left.setAutorepeatEnabled(true);
left.setAutorepeatInitialTimeout(1.0);
left.setAutorepeatGapTimeout(0.5);
left.setHintWeight(0.0, 1.0);
@@ -179,7 +179,7 @@ icon_mid = new efl.Efl.Ui.Image(win);
icon_mid.setIcon("close");
setIcon(mid, icon_mid);
-right.setAutorepeat(true);
+right.setAutorepeatEnabled(true);
right.setAutorepeatInitialTimeout(1.0);
right.setAutorepeatGapTimeout(0.5);
right.setHintWeight(0.0, 1.0);
@@ -193,7 +193,7 @@ icon_right = new efl.Efl.Ui.Image(win);
icon_right.setIcon("arrow_right");
setIcon(right, icon_right);
-down.setAutorepeat(true);
+down.setAutorepeatEnabled(true);
down.setAutorepeatInitialTimeout(1.0);
down.setAutorepeatGapTimeout(0.5);
down.setHintWeight(1.0, 0.0);
diff --git a/src/examples/elementary/calendar_example_01.js b/src/examples/elementary/calendar_example_01.js
index f106c13a07..32583ffd77 100644
--- a/src/examples/elementary/calendar_example_01.js
+++ b/src/examples/elementary/calendar_example_01.js
@@ -1,7 +1,7 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Calendar Creation Example");
win.setAutohide(true);
diff --git a/src/examples/elementary/calendar_example_02.js b/src/examples/elementary/calendar_example_02.js
index 98b0eb9f5e..1bd2e0a4aa 100644
--- a/src/examples/elementary/calendar_example_02.js
+++ b/src/examples/elementary/calendar_example_02.js
@@ -2,7 +2,7 @@ efl = require('efl');
//var weekdays = ["S", "M", "T", "W", "T", "F", "S"];
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Calendar Layout Formatting Example");
win.setAutohide(true);
diff --git a/src/examples/elementary/calendar_example_03.js b/src/examples/elementary/calendar_example_03.js
index 2a7df8e82a..a3e13285fa 100644
--- a/src/examples/elementary/calendar_example_03.js
+++ b/src/examples/elementary/calendar_example_03.js
@@ -1,7 +1,7 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Calendar Min/Max Year Example");
win.setAutohide(true);
diff --git a/src/examples/elementary/calendar_example_04.js b/src/examples/elementary/calendar_example_04.js
index 1afa80878d..473caf3588 100644
--- a/src/examples/elementary/calendar_example_04.js
+++ b/src/examples/elementary/calendar_example_04.js
@@ -1,7 +1,7 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Calendar Day Selection Example");
win.setAutohide(true);
diff --git a/src/examples/elementary/calendar_example_05.js b/src/examples/elementary/calendar_example_05.js
index b9cfdde457..084079f4e2 100644
--- a/src/examples/elementary/calendar_example_05.js
+++ b/src/examples/elementary/calendar_example_05.js
@@ -6,7 +6,9 @@ _print_cal_info_cb = function ()
//var sel_time = cal.selected_time_get()
var interval = cal.getInterval();
- var mm_yr = cal.getMinMaxYear();
+ // TODO Sort out Efl.Time support in the Js binding
+ // var mm_date = cal.getDateMin();
+ var mm_yr = [0, 0];
var sel_enable = cal.getSelectMode() != efl.Elm.Calendar.Select.Mode.NONE;
var wds = cal.getWeekdaysNames();
@@ -15,7 +17,7 @@ _print_cal_info_cb = function ()
}
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Calendar Getters Example");
win.setAutohide(true);
diff --git a/src/examples/elementary/clock_example.js b/src/examples/elementary/clock_example.js
index 7c2872d796..c15a54d63e 100644
--- a/src/examples/elementary/clock_example.js
+++ b/src/examples/elementary/clock_example.js
@@ -1,6 +1,6 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Clock Example");
win.setAutohide(true);
win.setSize(480, 240);
diff --git a/src/examples/elementary/icon_example_01.js b/src/examples/elementary/icon_example_01.js
index cf1d5e49f3..21d78f1de7 100644
--- a/src/examples/elementary/icon_example_01.js
+++ b/src/examples/elementary/icon_example_01.js
@@ -1,7 +1,7 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Icon Plain");
win.setAutohide(true);
diff --git a/src/examples/elementary/layout_example.js b/src/examples/elementary/layout_example.js
index b2e1013cd7..003cb4d146 100644
--- a/src/examples/elementary/layout_example.js
+++ b/src/examples/elementary/layout_example.js
@@ -3,7 +3,7 @@ efl = require('efl');
Evas = efl.Evas;
Elm = efl.Elm;
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText('Layout');
win.setAutohide(true);
@@ -53,7 +53,7 @@ ly.setVisible(true);
//ly.on_layout('*', '*', function(emission, source)
// { console.log("signal: '" + emission + "' '" + source + "'");});
-bt = new Elm.Button(ly);
+bt = new efl.Efl.Ui.Button(ly);
bt.setPartText(null, "Button 1");
console.log("Will get part");
element_container = ly.part('example/custom').cast('Efl.Container');
diff --git a/src/examples/elementary/menu_example_01.js b/src/examples/elementary/menu_example_01.js
index 58a4f69867..88f168b59c 100644
--- a/src/examples/elementary/menu_example_01.js
+++ b/src/examples/elementary/menu_example_01.js
@@ -1,6 +1,6 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Menu");
win.setAutohide(true);
@@ -10,7 +10,7 @@ rect.setHintMin( 0, 0);
rect.setColor( 0, 0, 0, 0);
rect.setVisible(true);
-menu = new elm.Elm.Menu(win);
+menu = new efl.Elm.Menu(win);
menu.itemAdd(null, null, "first item", null, null); // item_add nao implementado
menu_it = menu.itemAdd(null, "mail-reply-all", "second intem", null, null);
diff --git a/src/examples/elementary/popup_example_01.js b/src/examples/elementary/popup_example_01.js
index 42cf39c8ed..0b7c9ea810 100644
--- a/src/examples/elementary/popup_example_01.js
+++ b/src/examples/elementary/popup_example_01.js
@@ -1,11 +1,11 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Popup");
win.setAutohide(true);
content = new efl.Elm.Label(win);
-content.setText("elm.text", "<align=center>Content</align>");
+content.setPartText("elm.text", "<align=center>Content</align>");
popup = new efl.Elm.Popup(win);
popup.setTimeout(3);
@@ -19,7 +19,7 @@ popup.on('timeout', function()
content_container = popup.part("elm.swallow.content").cast("Efl.Container");
content_container.setContent(content);
-popup.setText("title,text", "Title");
+popup.setPartText("title,text", "Title");
popup.setVisible(true);
popup.on('block_clicked', function()
diff --git a/src/examples/elementary/radio_example_01.js b/src/examples/elementary/radio_example_01.js
index 55589a760f..ebc68217b8 100644
--- a/src/examples/elementary/radio_example_01.js
+++ b/src/examples/elementary/radio_example_01.js
@@ -5,7 +5,7 @@ _cb = function(obj){
console.log(obj.getText("elm.text"), "state value:", obj.getStateValue());
}
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Radio");
win.setAutohide(true);
@@ -15,8 +15,8 @@ bx.setHintWeight(1.0, 1.0);
win.setContent(bx);
bx.setVisible(true);
-radio_g = new efl.Elm.Radio(win);
-radio_g.setText("elm.text", "Radio 1");
+radio_g = new efl.Efl.Ui.Radio(win);
+radio_g.setText("Radio 1");
radio_g.setStateValue(1);
radio_g.setValue(1);
ic = new efl.Efl.Ui.Image(win);
@@ -28,8 +28,8 @@ radio_g.setHintAlign(-1.0, -1.0);
radio_g.on('changed', _cb);
radio_g.setVisible(true);
-radio = new efl.Elm.Radio(win);
-radio.setText("elm.text", "Radio 2");
+radio = new efl.Efl.Ui.Radio(win);
+radio.setText("Radio 2");
radio.setStateValue(2);
radio.addGroup(radio_g);
ic = new efl.Efl.Ui.Image(win);
@@ -41,8 +41,8 @@ radio.setHintAlign(-1.0, -1.0);
radio.on('changed', _cb);
radio.setVisible(true);
-radio = new efl.Elm.Radio(win);
-radio.setText("elm.text", "Radio 3");
+radio = new efl.Efl.Ui.Radio(win);
+radio.setText("Radio 3");
radio.setStateValue(3);
radio.addGroup(radio_g);
bx.packEnd(radio);
@@ -51,8 +51,8 @@ radio.setHintAlign(-1.0, -1.0);
radio.on('changed', _cb);
radio.setVisible(true);
-radio = new efl.Elm.Radio(win);
-radio.setText("elm.text", "Radio 4");
+radio = new efl.Efl.Ui.Radio(win);
+radio.setText("Radio 4");
radio.setStateValue(4);
radio.addGroup(radio_g);
bx.packEnd(radio);
diff --git a/src/examples/elementary/slider_example.js b/src/examples/elementary/slider_example.js
index e1c317c971..d64e4dde87 100644
--- a/src/examples/elementary/slider_example.js
+++ b/src/examples/elementary/slider_example.js
@@ -1,7 +1,7 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Slider Example");
win.setAutohide(true);
@@ -19,7 +19,7 @@ sl.setVisible(true);
/* with icon, end and label */
sl = new efl.Elm.Slider(win);
-sl.setText("elm.text", "Counter");
+sl.setPartText("elm.text", "Counter");
ic = new efl.Efl.Ui.Image(win);
ic.setIcon("home");
diff --git a/src/examples/elementary/spinner_example.js b/src/examples/elementary/spinner_example.js
index c64f7bc898..1ff0899b6b 100644
--- a/src/examples/elementary/spinner_example.js
+++ b/src/examples/elementary/spinner_example.js
@@ -1,7 +1,7 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Spinner Example");
win.setAutohide(true);
diff --git a/src/examples/elementary/table_example_01.js b/src/examples/elementary/table_example_01.js
index d5de56bdb8..f02b753fee 100644
--- a/src/examples/elementary/table_example_01.js
+++ b/src/examples/elementary/table_example_01.js
@@ -1,7 +1,7 @@
efl = require('efl');
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Table");
win.setAutohide(true);
diff --git a/src/examples/elementary/thumb_example_01.js b/src/examples/elementary/thumb_example_01.js
index e4c7c135f6..8d3e9763c1 100644
--- a/src/examples/elementary/thumb_example_01.js
+++ b/src/examples/elementary/thumb_example_01.js
@@ -21,7 +21,7 @@ _client_connected_cb = function(obj)
console.log("Connected client to ethumb daemon");
}
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Thumb example.");
win.setAutohide(true);
diff --git a/src/examples/elementary/twitter_example_01.js b/src/examples/elementary/twitter_example_01.js
index 3d1a2a67dd..761eab90e0 100644
--- a/src/examples/elementary/twitter_example_01.js
+++ b/src/examples/elementary/twitter_example_01.js
@@ -19,7 +19,7 @@ var twit = new Twitter({
access_token_secret: 'l7ccNKXTVv6cymfSD1gQH61tmfixkdna2QmOjPtpVxSHD'
});
-win = new efl.Efl.Ui.Win.Standard(null);
+win = new efl.Efl.Ui.Win(null, "Efl JS Example", efl.Efl.Ui.Win.Type.BASIC, "hw");
win.setText("Twitter App");
win.setAutohide(true);
@@ -52,11 +52,11 @@ twit.get('statuses/user_timeline', {screen_name: user_acount, count:10}, functio
var filename = path.join(__dirname, 'twitter_example_01.edj');
layout.setFile(filename, "tweet");
- layout.setText("user_name", screen_name);
- layout.setText("screen_name", " - @"+screen_name);
+ layout.setPartText("user_name", screen_name);
+ layout.setPartText("screen_name", " - @"+screen_name);
var entry = new efl.Elm.Entry(win);
- entry.setText("elm.text", text);
+ entry.setPartText("elm.text", text);
entry.setEditable(false);
part = layout.part("tweet_text").cast("Efl.Container");
part.setContent(entry);