summaryrefslogtreecommitdiff
path: root/src/examples/elementary
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/elementary')
-rw-r--r--src/examples/elementary/.gitignore5
-rw-r--r--src/examples/elementary/bg_cxx_example_01.cc15
-rw-r--r--src/examples/elementary/bg_cxx_example_02.cc15
-rw-r--r--src/examples/elementary/bg_example_01.js2
-rw-r--r--src/examples/elementary/box_cxx_example_02.cc15
-rw-r--r--src/examples/elementary/button_cxx_example_00.cc15
-rw-r--r--src/examples/elementary/button_cxx_example_01.cc15
-rw-r--r--src/examples/elementary/button_example_01.js6
-rw-r--r--src/examples/elementary/calendar_cxx_example_01.cc15
-rw-r--r--src/examples/elementary/calendar_cxx_example_02.cc15
-rw-r--r--src/examples/elementary/calendar_cxx_example_03.cc15
-rw-r--r--src/examples/elementary/calendar_cxx_example_04.cc15
-rw-r--r--src/examples/elementary/calendar_cxx_example_05.cc15
-rw-r--r--src/examples/elementary/clock_cxx_example.cc15
-rw-r--r--src/examples/elementary/efl_canvas_layout_text.c5
-rw-r--r--src/examples/elementary/efl_canvas_textblock_obstacles_example.c273
-rw-r--r--src/examples/elementary/efl_ui_collection_view_example_1.c2
-rw-r--r--src/examples/elementary/efl_ui_grid_view_example_1.c477
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c23
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_3.c4
-rw-r--r--src/examples/elementary/efl_ui_relative_container_example_01.c (renamed from src/examples/elementary/efl_ui_relative_layout_example_01.c)18
-rw-r--r--src/examples/elementary/efl_ui_relative_container_example_02.c (renamed from src/examples/elementary/efl_ui_relative_layout_example_02.c)14
-rw-r--r--src/examples/elementary/efl_ui_slider_mono.cs15
-rw-r--r--src/examples/elementary/efl_ui_slideshow_example.c4
-rw-r--r--src/examples/elementary/efl_ui_unit_converter.cs26
-rw-r--r--src/examples/elementary/icon_cxx_example_01.cc15
-rw-r--r--src/examples/elementary/icon_example_01.js2
-rw-r--r--src/examples/elementary/layout_property_bind.c46
-rw-r--r--src/examples/elementary/location_example_01.c151
-rw-r--r--src/examples/elementary/menu_cxx_example_01.cc15
-rw-r--r--src/examples/elementary/meson.build5
-rw-r--r--src/examples/elementary/popup_cxx_example.cc15
-rw-r--r--src/examples/elementary/radio_cxx_example_01.cc15
-rw-r--r--src/examples/elementary/slider_cxx_example.cc15
-rw-r--r--src/examples/elementary/slider_example.js4
-rw-r--r--src/examples/elementary/spinner_cxx_example.cc15
-rw-r--r--src/examples/elementary/table_cxx_example_01.cc23
-rw-r--r--src/examples/elementary/table_cxx_example_02.cc15
-rw-r--r--src/examples/elementary/toolbar_cxx_example_01.cc15
-rw-r--r--src/examples/elementary/twitter_example_01.js12
40 files changed, 1172 insertions, 230 deletions
diff --git a/src/examples/elementary/.gitignore b/src/examples/elementary/.gitignore
index 06e2055..84d951e 100644
--- a/src/examples/elementary/.gitignore
+++ b/src/examples/elementary/.gitignore
@@ -169,5 +169,6 @@
169/efl_ui_list_view_example_3 169/efl_ui_list_view_example_3
170/efl_ui_theme_example_01 170/efl_ui_theme_example_01
171/efl_ui_theme_example_02 171/efl_ui_theme_example_02
172/efl_ui_relative_layout_example_01 172/efl_ui_relative_container_example_01
173/efl_ui_relative_layout_example_02 173/efl_ui_relative_container_example_02
174/efl_canvas_textblock_obstacles_example
diff --git a/src/examples/elementary/bg_cxx_example_01.cc b/src/examples/elementary/bg_cxx_example_01.cc
index 4c1368a..f555f93 100644
--- a/src/examples/elementary/bg_cxx_example_01.cc
+++ b/src/examples/elementary/bg_cxx_example_01.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#define EFL_CXXPERIMENTAL // for background part 16#define EFL_CXXPERIMENTAL // for background part
2#ifndef EFL_BETA_API_SUPPORT 17#ifndef EFL_BETA_API_SUPPORT
3#define EFL_BETA_API_SUPPORT 18#define EFL_BETA_API_SUPPORT
diff --git a/src/examples/elementary/bg_cxx_example_02.cc b/src/examples/elementary/bg_cxx_example_02.cc
index f276fdd..d9f9159 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1/* To compile: 16/* To compile:
2 * g++ `pkg-config --cflags --libs elementary-cxx eo-cxx efl-cxx eina-cxx ecore-cxx evas-cxx edje-cxx` ./bg_cxx_example_02.cc -o bg_cxx_example_02 17 * g++ `pkg-config --cflags --libs elementary-cxx eo-cxx efl-cxx eina-cxx ecore-cxx evas-cxx edje-cxx` ./bg_cxx_example_02.cc -o bg_cxx_example_02
3 * 18 *
diff --git a/src/examples/elementary/bg_example_01.js b/src/examples/elementary/bg_example_01.js
index 410cb3a..f8d9837 100644
--- a/src/examples/elementary/bg_example_01.js
+++ b/src/examples/elementary/bg_example_01.js
@@ -6,7 +6,7 @@ win.setText("Bg Plain");
6win.setAutohide(true); 6win.setAutohide(true);
7 7
8bg = new efl.Elm.Bg(win); 8bg = new efl.Elm.Bg(win);
9bg.setColor(255, 0,0,255) 9bg.setColor(255, 0,0,255);
10bg.setHintWeight(1.0, 1.0); 10bg.setHintWeight(1.0, 1.0);
11win.setContent(bg); 11win.setContent(bg);
12bg.setVisible(true); 12bg.setVisible(true);
diff --git a/src/examples/elementary/box_cxx_example_02.cc b/src/examples/elementary/box_cxx_example_02.cc
index e9d802c..e452815 100644
--- a/src/examples/elementary/box_cxx_example_02.cc
+++ b/src/examples/elementary/box_cxx_example_02.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` box_cxx_example_02.cc -o box_cxx_example_02 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` box_cxx_example_02.cc -o box_cxx_example_02
2 17
3#include <Efl_Ui.hh> 18#include <Efl_Ui.hh>
diff --git a/src/examples/elementary/button_cxx_example_00.cc b/src/examples/elementary/button_cxx_example_00.cc
index ae0a0fa..da41f07 100644
--- a/src/examples/elementary/button_cxx_example_00.cc
+++ b/src/examples/elementary/button_cxx_example_00.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` button_cxx_example_00.cc -o button_cxx_example_00 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` button_cxx_example_00.cc -o button_cxx_example_00
2 17
3#define EFL_CXXPERIMENTAL 18#define EFL_CXXPERIMENTAL
diff --git a/src/examples/elementary/button_cxx_example_01.cc b/src/examples/elementary/button_cxx_example_01.cc
index 8623dfa..880f955 100644
--- a/src/examples/elementary/button_cxx_example_01.cc
+++ b/src/examples/elementary/button_cxx_example_01.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` button_cxx_example_01.cc -o button_cxx_example_01 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` button_cxx_example_01.cc -o button_cxx_example_01
2 17
3#define EFL_CXXPERIMENTAL 18#define EFL_CXXPERIMENTAL
diff --git a/src/examples/elementary/button_example_01.js b/src/examples/elementary/button_example_01.js
index f2f3a7d..89a4886 100644
--- a/src/examples/elementary/button_example_01.js
+++ b/src/examples/elementary/button_example_01.js
@@ -1,7 +1,7 @@
1efl = require('efl'); 1efl = require('efl');
2 2
3function setIcon(widget, icon) { 3function setIcon(widget, icon) {
4 container = widget.part("icon").cast("Efl.Content"); 4 var container = widget.part("icon").cast("Efl.Content");
5 container.setContent(icon); 5 container.setContent(icon);
6} 6}
7 7
@@ -144,7 +144,7 @@ up.setHintWeight(1.0, 0.0);
144up.setHintAlign(-1.0, 0.0); 144up.setHintAlign(-1.0, 0.0);
145box.packEnd(up); 145box.packEnd(up);
146up.setVisible(true); 146up.setVisible(true);
147up.on('repeated', _btn_cursors_move) 147up.on('repeated', _btn_cursors_move);
148up.on('unpressed', _btn_cursors_release); 148up.on('unpressed', _btn_cursors_release);
149icon_up = new efl.Efl.Ui.Image(win); 149icon_up = new efl.Efl.Ui.Image(win);
150icon_up.setIcon("arrow_up"); 150icon_up.setIcon("arrow_up");
@@ -164,7 +164,7 @@ left.setHintWeight(0.0, 1.0);
164left.setHintAlign(0.0, -1.0); 164left.setHintAlign(0.0, -1.0);
165box_inferior.packEnd(left); 165box_inferior.packEnd(left);
166left.setVisible(true); 166left.setVisible(true);
167left.on('repeated', _btn_cursors_move) 167left.on('repeated', _btn_cursors_move);
168left.on('unpressed', _btn_cursors_release); 168left.on('unpressed', _btn_cursors_release);
169 169
170icon_left = new efl.Efl.Ui.Image(win); 170icon_left = new efl.Efl.Ui.Image(win);
diff --git a/src/examples/elementary/calendar_cxx_example_01.cc b/src/examples/elementary/calendar_cxx_example_01.cc
index fbeccb9..43d91f2 100644
--- a/src/examples/elementary/calendar_cxx_example_01.cc
+++ b/src/examples/elementary/calendar_cxx_example_01.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#include <Efl_Ui.hh> 16#include <Efl_Ui.hh>
2 17
3using efl::eo::instantiate; 18using efl::eo::instantiate;
diff --git a/src/examples/elementary/calendar_cxx_example_02.cc b/src/examples/elementary/calendar_cxx_example_02.cc
index dba2b1a..0d48fe9 100644
--- a/src/examples/elementary/calendar_cxx_example_02.cc
+++ b/src/examples/elementary/calendar_cxx_example_02.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#define EFL_CXXPERIMENTAL 16#define EFL_CXXPERIMENTAL
2 17
3#include <Efl_Ui.hh> 18#include <Efl_Ui.hh>
diff --git a/src/examples/elementary/calendar_cxx_example_03.cc b/src/examples/elementary/calendar_cxx_example_03.cc
index 3f75b07..9b23d98 100644
--- a/src/examples/elementary/calendar_cxx_example_03.cc
+++ b/src/examples/elementary/calendar_cxx_example_03.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#include <Efl_Ui.hh> 16#include <Efl_Ui.hh>
2 17
3using efl::eo::instantiate; 18using efl::eo::instantiate;
diff --git a/src/examples/elementary/calendar_cxx_example_04.cc b/src/examples/elementary/calendar_cxx_example_04.cc
index ef2a8eb..7bf9d94 100644
--- a/src/examples/elementary/calendar_cxx_example_04.cc
+++ b/src/examples/elementary/calendar_cxx_example_04.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#include <Efl_Ui.hh> 16#include <Efl_Ui.hh>
2 17
3#warning This example can not be implemented with EO APIs... FIXME 18#warning This example can not be implemented with EO APIs... FIXME
diff --git a/src/examples/elementary/calendar_cxx_example_05.cc b/src/examples/elementary/calendar_cxx_example_05.cc
index ccb7891..6fc857d 100644
--- a/src/examples/elementary/calendar_cxx_example_05.cc
+++ b/src/examples/elementary/calendar_cxx_example_05.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#include <Efl_Ui.hh> 16#include <Efl_Ui.hh>
2 17
3#warning This example can not be implemented with EO APIs... FIXME 18#warning This example can not be implemented with EO APIs... FIXME
diff --git a/src/examples/elementary/clock_cxx_example.cc b/src/examples/elementary/clock_cxx_example.cc
index aa08d40..6566eaf 100644
--- a/src/examples/elementary/clock_cxx_example.cc
+++ b/src/examples/elementary/clock_cxx_example.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#include <Efl_Ui.hh> 16#include <Efl_Ui.hh>
2 17
3using efl::eo::instantiate; 18using efl::eo::instantiate;
diff --git a/src/examples/elementary/efl_canvas_layout_text.c b/src/examples/elementary/efl_canvas_layout_text.c
index 593dbe8..268dd48 100644
--- a/src/examples/elementary/efl_canvas_layout_text.c
+++ b/src/examples/elementary/efl_canvas_layout_text.c
@@ -134,8 +134,9 @@ efl_main(void *data EINA_UNUSED,
134 134
135 efl_text_markup_set(efl_part(layout, "text"), "This is an example text. This is a layout text part."); 135 efl_text_markup_set(efl_part(layout, "text"), "This is an example text. This is a layout text part.");
136 efl_text_wrap_set(efl_part(layout, "text"), wraps[wrap_itr].wrap); 136 efl_text_wrap_set(efl_part(layout, "text"), wraps[wrap_itr].wrap);
137 efl_text_normal_color_set(efl_part(layout, "text"), 255, 255, 0, 255); 137 efl_text_color_set(efl_part(layout, "text"), 255, 255, 0, 255);
138 efl_text_font_set(efl_part(layout, "text"), "Serif", 12); 138 efl_text_font_family_set(efl_part(layout, "text"), "Serif");
139 efl_text_font_size_set(efl_part(layout, "text"), 12);
139 140
140 efl_canvas_layout_part_text_expand_set(efl_part(layout, "text"), 141 efl_canvas_layout_part_text_expand_set(efl_part(layout, "text"),
141 expands[expand_itr].expand); 142 expands[expand_itr].expand);
diff --git a/src/examples/elementary/efl_canvas_textblock_obstacles_example.c b/src/examples/elementary/efl_canvas_textblock_obstacles_example.c
new file mode 100644
index 0000000..d14123a
--- /dev/null
+++ b/src/examples/elementary/efl_canvas_textblock_obstacles_example.c
@@ -0,0 +1,273 @@
1#define EFL_BETA_API_SUPPORT 1
2
3#include <Efl_Ui.h>
4
5 /**
6 * Example of canvas textblock obstacles.
7 *
8 * You start with two registered obstacle objects. They are not visible
9 * at first, so the canvas textblock simply shows the text that has been set to it.
10 * Once the obstacle is visible (show/hide keys in the example), the text will
11 * wrap around it.
12 * This example allows you to test two obstacles registered to the same
13 * canvas textblock object. Also, you can play with size and position for each.
14 * Use the 'h' key to show the provided options for this test.
15 *
16 * @verbatim
17 * gcc -g efl_canvas_textblock_obstacles_example.c -o efl_canvas_textblock_obstacles_example `pkg-config --cflags --libs elementary`
18 * @endverbatim
19 */
20
21#define WIDTH (360)
22#define HEIGHT (240)
23
24#define POINTER_CYCLE(_ptr, _array) \
25 do \
26 { \
27 if ((unsigned int)(((unsigned char *)(_ptr)) - ((unsigned char *)(_array))) >= \
28 sizeof(_array)) \
29 _ptr = _array; \
30 } \
31 while(0)
32
33static const char *commands = \
34 "commands are:\n"
35 "\tt - change currently controlled obstacle\n"
36 "\tv - show/hide current obstacle\n"
37 "\ts - cycle current obstacle's size\n"
38 "\tp - change current obstacle's position (random)\n"
39 "\tw - cycle text wrapping modes (none/word/char/mixed)\n"
40 "\th - print help\n";
41
42struct text_preset_data
43{
44 const char **font_ptr;
45 const char *font[3];
46
47 const char **wrap_ptr;
48 const char *wrap[4];
49
50 int *obs_size_ptr;
51 int obs_size[3];
52
53 Eo **obs_ptr; /* pointer to the currently controlled obstacle object */
54 Eo *obs[2];
55};
56
57struct test_data
58{
59 Eo *win, *box, *bg, *text;
60 struct text_preset_data t_data;
61 Eina_Size2D size;
62};
63
64static struct test_data d = {0};
65
66static unsigned int
67_getrand(unsigned int low, unsigned int high)
68{
69 return (rand() % (high - low)) + low;
70}
71
72static void
73_style_set(const char *wrap)
74{
75 char buf[2000];
76 snprintf(buf,
77 2000,
78 "font=Sans font_size=16 color=#000 wrap=%s",
79 wrap);
80
81 efl_canvas_textblock_style_apply(d.text, buf);
82}
83
84static void
85_key_down(void *data EINA_UNUSED, const Efl_Event *ev)
86{
87 const char *key = efl_input_key_string_get(ev->info);
88 if (!key)
89 return;
90
91 if (strcmp(key, "h") == 0) /* print help */
92 {
93 printf("%s\n", commands);
94 return;
95 }
96
97 if (strcmp(key, "t") == 0) /* change obstacle type */
98 {
99 (d.t_data.obs_ptr)++;
100 POINTER_CYCLE(d.t_data.obs_ptr, d.t_data.obs);
101
102 printf("Now controlling obstacle: %p\n", *d.t_data.obs_ptr);
103
104 return;
105 }
106
107 if (strcmp(key, "v") == 0) /* change obstacle visibility */
108 {
109 Eo *obj = *d.t_data.obs_ptr;
110 if (efl_gfx_entity_visible_get(obj))
111 efl_gfx_entity_visible_set(obj, EINA_FALSE);
112 else
113 efl_gfx_entity_visible_set(obj, EINA_TRUE);
114
115 printf("Show/hide toggle for obstacle %p\n",
116 *d.t_data.obs_ptr);
117
118 efl_canvas_textblock_obstacles_update(d.text);
119
120 return;
121 }
122
123 if (strcmp(key, "s") == 0) /* change obstacle size */
124 {
125 (d.t_data.obs_size_ptr)++;
126 POINTER_CYCLE(d.t_data.obs_size_ptr, d.t_data.obs_size);
127
128 efl_gfx_entity_size_set(*d.t_data.obs_ptr, EINA_SIZE2D(*d.t_data.obs_size_ptr, *d.t_data.obs_size_ptr));
129
130 efl_canvas_textblock_obstacles_update(d.text);
131
132 printf("Changing obstacle size to: %d,%d\n",
133 *d.t_data.obs_size_ptr, *d.t_data.obs_size_ptr);
134
135 return;
136 }
137
138 if (strcmp(key, "p") == 0) /* change obstacle position */
139 {
140 int x, y;
141 x = _getrand(0, d.size.w);
142 y = _getrand(0, d.size.h);
143
144 efl_gfx_entity_position_set(*d.t_data.obs_ptr, EINA_POSITION2D(x, y));
145 efl_canvas_textblock_obstacles_update(d.text);
146
147 printf("Changing obstacles position\n");
148 efl_gfx_entity_position_set(*d.t_data.obs_ptr, EINA_POSITION2D(x, y));
149
150 Eina_Position2D r_rec = efl_gfx_entity_position_get(d.t_data.obs[0]);
151 Eina_Position2D g_rec = efl_gfx_entity_position_get(d.t_data.obs[1]);
152
153 printf("Obstacle #1 (red) : [%d,%d]\n", r_rec.x, r_rec.y);
154 printf("Obstacle #2 (green): [%d,%d]\n", g_rec.x, g_rec.y);
155
156 return;
157 }
158
159 if (strcmp(key, "w") == 0) /* change obstacle position */
160 {
161 (d.t_data.wrap_ptr)++;
162 POINTER_CYCLE(d.t_data.wrap_ptr, d.t_data.wrap);
163 printf("Changing wrap mode to: %s\n",
164 *d.t_data.wrap_ptr);
165 _style_set(*d.t_data.wrap_ptr);
166 efl_canvas_textblock_obstacles_update(d.text);
167
168 return;
169 }
170}
171
172static void
173_win_resize(void *data EINA_UNUSED, const Efl_Event *ev)
174{
175 Eina_Size2D sz;
176
177 sz = efl_gfx_entity_size_get(ev->object);
178 efl_gfx_entity_size_set(d.bg, sz);
179 efl_gfx_entity_size_set(d.text, sz);
180
181 d.size = sz;
182}
183
184static void
185_text_init()
186{
187 _style_set("word");
188
189 efl_text_markup_set(d.text,
190 "This example text demonstrates the textblock object"
191 " with obstacle objects support."
192 " Any evas object <item size=72x16></item>can register itself as an obstacle to the textblock"
193 " object. Upon regi<color=#0ff>stering, it aff</color>ects the layout of the text in"
194 " certain situations. Usually, when the obstacle shows above the text"
195 " area, it will cause the layout of the text to split and move"
196 " parts of it, so that all text area is apparent."
197 );
198}
199
200static void
201_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
202{
203 efl_exit(0);
204}
205
206static void
207_gui_setup()
208{
209 /* init values one is going to cycle through while running this
210 * example */
211 struct text_preset_data init_data =
212 {
213 .font = {"DejaVu", "Courier", "Utopia"},
214 .wrap = {"word", "char", "mixed", "none"},
215 .obs_size = {50, 70, 100},
216 .obs = {NULL, NULL},
217 };
218
219 d.t_data = init_data;
220 d.t_data.font_ptr = d.t_data.font;
221 d.t_data.obs_size_ptr = d.t_data.obs_size;
222 d.t_data.obs_ptr = d.t_data.obs;
223
224 d.win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
225 efl_text_set(efl_added, "Obstacles Example"),
226 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
227
228 efl_gfx_entity_size_set(d.win, EINA_SIZE2D(WIDTH, HEIGHT));
229 printf("Window size set to [%d,%d]\n", WIDTH, HEIGHT);
230
231 efl_event_callback_add(d.win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
232 efl_event_callback_add(d.win, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _win_resize, NULL);
233 efl_event_callback_add(d.win, EFL_EVENT_KEY_DOWN, _key_down, NULL);
234
235 d.bg = efl_add(EFL_CANVAS_RECTANGLE_CLASS, d.win,
236 efl_gfx_color_set(efl_added, 255, 255, 255, 255));
237
238 efl_gfx_entity_size_set(d.bg, EINA_SIZE2D(WIDTH, HEIGHT));
239 efl_gfx_entity_position_set(d.bg, EINA_POSITION2D(0, 0));
240
241 d.text = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, d.win,
242 efl_text_multiline_set(efl_added, EINA_TRUE));
243
244 _text_init();
245 efl_gfx_entity_size_set(d.text, EINA_SIZE2D(WIDTH, HEIGHT));
246 efl_gfx_entity_position_set(d.text, EINA_POSITION2D(0, 0));
247
248 d.size.w = WIDTH;
249 d.size.h = HEIGHT;
250
251 /* init obstacles */
252 d.t_data.obs[0] = efl_add(EFL_CANVAS_RECTANGLE_CLASS, d.win,
253 efl_gfx_color_set(efl_added, 255, 0, 0, 255));
254
255 efl_gfx_entity_size_set(d.t_data.obs[0], EINA_SIZE2D(50,50));
256
257 d.t_data.obs[1] = efl_add(EFL_CANVAS_RECTANGLE_CLASS, d.win,
258 efl_gfx_color_set(efl_added, 0, 255, 0, 255));
259
260 efl_gfx_entity_size_set(d.t_data.obs[1], EINA_SIZE2D(50,50));
261
262 efl_canvas_textblock_obstacle_add(d.text, d.t_data.obs[0]);
263 efl_canvas_textblock_obstacle_add(d.text, d.t_data.obs[1]);
264
265 printf("%s\n", commands);
266}
267
268EAPI_MAIN void
269efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
270{
271 _gui_setup();
272}
273EFL_MAIN()
diff --git a/src/examples/elementary/efl_ui_collection_view_example_1.c b/src/examples/elementary/efl_ui_collection_view_example_1.c
index 7296065..3255b17 100644
--- a/src/examples/elementary/efl_ui_collection_view_example_1.c
+++ b/src/examples/elementary/efl_ui_collection_view_example_1.c
@@ -96,7 +96,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
96 li = efl_add(EFL_UI_COLLECTION_VIEW_CLASS, win, 96 li = efl_add(EFL_UI_COLLECTION_VIEW_CLASS, win,
97 efl_ui_collection_view_position_manager_set(efl_added, position_manager), 97 efl_ui_collection_view_position_manager_set(efl_added, position_manager),
98 efl_ui_view_model_set(efl_added, model), 98 efl_ui_view_model_set(efl_added, model),
99 efl_ui_multi_selectable_async_select_mode_set(efl_added, mode), 99 efl_ui_multi_selectable_select_mode_set(efl_added, mode),
100 efl_ui_collection_view_factory_set(efl_added, factory)); 100 efl_ui_collection_view_factory_set(efl_added, factory));
101 101
102 efl_content_set(win, li); 102 efl_content_set(win, li);
diff --git a/src/examples/elementary/efl_ui_grid_view_example_1.c b/src/examples/elementary/efl_ui_grid_view_example_1.c
new file mode 100644
index 0000000..8ccf560
--- /dev/null
+++ b/src/examples/elementary/efl_ui_grid_view_example_1.c
@@ -0,0 +1,477 @@
1// gcc -o efl_ui_grid_view_example_1 efl_ui_grid_view_example_1.c `pkg-config --cflags --libs elementary`
2
3#define EFL_BETA_API_SUPPORT 1
4
5#include <Efl.h>
6#include <Efl_Ui.h>
7#include <Elementary.h>
8#include "efl_ui_grid_view.eo.h"
9
10
11static Efl_Model*
12_make_model(Evas_Object *win)
13{
14 Eina_Value vtext;
15 Efl_Generic_Model *model, *child;
16
17 model = efl_add(EFL_GENERIC_MODEL_CLASS, win);
18 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING);
19
20#define IC(x) \
21 child = efl_model_child_add(model); \
22 eina_value_set(&vtext, x); \
23 efl_model_property_set(child, "title", &vtext);
24
25 IC("user-home")
26 IC("user-bookmarks")
27 IC("user-desktop")
28 IC("user-trash")
29 IC("folder")
30 IC("folder-drag-accept")
31 IC("folder-remote")
32 IC("folder-open")
33 IC("folder-home")
34 IC("folder-download")
35 IC("folder-recent")
36 IC("folder-documents")
37 IC("folder-pictures")
38 IC("folder-music")
39 IC("folder-videos")
40 IC("folder-visiting")
41 IC("network-server")
42 IC("network-workgroup")
43 IC("start-here")
44 IC("emblem-default")
45 IC("emblem-documents")
46 IC("emblem-downloads")
47 IC("emblem-favorite")
48 IC("emblem-important")
49 IC("emblem-mail")
50 IC("emblem-photos")
51 IC("emblem-readonly")
52 IC("emblem-shared")
53 IC("emblem-symbolic-link")
54 IC("emblem-unreadable")
55 IC("emblem-system")
56 IC("emblem-synchronized")
57 IC("emblem-synchronizing")
58 IC("address-book-new")
59 IC("application-exit")
60 IC("appointment-new")
61 IC("call-start")
62 IC("call-stop")
63 IC("contact-new")
64 IC("document-open")
65 IC("document-open-recent")
66 IC("document-page-setup")
67 IC("document-properties")
68 IC("document-save")
69 IC("document-save-as")
70 IC("document-send")
71 IC("document-close")
72 IC("document-new")
73 IC("document-print")
74 IC("document-print-preview")
75 IC("document-revert")
76 IC("document-export")
77 IC("document-import")
78 IC("edit-clear")
79 IC("edit-copy")
80 IC("edit-cut")
81 IC("edit-delete")
82 IC("edit-find")
83 IC("edit-find-replace")
84 IC("edit-paste")
85 IC("edit-redo")
86 IC("edit-undo")
87 IC("edit-select-all")
88 IC("folder-copy")
89 IC("folder-move")
90 IC("folder-new")
91 IC("format-indent-less")
92 IC("format-indent-more")
93 IC("format-justify-center")
94 IC("format-justify-fill")
95 IC("format-justify-left")
96 IC("format-justify-right")
97 IC("format-text-direction-ltr")
98 IC("format-text-direction-rtl")
99 IC("format-text-bold")
100 IC("format-text-italic")
101 IC("format-text-underline")
102 IC("format-text-strikethrough")
103 IC("go-home")
104 IC("go-bottom")
105 IC("go-down")
106 IC("go-first")
107 IC("go-jump")
108 IC("go-last")
109 IC("go-next")
110 IC("go-previous")
111 IC("go-top")
112 IC("go-up")
113 IC("insert-image")
114 IC("insert-link")
115 IC("insert-object")
116 IC("insert-text")
117 IC("list-add")
118 IC("list-remove")
119 IC("mail-forward")
120 IC("mail-mark-important")
121 IC("mail-mark-junk")
122 IC("mail-mark-notjunk")
123 IC("mail-mark-read")
124 IC("mail-mark-unread")
125 IC("mail-message-new")
126 IC("mail-reply-all")
127 IC("mail-reply-sender")
128 IC("mail-send")
129 IC("mail-send-receive")
130 IC("media-eject")
131 IC("media-playback-pause")
132 IC("media-playback-start")
133 IC("media-playback-stop")
134 IC("media-record")
135 IC("media-seek-backward")
136 IC("media-seek-forward")
137 IC("media-skip-backward")
138 IC("media-skip-forward")
139 IC("object-flip-horizontal")
140 IC("object-flip-vertical")
141 IC("object-rotate-left")
142 IC("object-rotate-right")
143 IC("process-stop")
144 IC("tools-check-spelling")
145 IC("view-list-compact")
146 IC("view-list-details")
147 IC("view-list-icons")
148 IC("view-fullscreen")
149 IC("view-refresh")
150 IC("view-restore")
151 IC("view-sort-ascending")
152 IC("view-sort-descending")
153 IC("view-close")
154 IC("window-close")
155 IC("window-new")
156 IC("system-run")
157 IC("system-shutdown")
158 IC("system-reboot")
159 IC("system-lock-screen")
160 IC("system-log-out")
161 IC("system-search")
162 IC("help-about")
163 IC("help-contents")
164 IC("help-faq")
165 IC("zoom-in")
166 IC("zoom-out")
167 IC("zoom-original")
168 IC("zoom-fit")
169 IC("zoom-fill")
170 IC("zoom-fit-best")
171 IC("appointment-missed")
172 IC("appointment-soon")
173 IC("audio-volume-high")
174 IC("audio-volume-low")
175 IC("audio-volume-medium")
176 IC("audio-volume-muted")
177 IC("audio-volume")
178 IC("battery-caution")
179 IC("battery-empty")
180 IC("battery-low")
181 IC("battery-good")
182 IC("battery-full")
183 IC("battery-caution-charging")
184 IC("battery-empty-charging")
185 IC("battery-low-charging")
186 IC("battery-good-charging")
187 IC("battery-full-charging")
188 IC("bluetooth-active")
189 IC("bluetooth-disabled")
190 IC("changes-allow")
191 IC("changes-prevent")
192 IC("dialog-error")
193 IC("dialog-information")
194 IC("dialog-password")
195 IC("dialog-question")
196 IC("dialog-warning")
197 IC("media-playlist-repeat")
198 IC("media-playlist-shuffle")
199 IC("network-cellular-3g")
200 IC("network-cellular-4g")
201 IC("network-cellular-edge")
202 IC("network-cellular-gprs")
203 IC("network-cellular-umts")
204 IC("network-cellular-connected")
205 IC("network-cellular-signal-excellent")
206 IC("network-cellular-signal-good")
207 IC("network-cellular-signal-none")
208 IC("network-cellular-signal-ok")
209 IC("network-cellular-signal-weak")
210 IC("network-cellular-signal-acquiring")
211 IC("network-error")
212 IC("network-offline")
213 IC("network-receive")
214 IC("network-transmit-receive")
215 IC("network-transmit")
216 IC("network-idle")
217 IC("network-vpn")
218 IC("network-vpn-acquiring")
219 IC("network-wireless-acquiring")
220 IC("network-wireless-encrypted")
221 IC("network-wireless-signal-excellent")
222 IC("network-wireless-signal-good")
223 IC("network-wireless-signal-none")
224 IC("network-wireless-signal-ok")
225 IC("network-wireless-signal-weak")
226 IC("printer-error")
227 IC("printer-printing")
228 IC("printer-warning")
229 IC("security-high")
230 IC("security-medium")
231 IC("security-low")
232 IC("software-update-available")
233 IC("software-update-urgent")
234 IC("task-due")
235 IC("task-past-due")
236 IC("user-available")
237 IC("user-away")
238 IC("user-busy")
239 IC("user-invisible")
240 IC("user-idle")
241 IC("user-offline")
242 IC("user-trash-full")
243 IC("weather-clear-night")
244 IC("weather-clear")
245 IC("weather-clouds-night")
246 IC("weather-clouds")
247 IC("weather-few-clouds-night")
248 IC("weather-few-clouds")
249 IC("weather-fog")
250 IC("weather-overcast")
251 IC("weather-severe-alert")
252 IC("weather-showers-scattered")
253 IC("weather-showers")
254 IC("weather-snow")
255 IC("weather-storm")
256 IC("mail-attachment")
257 IC("mail-unread")
258 IC("mail-read")
259 IC("mail-replied")
260 IC("mail-signed")
261 IC("mail-signed-verified")
262 IC("starred")
263 IC("non-starred")
264 IC("audio-card")
265 IC("audio-input-microphone")
266 IC("battery")
267 IC("camera")
268 IC("camera-photo")
269 IC("camera-web")
270 IC("camera-video")
271 IC("drive-harddisk")
272 IC("drive-harddisk-ieee1394")
273 IC("drive-harddisk-usb")
274 IC("drive-optical")
275 IC("drive-removable-media")
276 IC("drive-removable-media-ieee1394")
277 IC("drive-removable-media-usb")
278 IC("computer")
279 IC("computer-laptop")
280 IC("multimedia-player")
281 IC("media-optical")
282 IC("media-optical-cd")
283 IC("media-optical-audio")
284 IC("media-optical-dvd")
285 IC("media-optical-bd")
286 IC("media-flash")
287 IC("media-flash-cf")
288 IC("media-flash-ms")
289 IC("media-flash-sd")
290 IC("media-flash-sm")
291 IC("media-floppy")
292 IC("media-zip")
293 IC("media-tape")
294 IC("media-memory")
295 IC("processor")
296 IC("input-mouse")
297 IC("input-tablet")
298 IC("input-keyboard")
299 IC("input-gaming")
300 IC("pda")
301 IC("phone")
302 IC("printer")
303 IC("scanner")
304 IC("modem")
305 IC("video-display")
306 IC("network-wired")
307 IC("network-wireless")
308 IC("applications-accessories")
309 IC("applications-development")
310 IC("applications-games")
311 IC("applications-graphics")
312 IC("applications-internet")
313 IC("applications-multimedia")
314 IC("applications-office")
315 IC("applications-other")
316 IC("applications-science")
317 IC("applications-system")
318 IC("applications-utilities")
319 IC("preferences-desktop")
320 IC("preferences-system")
321 IC("preferences-other")
322 IC("preferences-color")
323 IC("preferences-profile")
324 IC("preferences-desktop-display")
325 IC("preferences-desktop-font")
326 IC("preferences-desktop-keyboard")
327 IC("preferences-desktop-locale")
328 IC("preferences-desktop-multimedia")
329 IC("preferences-desktop-screensaver")
330 IC("preferences-desktop-theme")
331 IC("preferences-desktop-wallpaper")
332 IC("system-file-manager")
333 IC("flag-ad")
334 IC("flag-af")
335 IC("flag-al")
336 IC("flag-am")
337 IC("flag-ar")
338 IC("flag-at")
339 IC("flag-au")
340 IC("flag-az")
341 IC("flag-ba")
342 IC("flag-bd")
343 IC("flag-be")
344 IC("flag-bg")
345 IC("flag-br")
346 IC("flag-bt")
347 IC("flag-bw")
348 IC("flag-by")
349 IC("flag-ca")
350 IC("flag-cd")
351 IC("flag-ch")
352 IC("flag-cm")
353 IC("flag-cn")
354 IC("flag-cz")
355 IC("flag-de")
356 IC("flag-dk")
357 IC("flag-ee")
358 IC("flag-es")
359 IC("flag-et")
360 IC("flag-fi")
361 IC("flag-fo")
362 IC("flag-fr")
363 IC("flag-gb")
364 IC("flag-ge")
365 IC("flag-gh")
366 IC("flag-gn")
367 IC("flag-gr")
368 IC("flag-hr")
369 IC("flag-hu")
370 IC("flag-ie")
371 IC("flag-il")
372 IC("flag-in")
373 IC("flag-iq")
374 IC("flag-ir")
375 IC("flag-is")
376 IC("flag-it")
377 IC("flag-jp")
378 IC("flag-ke")
379 IC("flag-kg")
380 IC("flag-kh")
381 IC("flag-kr")
382 IC("flag-ku")
383 IC("flag-kz")
384 IC("flag-la")
385 IC("flag-lk")
386 IC("flag-lt")
387 IC("flag-lv")
388 IC("flag-ma")
389 IC("flag-md")
390 IC("flag-me")
391 IC("flag-mk")
392 IC("flag-ml")
393 IC("flag-mm")
394 IC("flag-mn")
395 IC("flag-mt")
396 IC("flag-mv")
397 IC("flag-my")
398 IC("flag-ng")
399 IC("flag-nl")
400 IC("flag-no")
401 IC("flag-np")
402 IC("flag-ph")
403 IC("flag-pk")
404 IC("flag-pl")
405 IC("flag-pt")
406 IC("flag-ro")
407 IC("flag-rs")
408 IC("flag-ru")
409 IC("flag-se")
410 IC("flag-si")
411 IC("flag-sk")
412 IC("flag-sn")
413 IC("flag-sy")
414 IC("flag-th")
415 IC("flag-tj")
416 IC("flag-tm")
417 IC("flag-tr")
418 IC("flag-tw")
419 IC("flag-tz")
420 IC("flag-ua")
421 IC("flag-us")
422 IC("flag-uz")
423 IC("flag-vn")
424 IC("flag-za")
425 IC("inode-directory")
426
427 eina_value_flush(&vtext);
428 return model;
429}
430
431static void
432_item_constructing(void *data EINA_UNUSED, const Efl_Event *ev)
433{
434 Efl_Gfx_Entity *item = ev->info;
435
436 if (!efl_key_data_get(item, "efl.ui.widget.factory.size_set"))
437 efl_gfx_hint_size_min_set(item, EINA_SIZE2D(100, 100));
438}
439
440EAPI_MAIN void
441efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
442{
443 Efl_Ui_Factory *factory, *image_factory;
444 Efl_Ui_Win *win;
445 Efl_Ui_Grid_View *grid;
446 Eo *model;
447
448 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
449
450 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
451 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
452 efl_text_set(efl_added, "Efl.Ui.Grid_View example"),
453 efl_ui_win_autodel_set(efl_added, EINA_TRUE)
454 );
455
456 model = _make_model(win);
457 image_factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
458 efl_ui_widget_factory_item_class_set(image_factory, EFL_UI_IMAGE_CLASS);
459 efl_ui_property_bind(image_factory, "icon", "title");
460
461 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
462 efl_ui_widget_factory_item_class_set(factory, EFL_UI_GRID_DEFAULT_ITEM_CLASS);
463 efl_ui_property_bind(factory, "efl.text", "title");
464 efl_ui_factory_bind(factory, "icon", image_factory);
465 efl_event_callback_add(factory, EFL_UI_FACTORY_EVENT_ITEM_CONSTRUCTING, _item_constructing, NULL);
466
467 grid = efl_add(EFL_UI_GRID_VIEW_CLASS, win,
468 efl_ui_collection_view_factory_set(efl_added, factory),
469 efl_ui_view_model_set(efl_added, model)
470 );
471 evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
472 evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL);
473
474 efl_content_set(win, grid);
475 efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
476}
477EFL_MAIN()
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index ac4976a..d9ade67 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -13,13 +13,6 @@
13#include <Eio.h> 13#include <Eio.h>
14#include <stdio.h> 14#include <stdio.h>
15 15
16//FIXME this can go away when efl_ui_text doesn't need elm_general
17# include <elm_general.h>
18# include <efl_text_interactive.eo.h>
19# include <efl_ui_text.eo.h>
20# include <efl_ui_text_editable.eo.h>
21# include <efl_ui_text_async.eo.h>
22
23#define NUM_ITEMS 400 16#define NUM_ITEMS 400
24 17
25typedef struct _List_Scroll_Data { 18typedef struct _List_Scroll_Data {
@@ -37,7 +30,7 @@ _list_selected(void *data EINA_UNUSED, const Efl_Event *ev)
37 Eo *item = ev->info, *tmp; 30 Eo *item = ev->info, *tmp;
38 printf("list item [%p:%d] is %s\n", item, efl_ui_item_index_get(item), (efl_ui_selectable_selected_get(item)? "selected" : "unselected")); 31 printf("list item [%p:%d] is %s\n", item, efl_ui_item_index_get(item), (efl_ui_selectable_selected_get(item)? "selected" : "unselected"));
39 32
40 Eina_Iterator *selects = efl_ui_selectable_selected_iterator_new(list); 33 Eina_Iterator *selects = efl_ui_multi_selectable_selected_iterator_new(list);
41 34
42 EINA_ITERATOR_FOREACH(selects, tmp) 35 EINA_ITERATOR_FOREACH(selects, tmp)
43 printf("selected [%p:%d] ", tmp, efl_ui_item_index_get(tmp)); 36 printf("selected [%p:%d] ", tmp, efl_ui_item_index_get(tmp));
@@ -77,7 +70,7 @@ static void
77_select_radio_changed(void *data, const Efl_Event *ev) 70_select_radio_changed(void *data, const Efl_Event *ev)
78{ 71{
79 Eo *list = data; 72 Eo *list = data;
80 efl_ui_selectable_select_mode_set(list, efl_ui_radio_group_selected_value_get(ev->object)); 73 efl_ui_multi_selectable_select_mode_set(list, efl_ui_radio_group_selected_value_get(ev->object));
81} 74}
82 75
83static void 76static void
@@ -152,9 +145,9 @@ elm_main(int argc EINA_UNUSED, char **argv)
152 ibox = efl_add(EFL_UI_BOX_CLASS, item); 145 ibox = efl_add(EFL_UI_BOX_CLASS, item);
153 efl_ui_layout_orientation_set(ibox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL); 146 efl_ui_layout_orientation_set(ibox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
154 147
155 txt = efl_add(EFL_UI_TEXT_CLASS, ibox); 148 txt = efl_add(EFL_UI_TEXTBOX_CLASS, ibox);
156 efl_gfx_hint_weight_set(txt, 0.95, EFL_GFX_HINT_EXPAND); 149 efl_gfx_hint_weight_set(txt, 0.95, EFL_GFX_HINT_EXPAND);
157 efl_text_halign_set(txt, 0.2); 150 efl_text_horizontal_align_set(txt, 0.2);
158 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE); 151 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
159 snprintf(buf, sizeof(buf), "placeholder style item [%d]", i); 152 snprintf(buf, sizeof(buf), "placeholder style item [%d]", i);
160 efl_text_set(txt, buf); 153 efl_text_set(txt, buf);
@@ -230,9 +223,9 @@ elm_main(int argc EINA_UNUSED, char **argv)
230 efl_pack_end(wbox, list); 223 efl_pack_end(wbox, list);
231 224
232 /*select mode */ 225 /*select mode */
233 txt = efl_add(EFL_UI_TEXT_CLASS, wbox); 226 txt = efl_add(EFL_UI_TEXTBOX_CLASS, wbox);
234 efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01); 227 efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01);
235 efl_text_halign_set(txt, 0.02); 228 efl_text_horizontal_align_set(txt, 0.02);
236 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE); 229 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
237 efl_text_set(txt, "Select Mode"); 230 efl_text_set(txt, "Select Mode");
238 efl_pack_end(wbox, txt); 231 efl_pack_end(wbox, txt);
@@ -257,10 +250,10 @@ elm_main(int argc EINA_UNUSED, char **argv)
257 efl_event_callback_add(bbox, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, _select_radio_changed, list); 250 efl_event_callback_add(bbox, EFL_UI_RADIO_GROUP_EVENT_VALUE_CHANGED, _select_radio_changed, list);
258 251
259 /* scroll mode */ 252 /* scroll mode */
260 txt = efl_add(EFL_UI_TEXT_CLASS, wbox); 253 txt = efl_add(EFL_UI_TEXTBOX_CLASS, wbox);
261 efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01); 254 efl_gfx_hint_weight_set(txt, EFL_GFX_HINT_EXPAND, 0.01);
262 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE); 255 efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
263 efl_text_halign_set(txt, 0.02); 256 efl_text_horizontal_align_set(txt, 0.02);
264 efl_text_set(txt, "Item Scroll"); 257 efl_text_set(txt, "Item Scroll");
265 efl_pack_end(wbox, txt); 258 efl_pack_end(wbox, txt);
266 259
diff --git a/src/examples/elementary/efl_ui_list_view_example_3.c b/src/examples/elementary/efl_ui_list_view_example_3.c
index c9f6b0d..dcf6082 100644
--- a/src/examples/elementary/efl_ui_list_view_example_3.c
+++ b/src/examples/elementary/efl_ui_list_view_example_3.c
@@ -110,7 +110,7 @@ static void
110_bt_none_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 110_bt_none_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
111{ 111{
112 Evas_Object *li = data; 112 Evas_Object *li = data;
113 efl_ui_multi_selectable_async_select_mode_set(li, EFL_UI_SELECT_MODE_NONE); 113 efl_ui_multi_selectable_select_mode_set(li, EFL_UI_SELECT_MODE_NONE);
114} 114}
115 115
116static void 116static void
@@ -124,7 +124,7 @@ static void
124_bt_default_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 124_bt_default_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
125{ 125{
126 Evas_Object *li = data; 126 Evas_Object *li = data;
127 efl_ui_multi_selectable_async_select_mode_set(li, EFL_UI_SELECT_MODE_SINGLE); 127 efl_ui_multi_selectable_select_mode_set(li, EFL_UI_SELECT_MODE_SINGLE);
128} 128}
129 129
130static void 130static void
diff --git a/src/examples/elementary/efl_ui_relative_layout_example_01.c b/src/examples/elementary/efl_ui_relative_container_example_01.c
index 77453cf..f7bcb64 100644
--- a/src/examples/elementary/efl_ui_relative_layout_example_01.c
+++ b/src/examples/elementary/efl_ui_relative_container_example_01.c
@@ -1,4 +1,4 @@
1// gcc -o efl_ui_relative_layout_example_01 efl_ui_relative_layout_example_01.c `pkg-config --cflags --libs elementary` 1// gcc -o efl_ui_relative_container_example_01 efl_ui_relative_container_example_01.c `pkg-config --cflags --libs elementary`
2 2
3#ifdef HAVE_CONFIG_H 3#ifdef HAVE_CONFIG_H
4#include "elementary_config.h" 4#include "elementary_config.h"
@@ -16,10 +16,10 @@ elm_main(int argc, char **argv)
16 Eo *win, *layout, *btn1, *btn2, *btn3; 16 Eo *win, *layout, *btn1, *btn2, *btn3;
17 17
18 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 18 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
19 efl_text_set(efl_added, "Efl.Ui.Relative_Layout"), 19 efl_text_set(efl_added, "Efl.Ui.Relative_Container"),
20 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 20 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
21 21
22 layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win, 22 layout = efl_add(EFL_UI_RELATIVE_CONTAINER_CLASS, win,
23 efl_content_set(win, efl_added)); 23 efl_content_set(win, efl_added));
24 24
25 btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout, 25 btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout,
@@ -27,20 +27,20 @@ elm_main(int argc, char **argv)
27 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)), 27 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)),
28 efl_gfx_hint_align_set(efl_added, 0, 0), 28 efl_gfx_hint_align_set(efl_added, 0, 0),
29 efl_gfx_hint_margin_set(efl_added, 10, 30, 20, 40), 29 efl_gfx_hint_margin_set(efl_added, 10, 30, 20, 40),
30 efl_ui_relative_layout_relation_right_set(layout, efl_added, layout, 0.0), 30 efl_ui_relative_container_relation_right_set(layout, efl_added, layout, 0.0),
31 efl_ui_relative_layout_relation_bottom_set(layout, efl_added, layout, 0.0)); 31 efl_ui_relative_container_relation_bottom_set(layout, efl_added, layout, 0.0));
32 32
33 btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout, 33 btn2 = efl_add(EFL_UI_BUTTON_CLASS, layout,
34 efl_text_set(efl_added, "btn2"), 34 efl_text_set(efl_added, "btn2"),
35 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 200)), 35 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 200)),
36 efl_gfx_hint_align_set(efl_added, 0.5, 0), 36 efl_gfx_hint_align_set(efl_added, 0.5, 0),
37 efl_ui_relative_layout_relation_left_set(layout, efl_added, btn1, 1.0), 37 efl_ui_relative_container_relation_left_set(layout, efl_added, btn1, 1.0),
38 efl_ui_relative_layout_relation_bottom_set(layout, efl_added, layout, 0.0)); 38 efl_ui_relative_container_relation_bottom_set(layout, efl_added, layout, 0.0));
39 39
40 btn3 = efl_add(EFL_UI_BUTTON_CLASS, layout, 40 btn3 = efl_add(EFL_UI_BUTTON_CLASS, layout,
41 efl_text_set(efl_added, "btn3"), 41 efl_text_set(efl_added, "btn3"),
42 efl_ui_relative_layout_relation_left_set(layout, efl_added, btn2, 0.0), 42 efl_ui_relative_container_relation_left_set(layout, efl_added, btn2, 0.0),
43 efl_ui_relative_layout_relation_top_set(layout, efl_added, btn2, 1.0)); 43 efl_ui_relative_container_relation_top_set(layout, efl_added, btn2, 1.0));
44 44
45 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300)); 45 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300));
46 46
diff --git a/src/examples/elementary/efl_ui_relative_layout_example_02.c b/src/examples/elementary/efl_ui_relative_container_example_02.c
index bc3740d..bb18c26 100644
--- a/src/examples/elementary/efl_ui_relative_layout_example_02.c
+++ b/src/examples/elementary/efl_ui_relative_container_example_02.c
@@ -1,4 +1,4 @@
1// gcc -o efl_ui_relative_layout_example_02 efl_ui_relative_layout_example_02.c `pkg-config --cflags --libs elementary` 1// gcc -o efl_ui_relative_container_example_02 efl_ui_relative_container_example_02.c `pkg-config --cflags --libs elementary`
2 2
3#ifdef HAVE_CONFIG_H 3#ifdef HAVE_CONFIG_H
4#include "elementary_config.h" 4#include "elementary_config.h"
@@ -16,10 +16,10 @@ elm_main(int argc, char **argv)
16 Eo *win, *layout, *btn1, *btn2; 16 Eo *win, *layout, *btn1, *btn2;
17 17
18 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 18 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
19 efl_text_set(efl_added, "Efl.Ui.Relative_Layout"), 19 efl_text_set(efl_added, "Efl.Ui.Relative_Container"),
20 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 20 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
21 21
22 layout = efl_add(EFL_UI_RELATIVE_LAYOUT_CLASS, win, 22 layout = efl_add(EFL_UI_RELATIVE_CONTAINER_CLASS, win,
23 efl_content_set(win, efl_added)); 23 efl_content_set(win, efl_added));
24 24
25 btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout, 25 btn1 = efl_add(EFL_UI_BUTTON_CLASS, layout,
@@ -30,11 +30,11 @@ elm_main(int argc, char **argv)
30 efl_text_set(efl_added, "btn2"), 30 efl_text_set(efl_added, "btn2"),
31 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 100))); 31 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 100)));
32 32
33 efl_ui_relative_layout_relation_right_set(layout, btn1, btn2, 0.0); 33 efl_ui_relative_container_relation_right_set(layout, btn1, btn2, 0.0);
34 efl_ui_relative_layout_relation_bottom_set(layout, btn1, btn2, 0.0); 34 efl_ui_relative_container_relation_bottom_set(layout, btn1, btn2, 0.0);
35 35
36 efl_ui_relative_layout_relation_left_set(layout, btn2, btn1, 1.0); 36 efl_ui_relative_container_relation_left_set(layout, btn2, btn1, 1.0);
37 efl_ui_relative_layout_relation_top_set(layout, btn2, btn1, 1.0); 37 efl_ui_relative_container_relation_top_set(layout, btn2, btn1, 1.0);
38 38
39 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300)); 39 efl_gfx_entity_size_set(win, EINA_SIZE2D(300, 300));
40 40
diff --git a/src/examples/elementary/efl_ui_slider_mono.cs b/src/examples/elementary/efl_ui_slider_mono.cs
index 739601a..feaab64 100644
--- a/src/examples/elementary/efl_ui_slider_mono.cs
+++ b/src/examples/elementary/efl_ui_slider_mono.cs
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1using System; 16using System;
2 17
3public class Example 18public class Example
diff --git a/src/examples/elementary/efl_ui_slideshow_example.c b/src/examples/elementary/efl_ui_slideshow_example.c
index 6292f43..4be9865 100644
--- a/src/examples/elementary/efl_ui_slideshow_example.c
+++ b/src/examples/elementary/efl_ui_slideshow_example.c
@@ -93,8 +93,8 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
93 container = efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, win, 93 container = efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, win,
94 efl_event_callback_add(efl_added, EFL_UI_SPOTLIGHT_EVENT_TRANSITION_END, _container_end, NULL), 94 efl_event_callback_add(efl_added, EFL_UI_SPOTLIGHT_EVENT_TRANSITION_END, _container_end, NULL),
95 efl_pack_table(table, efl_added, 0, 0, 1, 1)); 95 efl_pack_table(table, efl_added, 0, 0, 1, 1));
96 efl_ui_spotlight_indicator_set(container, efl_new(EFL_UI_SPOTLIGHT_INDICATOR_ICON_CLASS)); 96 efl_ui_spotlight_indicator_set(container, efl_new(EFL_UI_SPOTLIGHT_ICON_INDICATOR_CLASS));
97 efl_ui_spotlight_manager_set(container, efl_new(EFL_UI_SPOTLIGHT_MANAGER_STACK_CLASS)); 97 efl_ui_spotlight_manager_set(container, efl_new(EFL_UI_SPOTLIGHT_FADE_MANAGER_CLASS));
98 98
99 for (int i = 0; i < IMG_NUM; i++) 99 for (int i = 0; i < IMG_NUM; i++)
100 { 100 {
diff --git a/src/examples/elementary/efl_ui_unit_converter.cs b/src/examples/elementary/efl_ui_unit_converter.cs
index 93a5f89..6d7f200 100644
--- a/src/examples/elementary/efl_ui_unit_converter.cs
+++ b/src/examples/elementary/efl_ui_unit_converter.cs
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1using System; 16using System;
2 17
3public class Example 18public class Example
@@ -17,7 +32,7 @@ public class Example
17 private static void ShowErrorPopup(Efl.Ui.Win win, string message) 32 private static void ShowErrorPopup(Efl.Ui.Win win, string message)
18 { 33 {
19 Efl.Ui.AlertPopup popup = new Efl.Ui.AlertPopup(win); 34 Efl.Ui.AlertPopup popup = new Efl.Ui.AlertPopup(win);
20 Efl.Ui.Text popup_text = new Efl.Ui.Text(popup); 35 Efl.Ui.Textbox popup_text = new Efl.Ui.Textbox(popup);
21 popup_text.SetText($"Error: {message}"); 36 popup_text.SetText($"Error: {message}");
22 popup.SetContent(popup_text); 37 popup.SetContent(popup_text);
23 popup.SetVisible(true); 38 popup.SetVisible(true);
@@ -53,14 +68,15 @@ public class Example
53 68
54 box.DoPack(miles_box); 69 box.DoPack(miles_box);
55 70
56 Efl.Ui.Text miles_label = new Efl.Ui.Text(miles_box); 71 Efl.Ui.Textbox miles_label = new Efl.Ui.Textbox(miles_box);
57 miles_label.SetText("Miles:"); 72 miles_label.SetText("Miles:");
58 miles_label.SetSize(size); 73 miles_label.SetSize(size);
59 miles_label.SetVisible(true); 74 miles_label.SetVisible(true);
60 75
61 Efl.Ui.TextEditable miles_input = new Efl.Ui.TextEditable(miles_box); 76 Efl.Ui.Textbox miles_input = new Efl.Ui.Textbox(miles_box);
62 miles_input.SetText(""); 77 miles_input.SetText("");
63 miles_input.SetScrollable(true); 78 miles_input.SetScrollable(true);
79 miles_input.SetEditable(true);
64 miles_input.SetSize(size); 80 miles_input.SetSize(size);
65 miles_input.SetVisible(true); 81 miles_input.SetVisible(true);
66 82
@@ -79,12 +95,12 @@ public class Example
79 95
80 box.DoPack(kms_box); 96 box.DoPack(kms_box);
81 97
82 Efl.Ui.Text kms_label = new Efl.Ui.Text(kms_box); 98 Efl.Ui.Textbox kms_label = new Efl.Ui.Textbox(kms_box);
83 kms_label.SetText("Kilometers:"); 99 kms_label.SetText("Kilometers:");
84 kms_label.SetSize(size); 100 kms_label.SetSize(size);
85 kms_label.SetVisible(true); 101 kms_label.SetVisible(true);
86 102
87 Efl.Ui.TextEditable kms_input = new Efl.Ui.TextEditable(kms_box); 103 Efl.Ui.TextboxEditable kms_input = new Efl.Ui.TextboxEditable(kms_box);
88 kms_input.SetText(""); 104 kms_input.SetText("");
89 kms_input.SetScrollable(true); 105 kms_input.SetScrollable(true);
90 kms_input.SetSize(size); 106 kms_input.SetSize(size);
diff --git a/src/examples/elementary/icon_cxx_example_01.cc b/src/examples/elementary/icon_cxx_example_01.cc
index 90271c1..97fbe95 100644
--- a/src/examples/elementary/icon_cxx_example_01.cc
+++ b/src/examples/elementary/icon_cxx_example_01.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#include <Efl_Ui.hh> 16#include <Efl_Ui.hh>
2 17
3EAPI_MAIN int 18EAPI_MAIN int
diff --git a/src/examples/elementary/icon_example_01.js b/src/examples/elementary/icon_example_01.js
index 21d78f1..8288053 100644
--- a/src/examples/elementary/icon_example_01.js
+++ b/src/examples/elementary/icon_example_01.js
@@ -12,7 +12,7 @@ icon.setIcon("home");
12var path, group; 12var path, group;
13r = icon.getFile(path, group); 13r = icon.getFile(path, group);
14path = r[0]; 14path = r[0];
15gruop = r[1]; 15group = r[1];
16console.log("path = " + path + ", group = " + group); 16console.log("path = " + path + ", group = " + group);
17 17
18var name; 18var name;
diff --git a/src/examples/elementary/layout_property_bind.c b/src/examples/elementary/layout_property_bind.c
index f9c5cf9..8dc68a5 100644
--- a/src/examples/elementary/layout_property_bind.c
+++ b/src/examples/elementary/layout_property_bind.c
@@ -27,6 +27,8 @@ struct _Layout_Model_Data
27}; 27};
28typedef struct _Layout_Model_Data Layout_Model_Data; 28typedef struct _Layout_Model_Data Layout_Model_Data;
29 29
30static Evas_Object *win = NULL;
31
30static Eina_Value 32static Eina_Value
31_wait_for_image(Eo *o EINA_UNUSED, void *data, const Eina_Value v) 33_wait_for_image(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
32{ 34{
@@ -50,22 +52,32 @@ _cleanup_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
50} 52}
51 53
52static void 54static void
53_list_selected_cb(void *data EINA_UNUSED, const Efl_Event *event) 55_list_pressed_item_cb(void *data EINA_UNUSED, const Efl_Event *event)
54{ 56{
55 Layout_Model_Data *priv = data; 57 Layout_Model_Data *priv = data;
56 Eo *child = event->info; 58 Efl_Ui_Item_Clickable_Pressed *pressed = event->info;
57 59 Efl_Ui_Item *item = pressed->item;
58 printf("LIST selected model\n"); 60 Efl_Model *model = efl_ui_view_model_get(item);
59 efl_ui_view_model_set(priv->provider, child); 61
62 printf("LIST pressed model `%s` from item `%s`.\n",
63 efl_debug_name_get(model),
64 efl_debug_name_get(item));
65 efl_ui_view_model_set(priv->provider, model);
60} 66}
61 67
62static void 68static void
63_update_cb(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED) 69_update_cb(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
64{ 70{
65 Layout_Model_Data *priv = data; 71 Layout_Model_Data *priv = data;
72 Efl_Model *newone;
66 73
67 const char *text = elm_object_text_get(priv->entry); 74 const char *text = elm_object_text_get(priv->entry);
68 elm_layout_text_set(priv->label, "default", text); 75 newone = efl_add(EFL_IO_MODEL_CLASS, win,
76 efl_io_model_path_set(efl_added, text));
77 efl_ui_view_model_set(priv->fileview, newone);
78 efl_del(priv->model);
79 priv->model = newone;
80
69} 81}
70 82
71static void 83static void
@@ -103,7 +115,8 @@ EAPI_MAIN int
103elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) 115elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
104{ 116{
105 Layout_Model_Data *priv; 117 Layout_Model_Data *priv;
106 Evas_Object *win, *panes, *bxr, *genlist; 118 Evas_Object *panes, *bxr;
119 Efl_Ui_Factory *factory;
107 Eo *img_factory; 120 Eo *img_factory;
108 char *dirname; 121 char *dirname;
109 122
@@ -122,16 +135,19 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
122 if (argv[1] != NULL) dirname = argv[1]; 135 if (argv[1] != NULL) dirname = argv[1];
123 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 136 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
124 137
125 priv->model = efl_add_ref(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname)); 138 priv->model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
139
140 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
141 efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
142 efl_ui_property_bind(factory, "efl.text", "filename");
126 143
127 genlist = elm_genlist_add(win); 144 priv->fileview = efl_add(EFL_UI_LIST_VIEW_CLASS, panes,
128 priv->fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, win, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, NULL)); 145 efl_ui_collection_view_factory_set(efl_added, factory),
129 elm_view_list_property_connect(priv->fileview, "filename", "elm.text"); 146 efl_ui_view_model_set(efl_added, priv->model));
130 elm_view_list_model_set(priv->fileview, priv->model); 147 _widget_init(priv->fileview);
131 _widget_init(genlist); 148 elm_object_part_content_set(panes, "left", priv->fileview);
132 elm_object_part_content_set(panes, "left", genlist);
133 elm_panes_content_left_size_set(panes, 0.3); 149 elm_panes_content_left_size_set(panes, 0.3);
134 efl_event_callback_add(priv->fileview, ELM_VIEW_LIST_EVENT_MODEL_SELECTED, _list_selected_cb, priv); 150 efl_event_callback_add(priv->fileview, EFL_UI_EVENT_ITEM_PRESSED, _list_pressed_item_cb, priv);
135 151
136 bxr = elm_box_add(win); 152 bxr = elm_box_add(win);
137 priv->bxr = bxr; 153 priv->bxr = bxr;
diff --git a/src/examples/elementary/location_example_01.c b/src/examples/elementary/location_example_01.c
deleted file mode 100644
index 7b8ad6f..0000000
--- a/src/examples/elementary/location_example_01.c
+++ /dev/null
@@ -1,151 +0,0 @@
1//Compile with:
2//gcc -o location_example_01 location_example_01.c -g `pkg-config --cflags --libs elementary elocation`
3#ifndef EFL_BETA_API_SUPPORT
4# define EFL_BETA_API_SUPPORT
5#endif
6
7#include <Elementary.h>
8#ifdef ELM_ELOCATION
9#include <Elocation.h>
10#endif
11
12static Evas_Object *pos_label, *addr_label, *box, *win;
13
14#ifdef ELM_ELOCATION
15static void
16_print_position(Elocation_Position *position)
17{
18 char buffer[1024];
19
20 if (!position) return;
21 snprintf(buffer, sizeof(buffer),
22 "<b>### Position Detail ###</b><br/>"
23 "<b>GeoClue position reply with data from timestamp</b> %i<br/>"
24 "<b>Latitude:</b> %f<br/>"
25 "<b>Longitude:</b> %f<br/>"
26 "<b>Altitude:</b> %f<br/>"
27 "<b>Accuracy level:</b> %i<br/>"
28 "<b>Accuracy horizontal:</b> %f<br/>"
29 "<b>Accuracy vertical:</b> %f",
30 position->timestamp, position->latitude, position->longitude,
31 position->altitude, position->accur->level,
32 position->accur->horizontal, position->accur->vertical);
33 elm_object_text_set(pos_label, buffer);
34}
35
36static void
37_print_address(Elocation_Address *address)
38{
39 char buffer[1024];
40
41 if (!address) return;
42 snprintf(buffer, sizeof(buffer),
43 "<b>### Address Detail ###</b><br/>"
44 "<b>Address update with data from timestamp:</b> %i<br/>"
45 "<b>Country:</b> %s<br/>"
46 "<b>Countrycode:</b> %s<br/>"
47 "<b>Locality:</b> %s<br/>"
48 "<b>Postalcode:</b> %s<br/>"
49 "<b>Region:</b> %s<br/>"
50 "<b>Timezone:</b> %s<br/>"
51 "<b>Accuracy level:</b> %i<br/>"
52 "<b>Accuracy horizontal:</b> %f<br/>"
53 "<b>Accuracy vertical:</b> %f",
54 address->timestamp, address->country, address->countrycode,
55 address->locality, address->postalcode, address->region,
56 address->timezone, address->accur->level, address->accur->horizontal,
57 address->accur->vertical);
58 elm_object_text_set(addr_label, buffer);
59}
60
61static Eina_Bool
62_position_changed(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
63{
64 Elocation_Position *position;
65
66 position = event;
67 _print_position(position);
68 return ECORE_CALLBACK_DONE;
69}
70
71static Eina_Bool
72_address_changed(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
73{
74 Elocation_Address *address;
75
76 address = event;
77 _print_address(address);
78
79 return ECORE_CALLBACK_DONE;
80}
81#endif
82
83EAPI_MAIN int
84elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
85{
86#ifdef ELM_ELOCATION
87 Elocation_Address *address;
88 Elocation_Position *position;
89#endif
90
91 /* The program will proceed only if Ewebkit library is available. */
92 if (elm_need_elocation() == EINA_FALSE)
93 return -1;
94
95 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
96
97 win = elm_win_util_standard_add("elocation", "Elocation example");
98 elm_win_autodel_set(win, EINA_TRUE);
99
100 box = elm_box_add(win);
101 elm_win_resize_object_add(win, box);
102 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
103 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
104
105 pos_label = elm_label_add(box);
106 elm_label_line_wrap_set(pos_label, ELM_WRAP_CHAR);
107 elm_object_text_set(pos_label, "Getting location ...");
108 evas_object_size_hint_weight_set(pos_label, EVAS_HINT_EXPAND, 0.0);
109 evas_object_size_hint_align_set(pos_label, EVAS_HINT_FILL, EVAS_HINT_FILL);
110 elm_label_slide_mode_set(pos_label, ELM_LABEL_SLIDE_MODE_ALWAYS);
111 elm_box_pack_end(box, pos_label);
112 evas_object_show(pos_label);
113 elm_box_padding_set(box, 0, 50);
114
115 addr_label = elm_label_add(box);
116 elm_label_line_wrap_set(addr_label, ELM_WRAP_CHAR);
117 elm_object_text_set(addr_label, "Getting location ...");
118 evas_object_size_hint_weight_set(addr_label, EVAS_HINT_EXPAND, 0.0);
119 evas_object_size_hint_align_set(addr_label, EVAS_HINT_FILL, EVAS_HINT_FILL);
120 elm_label_slide_mode_set(addr_label, ELM_LABEL_SLIDE_MODE_ALWAYS);
121 elm_box_pack_end(box, addr_label);
122 evas_object_show(addr_label);
123
124#ifdef ELM_ELOCATION
125 address = elocation_address_new();
126 position = elocation_position_new();
127
128 ecore_event_handler_add(ELOCATION_EVENT_POSITION, _position_changed, NULL);
129 ecore_event_handler_add(ELOCATION_EVENT_ADDRESS, _address_changed, NULL);
130
131 elocation_position_get(position);
132 _print_position(position);
133
134 elocation_address_get(address);
135 _print_address(address);
136#endif
137
138 evas_object_show(box);
139 evas_object_resize(win, 600, 480);
140 evas_object_show(win);
141
142 elm_run();
143
144#ifdef ELM_ELOCATION
145 elocation_position_free(position);
146 elocation_address_free(address);
147#endif
148
149 return 0;
150}
151ELM_MAIN()
diff --git a/src/examples/elementary/menu_cxx_example_01.cc b/src/examples/elementary/menu_cxx_example_01.cc
index ff3a62e..dfc717e 100644
--- a/src/examples/elementary/menu_cxx_example_01.cc
+++ b/src/examples/elementary/menu_cxx_example_01.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#include <Efl_Ui.hh> 16#include <Efl_Ui.hh>
2 17
3#warning This example can not be implemented with EO APIs... FIXME 18#warning This example can not be implemented with EO APIs... FIXME
diff --git a/src/examples/elementary/meson.build b/src/examples/elementary/meson.build
index 5348929..cdb08d4 100644
--- a/src/examples/elementary/meson.build
+++ b/src/examples/elementary/meson.build
@@ -59,7 +59,6 @@ examples = [
59 'list_example_01', 59 'list_example_01',
60 'list_example_02', 60 'list_example_02',
61 'list_example_03', 61 'list_example_03',
62 'location_example_01',
63 'map_example_01', 62 'map_example_01',
64 'map_example_02', 63 'map_example_02',
65 'map_example_03', 64 'map_example_03',
@@ -120,7 +119,9 @@ examples = [
120 'efl_ui_theme_example_02', 119 'efl_ui_theme_example_02',
121 'efl_ui_slideshow_example', 120 'efl_ui_slideshow_example',
122 'efl_ui_radio_example_01', 121 'efl_ui_radio_example_01',
123 'efl_ui_grid_example_1' 122 'efl_ui_grid_example_1',
123 'efl_ui_grid_view_example_1',
124 'efl_canvas_textblock_obstacles_example'
124] 125]
125 126
126foreach example : examples 127foreach example : examples
diff --git a/src/examples/elementary/popup_cxx_example.cc b/src/examples/elementary/popup_cxx_example.cc
index 08c2e2f..7322807 100644
--- a/src/examples/elementary/popup_cxx_example.cc
+++ b/src/examples/elementary/popup_cxx_example.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` popup_cxx_example.cc -o popup_cxx_example 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` popup_cxx_example.cc -o popup_cxx_example
2 17
3#define EFL_CXXPERIMENTAL 18#define EFL_CXXPERIMENTAL
diff --git a/src/examples/elementary/radio_cxx_example_01.cc b/src/examples/elementary/radio_cxx_example_01.cc
index b561d02..572b718 100644
--- a/src/examples/elementary/radio_cxx_example_01.cc
+++ b/src/examples/elementary/radio_cxx_example_01.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` radio_cxx_example_01.cc -o radio_cxx_example_01 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` radio_cxx_example_01.cc -o radio_cxx_example_01
2 17
3#define EFL_CXXPERIMENTAL 18#define EFL_CXXPERIMENTAL
diff --git a/src/examples/elementary/slider_cxx_example.cc b/src/examples/elementary/slider_cxx_example.cc
index 5521588..2c90656 100644
--- a/src/examples/elementary/slider_cxx_example.cc
+++ b/src/examples/elementary/slider_cxx_example.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` slider_cxx_example.cc -o slider_cxx_example 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` slider_cxx_example.cc -o slider_cxx_example
2 17
3#define EFL_CXXPERIMENTAL 18#define EFL_CXXPERIMENTAL
diff --git a/src/examples/elementary/slider_example.js b/src/examples/elementary/slider_example.js
index ec59ee1..f3125e5 100644
--- a/src/examples/elementary/slider_example.js
+++ b/src/examples/elementary/slider_example.js
@@ -91,13 +91,13 @@ sl.setVisible(true);
91 91
92sl.on('changed', function(obj) 92sl.on('changed', function(obj)
93 { 93 {
94 val = obj.getProgressValue(); 94 var val = obj.getProgressValue();
95 console.log("Changed to " + val); 95 console.log("Changed to " + val);
96 }); 96 });
97 97
98sl.on('delay_changed', function(obj) 98sl.on('delay_changed', function(obj)
99 { 99 {
100 val = obj.getProgressValue(); 100 var val = obj.getProgressValue();
101 console.log("Delay changed to " + val); 101 console.log("Delay changed to " + val);
102 }); 102 });
103 103
diff --git a/src/examples/elementary/spinner_cxx_example.cc b/src/examples/elementary/spinner_cxx_example.cc
index a6f583f..02d2698 100644
--- a/src/examples/elementary/spinner_cxx_example.cc
+++ b/src/examples/elementary/spinner_cxx_example.cc
@@ -1,3 +1,18 @@
1/*
2+ * Copyright 2019 by its authors. See AUTHORS.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` spinner_cxx_example.cc -o spinner_cxx_example 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` spinner_cxx_example.cc -o spinner_cxx_example
2 17
3#define EFL_CXXPERIMENTAL 18#define EFL_CXXPERIMENTAL
diff --git a/src/examples/elementary/table_cxx_example_01.cc b/src/examples/elementary/table_cxx_example_01.cc
index f96bf82..962fc5d 100644
--- a/src/examples/elementary/table_cxx_example_01.cc
+++ b/src/examples/elementary/table_cxx_example_01.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` table_cxx_example_01.cc -o table_cxx_example_01 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` table_cxx_example_01.cc -o table_cxx_example_01
2 17
3#include <Efl_Ui.hh> 18#include <Efl_Ui.hh>
@@ -19,19 +34,19 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
19// FIXME 34// FIXME
20// table.homogeneous_set(true); 35// table.homogeneous_set(true);
21 36
22 efl::ui::Text label(instantiate, win); 37 efl::ui::Textbox label(instantiate, win);
23 label.text_set("label 0"); 38 label.text_set("label 0");
24 table.pack_table(label, 0, 0, 1, 1); 39 table.pack_table(label, 0, 0, 1, 1);
25 40
26 efl::ui::Text label1(instantiate, win); 41 efl::ui::Textbox label1(instantiate, win);
27 label1.text_set("label 1"); 42 label1.text_set("label 1");
28 table.pack_table(label1, 1, 0, 1, 1); 43 table.pack_table(label1, 1, 0, 1, 1);
29 44
30 efl::ui::Text label2(instantiate, win); 45 efl::ui::Textbox label2(instantiate, win);
31 label2.text_set("label 2"); 46 label2.text_set("label 2");
32 table.pack_table(label2, 0, 1, 1, 1); 47 table.pack_table(label2, 0, 1, 1, 1);
33 48
34 efl::ui::Text label3(instantiate, win); 49 efl::ui::Textbox label3(instantiate, win);
35 label3.text_set("label 3"); 50 label3.text_set("label 3");
36 table.pack_table(label3, 1, 1, 1, 1); 51 table.pack_table(label3, 1, 1, 1, 1);
37} 52}
diff --git a/src/examples/elementary/table_cxx_example_02.cc b/src/examples/elementary/table_cxx_example_02.cc
index 0fe8cf0..aff87a7 100644
--- a/src/examples/elementary/table_cxx_example_02.cc
+++ b/src/examples/elementary/table_cxx_example_02.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` table_cxx_example_01.cc -o table_cxx_example_01 16// g++ -g `pkg-config --cflags --libs elementary-cxx efl-cxx eina-cxx eo-cxx ecore-cxx evas-cxx edje-cxx` table_cxx_example_01.cc -o table_cxx_example_01
2 17
3#include <Evas.hh> 18#include <Evas.hh>
diff --git a/src/examples/elementary/toolbar_cxx_example_01.cc b/src/examples/elementary/toolbar_cxx_example_01.cc
index 19a9931..d6ecc44 100644
--- a/src/examples/elementary/toolbar_cxx_example_01.cc
+++ b/src/examples/elementary/toolbar_cxx_example_01.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1#define ELM_WIDGET_PROTECTED 16#define ELM_WIDGET_PROTECTED
2#define ELM_WIDGET_CLASS_PROTECTED 17#define ELM_WIDGET_CLASS_PROTECTED
3 18
diff --git a/src/examples/elementary/twitter_example_01.js b/src/examples/elementary/twitter_example_01.js
index 04edbdd..46237aa 100644
--- a/src/examples/elementary/twitter_example_01.js
+++ b/src/examples/elementary/twitter_example_01.js
@@ -10,7 +10,7 @@ fs = require('fs');
10request = require('request'); 10request = require('request');
11Twitter = require('twitter'); 11Twitter = require('twitter');
12 12
13user_acount = 'EnlightenmentKo' 13user_acount = 'EnlightenmentKo';
14 14
15var twit = new Twitter({ 15var twit = new Twitter({
16 consumer_key: '', // replace with consumer_key 16 consumer_key: '', // replace with consumer_key
@@ -43,7 +43,7 @@ twit.get('statuses/user_timeline', {screen_name: user_acount, count:10}, functio
43 if (error) 43 if (error)
44 return; 44 return;
45 45
46 for(i=0; i < tweets.length; i++){ 46 for(var i=0; i < tweets.length; i++){
47 var user_name = tweets[i].user.name; 47 var user_name = tweets[i].user.name;
48 var screen_name = tweets[i].user.screen_name; 48 var screen_name = tweets[i].user.screen_name;
49 var text = tweets[i].text; 49 var text = tweets[i].text;
@@ -52,13 +52,13 @@ twit.get('statuses/user_timeline', {screen_name: user_acount, count:10}, functio
52 var filename = path.join(__dirname, 'twitter_example_01.edj'); 52 var filename = path.join(__dirname, 'twitter_example_01.edj');
53 layout.setFile(filename, "tweet"); 53 layout.setFile(filename, "tweet");
54 54
55 layout.setPartText("user_name", screen_name); 55 layout.setPartText("user_name", user_name);
56 layout.setPartText("screen_name", " - @"+screen_name); 56 layout.setPartText("screen_name", " - @"+screen_name);
57 57
58 var entry = new efl.Elm.Entry(win); 58 var entry = new efl.Elm.Entry(win);
59 entry.setPartText("elm.text", text); 59 entry.setPartText("elm.text", text);
60 entry.setEditable(false); 60 entry.setEditable(false);
61 part = layout.part("tweet_text").cast("Efl.Content"); 61 var part = layout.part("tweet_text").cast("Efl.Content");
62 part.setContent(entry); 62 part.setContent(entry);
63 63
64 layout.setHintMin(127, 96); 64 layout.setHintMin(127, 96);
@@ -68,7 +68,7 @@ twit.get('statuses/user_timeline', {screen_name: user_acount, count:10}, functio
68 var icon = new efl.Efl.Ui.Image(win); 68 var icon = new efl.Efl.Ui.Image(win);
69 icon.fillInside = true; 69 icon.fillInside = true;
70 icon_array.push(icon); 70 icon_array.push(icon);
71 user_icon = layout.part("user_icon").cast("Efl.Content"); 71 var user_icon = layout.part("user_icon").cast("Efl.Content");
72 user_icon.setContent(icon); 72 user_icon.setContent(icon);
73 item = tweet_box.packEnd(layout); 73 item = tweet_box.packEnd(layout);
74 layout.setVisible(true); 74 layout.setVisible(true);
@@ -78,7 +78,7 @@ twit.get('statuses/user_timeline', {screen_name: user_acount, count:10}, functio
78 var file = fs.createWriteStream(icon_filename); 78 var file = fs.createWriteStream(icon_filename);
79 file.on('finish', function() { 79 file.on('finish', function() {
80 console.log("finished loading the icon file."); 80 console.log("finished loading the icon file.");
81 for (i=0; i < icon_array.length; i++) { 81 for (var i=0; i < icon_array.length; i++) {
82 icon_array[i].setFile(icon_filename, null); 82 icon_array[i].setFile(icon_filename, null);
83 } 83 }
84 }); 84 });