summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorLuciana Magno de Almeida <luciana@expertisesolutions.com.br>2016-05-26 18:46:29 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-06-15 15:50:04 -0300
commit5af3757ad3cce0d5959f9059b03288a1081afe39 (patch)
treebe26ca4de0fc72d03a58aab363336fbb13ee939c /src/examples
parent8071109a7016b454e4976740262df91f004b0973 (diff)
elementary-cxx: Fix compilation of some C++ examples
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/elementary/Makefile.am229
-rw-r--r--src/examples/elementary/bg_cxx_example_01.cc3
-rw-r--r--src/examples/elementary/bg_cxx_example_02.cc27
-rw-r--r--src/examples/elementary/box_cxx_example_02.cc24
-rw-r--r--src/examples/elementary/bubble_cxx_example_01.cc46
-rw-r--r--src/examples/elementary/button_cxx_example_00.cc24
-rw-r--r--src/examples/elementary/calendar_cxx_example_01.cc18
-rw-r--r--src/examples/elementary/calendar_cxx_example_02.cc19
-rw-r--r--src/examples/elementary/calendar_cxx_example_03.cc17
-rw-r--r--src/examples/elementary/calendar_cxx_example_04.cc39
-rw-r--r--src/examples/elementary/calendar_cxx_example_05.cc59
-rw-r--r--src/examples/elementary/clock_cxx_example.cc27
-rw-r--r--src/examples/elementary/datetime_cxx_example.cc51
-rw-r--r--src/examples/elementary/hoversel_cxx_example_01.cc8
-rw-r--r--src/examples/elementary/icon_cxx_example_01.cc36
-rw-r--r--src/examples/elementary/radio_cxx_example_01.cc2
-rw-r--r--src/examples/elementary/separator_cxx_example_01.cc45
-rw-r--r--src/examples/elementary/table_cxx_example_01.cc1
-rw-r--r--src/examples/elementary/thumb_cxx_example_01.cc23
19 files changed, 406 insertions, 292 deletions
diff --git a/src/examples/elementary/Makefile.am b/src/examples/elementary/Makefile.am
index 2cdb390..08f5e13 100644
--- a/src/examples/elementary/Makefile.am
+++ b/src/examples/elementary/Makefile.am
@@ -18,14 +18,14 @@ AM_CPPFLAGS = \
18-I$(top_builddir)/src/lib/efl/interfaces \ 18-I$(top_builddir)/src/lib/efl/interfaces \
19-I$(top_srcdir)/src/lib/eina \ 19-I$(top_srcdir)/src/lib/eina \
20-I$(top_builddir)/src/lib/eina \ 20-I$(top_builddir)/src/lib/eina \
21-I$(top_srcdir)/src/bindings/eina_cxx \ 21-I$(top_srcdir)/src/bindings/cxx/eina_cxx \
22-I$(top_builddir)/src/bindings/eina_cxx \ 22-I$(top_builddir)/src/bindings/cxx/eina_cxx \
23-I$(top_srcdir)/src/lib/eo \ 23-I$(top_srcdir)/src/lib/eo \
24-I$(top_builddir)/src/lib/eo \ 24-I$(top_builddir)/src/lib/eo \
25-I$(top_srcdir)/src/bindings/eo_cxx \ 25-I$(top_srcdir)/src/bindings/cxx/eo_cxx \
26-I$(top_builddir)/src/bindings/eo_cxx \ 26-I$(top_builddir)/src/bindings/cxx/eo_cxx \
27-I$(top_srcdir)/src/bindings/eldbus_cxx \ 27-I$(top_srcdir)/src/bindings/cxx/eldbus_cxx \
28-I$(top_builddir)/src/bindings/eldbus_cxx \ 28-I$(top_builddir)/src/bindings/cxx/eldbus_cxx \
29-I$(top_srcdir)/src/lib/ector \ 29-I$(top_srcdir)/src/lib/ector \
30-I$(top_builddir)/src/lib/ector \ 30-I$(top_builddir)/src/lib/ector \
31-I$(top_srcdir)/src/lib/evas \ 31-I$(top_srcdir)/src/lib/evas \
@@ -87,16 +87,6 @@ datetime_example.c \
87dayselector_example.c \ 87dayselector_example.c \
88diskselector_example_01.c \ 88diskselector_example_01.c \
89diskselector_example_02.c \ 89diskselector_example_02.c \
90efl_thread_1.c \
91efl_thread_2.c \
92efl_thread_3.c \
93efl_thread_4.c \
94efl_thread_5.c \
95efl_thread_6.c \
96efl_thread_win32_1.c \
97efl_thread_win32_2.c \
98efl_thread_win32_3.c \
99efl_thread_win32_4.c \
100entry_example.c \ 90entry_example.c \
101fileselector_button_example.c \ 91fileselector_button_example.c \
102fileselector_entry_example.c \ 92fileselector_entry_example.c \
@@ -171,42 +161,59 @@ transit_example_04.c \
171web_example_01.c \ 161web_example_01.c \
172web_example_02.c \ 162web_example_02.c \
173win_example.c \ 163win_example.c \
174evas3d_scene_on_button_example.c \ 164track_example_01.c \
165twitter_example_01.edc
166# evas3d_scene_on_button_example.c \
175evas3d_object_on_button_example.c \ 167evas3d_object_on_button_example.c \
176evas3d_map_example.edc \ 168evas3d_map_example.edc \
177evas3d_map_example.c \ 169evas3d_map_example.c \
178track_example_01.c \ 170efl_thread_1.c \
179twitter_example_01.edc 171efl_thread_2.c \
180 172efl_thread_3.c \
181# if HAVE_CXX11 173efl_thread_4.c \
182# SRCS += \ 174efl_thread_5.c \
183# thumb_cxx_example_01.cc \ 175efl_thread_6.c \
184# table_cxx_example_02.cc \ 176efl_thread_win32_1.c \
185# table_cxx_example_01.cc \ 177efl_thread_win32_2.c \
186# spinner_cxx_example.cc \ 178efl_thread_win32_3.c \
187# slider_cxx_example.cc \ 179efl_thread_win32_4.c
188# separator_cxx_example_01.cc \ 180
189# radio_cxx_example_01.cc \ 181if HAVE_CXX11
190# popup_cxx_example_01.cc \ 182SRCS += \
191# menu_cxx_example_01.cc \ 183bg_cxx_example_01.cc \
192# location_cxx_example_01.cc \ 184bg_cxx_example_02.cc \
193# icon_cxx_example_01.cc \ 185calendar_cxx_example_01.cc \
194# hoversel_cxx_example_01.cc \ 186calendar_cxx_example_02.cc \
195# glview_cxx_example_01.cc \ 187calendar_cxx_example_03.cc \
196# datetime_cxx_example.cc \ 188calendar_cxx_example_04.cc \
197# clock_cxx_example.cc \ 189calendar_cxx_example_05.cc \
198# calendar_cxx_example_05.cc \ 190clock_cxx_example.cc \
199# calendar_cxx_example_04.cc \ 191datetime_cxx_example.cc \
200# calendar_cxx_example_03.cc \ 192icon_cxx_example_01.cc \
201# calendar_cxx_example_02.cc \ 193separator_cxx_example_01.cc \
202# calendar_cxx_example_01.cc \ 194thumb_cxx_example_01.cc \
203# button_cxx_example_01.cc \ 195bubble_cxx_example_01.cc \
204# button_cxx_example_00.cc \ 196button_cxx_example_00.cc
205# bubble_cxx_example_01.cc \ 197endif
206# box_cxx_example_02.cc \ 198#table_cxx_example_02.cc \
207# bg_cxx_example_02.cc \ 199table_cxx_example_01.cc \
208# bg_cxx_example_01.cc 200spinner_cxx_example.cc \
209# endif 201slider_cxx_example.cc \
202radio_cxx_example_01.cc \
203popup_cxx_example_01.cc \
204menu_cxx_example_01.cc \
205location_cxx_example_01.cc \
206hoversel_cxx_example_01.cc \
207glview_cxx_example_01.cc \
208calendar_cxx_example_05.cc \
209calendar_cxx_example_04.cc \
210calendar_cxx_example_03.cc \
211calendar_cxx_example_02.cc \
212calendar_cxx_example_01.cc \
213button_cxx_example_01.cc \
214box_cxx_example_02.cc \
215bg_cxx_example_02.cc \
216bg_cxx_example_01.cc
210 217
211.edc.edj: 218.edc.edj:
212 $(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) $< $@ 219 $(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) $< $@
@@ -278,12 +285,6 @@ datetime_example \
278dayselector_example \ 285dayselector_example \
279diskselector_example_01 \ 286diskselector_example_01 \
280diskselector_example_02 \ 287diskselector_example_02 \
281efl_thread_1 \
282efl_thread_2 \
283efl_thread_3 \
284efl_thread_4 \
285efl_thread_5 \
286efl_thread_6 \
287entry_example \ 288entry_example \
288fileselector_button_example \ 289fileselector_button_example \
289fileselector_entry_example \ 290fileselector_entry_example \
@@ -356,14 +357,20 @@ transit_example_04 \
356web_example_01 \ 357web_example_01 \
357web_example_02 \ 358web_example_02 \
358win_example \ 359win_example \
360track_example_01
361#benchmark3d \
362sphere-hunter \
359evas3d_scene_on_button_example \ 363evas3d_scene_on_button_example \
360evas3d_object_on_button_example \ 364evas3d_object_on_button_example \
361evas3d_map_example \ 365evas3d_map_example \
362track_example_01 \ 366efl_thread_1 \
363benchmark3d \ 367efl_thread_2 \
364sphere-hunter 368efl_thread_3 \
369efl_thread_4 \
370efl_thread_5 \
371efl_thread_6
365 372
366benchmark3d_SOURCES = \ 373# benchmark3d_SOURCES = \
367 performance/performance.c \ 374 performance/performance.c \
368 performance/camera_light.c \ 375 performance/camera_light.c \
369 performance/tools_private.h \ 376 performance/tools_private.h \
@@ -371,22 +378,37 @@ benchmark3d_SOURCES = \
371 performance/Tools.h \ 378 performance/Tools.h \
372 performance/graphical.c 379 performance/graphical.c
373 380
374sphere_hunter_SOURCES = \ 381# sphere_hunter_SOURCES = \
375 sphere_hunter/evas_3d_sphere_hunter.c 382 sphere_hunter/evas_3d_sphere_hunter.c
376 383
377files_DATA += performance/layout.edj sphere_hunter/sphere_hunter.edj 384# files_DATA += performance/layout.edj sphere_hunter/sphere_hunter.edj
378 385
379performance/layout.edj: performance/layout.edc 386# performance/layout.edj: performance/layout.edc
380 $(AM_V_EDJ) \ 387# $(AM_V_EDJ) \
381 $(MKDIR_P) performance/; \ 388 $(MKDIR_P) performance/; \
382 $(EDJE_CC) $(EDJE_CC_FLAGS) -id performance/ $< $@ 389 $(EDJE_CC) $(EDJE_CC_FLAGS) -id performance/ $< $@
383 390
384sphere_hunter/sphere_hunter.edj: sphere_hunter/sphere_hunter.edc 391# sphere_hunter/sphere_hunter.edj: sphere_hunter/sphere_hunter.edc
385 $(AM_V_EDJ) \ 392# $(AM_V_EDJ) \
386 $(MKDIR_P) sphere_hunter/; \ 393 $(MKDIR_P) sphere_hunter/; \
387 $(EDJE_CC) $(EDJE_CC_FLAGS) -id sphere_hunter/ -id $(top_srcdir)/data/elementary/themes $< $@ 394 $(EDJE_CC) $(EDJE_CC_FLAGS) -id sphere_hunter/ -id $(top_srcdir)/data/elementary/themes $< $@
388 395
389# if HAVE_CXX11 396if HAVE_CXX11
397examples_PROGRAMS += \
398bg_cxx_example_01 \
399bg_cxx_example_02 \
400calendar_cxx_example_01 \
401calendar_cxx_example_02 \
402calendar_cxx_example_03 \
403calendar_cxx_example_04 \
404calendar_cxx_example_05 \
405clock_cxx_example \
406datetime_cxx_example \
407icon_cxx_example_01 \
408thumb_cxx_example_01 \
409separator_cxx_example_01 \
410bubble_cxx_example_01 \
411button_cxx_example_00
390# examples_PROGRAMS += \ 412# examples_PROGRAMS += \
391# thumb_cxx_example_01 \ 413# thumb_cxx_example_01 \
392# table_cxx_example_02 \ 414# table_cxx_example_02 \
@@ -414,7 +436,7 @@ sphere_hunter/sphere_hunter.edj: sphere_hunter/sphere_hunter.edc
414# box_cxx_example_02 \ 436# box_cxx_example_02 \
415# bg_cxx_example_02 \ 437# bg_cxx_example_02 \
416# bg_cxx_example_01 438# bg_cxx_example_01
417# endif 439endif
418 440
419if HAVE_WINDOWS 441if HAVE_WINDOWS
420efl_thread_1_SOURCES = efl_thread_win32_1.c 442efl_thread_1_SOURCES = efl_thread_win32_1.c
@@ -428,8 +450,21 @@ efl_thread_3_SOURCES = efl_thread_3.c
428efl_thread_4_SOURCES = efl_thread_4.c 450efl_thread_4_SOURCES = efl_thread_4.c
429endif 451endif
430 452
431# if HAVE_CXX11 453if HAVE_CXX11
432# thumb_cxx_example_01_SOURCES = thumb_cxx_example_01.cc 454icon_cxx_example_01_SOURCES = icon_cxx_example_01.cc
455datetime_cxx_example_SOURCES = datetime_cxx_example.cc
456clock_cxx_example_SOURCES = clock_cxx_example.cc
457calendar_cxx_example_05_SOURCES = calendar_cxx_example_05.cc
458calendar_cxx_example_04_SOURCES = calendar_cxx_example_04.cc
459calendar_cxx_example_03_SOURCES = calendar_cxx_example_03.cc
460calendar_cxx_example_02_SOURCES = calendar_cxx_example_02.cc
461calendar_cxx_example_01_SOURCES = calendar_cxx_example_01.cc
462bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc
463bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
464thumb_cxx_example_01_SOURCES = thumb_cxx_example_01.cc
465separator_cxx_example_01_SOURCES = separator_cxx_example_01.cc
466bubble_cxx_example_01_SOURCES = bubble_cxx_example_01.cc
467button_cxx_example_00_SOURCES = button_cxx_example_00.cc
433# table_cxx_example_02_SOURCES = table_cxx_example_02.cc 468# table_cxx_example_02_SOURCES = table_cxx_example_02.cc
434# table_cxx_example_01_SOURCES = table_cxx_example_01.cc 469# table_cxx_example_01_SOURCES = table_cxx_example_01.cc
435# spinner_cxx_example_SOURCES = spinner_cxx_example.cc 470# spinner_cxx_example_SOURCES = spinner_cxx_example.cc
@@ -455,7 +490,7 @@ endif
455# box_cxx_example_02_SOURCES = box_cxx_example_02.cc 490# box_cxx_example_02_SOURCES = box_cxx_example_02.cc
456# bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc 491# bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc
457# bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc 492# bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
458# endif 493endif
459 494
460# This variable will hold the list of screenshots that will be made 495# This variable will hold the list of screenshots that will be made
461# by "make screenshots". Each item in the list is of the form: 496# by "make screenshots". Each item in the list is of the form:
@@ -543,33 +578,33 @@ table_example_01:table_example_01.png:0.0 \
543table_example_02:table_example_02.png:0.0 \ 578table_example_02:table_example_02.png:0.0 \
544menu_example_01:menu_example_01.png:0.5 579menu_example_01:menu_example_01.png:0.5
545 580
546# if HAVE_CXX11 581if HAVE_CXX11
547# SCREENSHOTS += \ 582SCREENSHOTS += \
548# bg_cxx_example_02:bg_cxx_example_02.png:0.0 \ 583 bg_cxx_example_02:bg_cxx_example_02.png:0.0 \
549# box_cxx_example_02:box_cxx_example_02.png:1.3 \ 584 box_cxx_example_02:box_cxx_example_02.png:1.3 \
550# bubble_cxx_example_01:bubble_cxx_example_01.png:0.0 \ 585 bubble_cxx_example_01:bubble_cxx_example_01.png:0.0 \
551# button_cxx_example_00:button_cxx_example_00.png:0.0 \ 586 button_cxx_example_00:button_cxx_example_00.png:0.0 \
552# button_cxx_example_01:button_cxx_example_01.png:0.0 \ 587 button_cxx_example_01:button_cxx_example_01.png:0.0 \
553# calendar_cxx_example_01:calendar_cxx_example_01.png:0.0 \ 588 calendar_cxx_example_01:calendar_cxx_example_01.png:0.0 \
554# calendar_cxx_example_02:calendar_cxx_example_02.png:0.0 \ 589 calendar_cxx_example_02:calendar_cxx_example_02.png:0.0 \
555# calendar_cxx_example_03:calendar_cxx_example_03.png:0.0 \ 590 calendar_cxx_example_03:calendar_cxx_example_03.png:0.0 \
556# calendar_cxx_example_04:calendar_cxx_example_04.png:0.0 \ 591 calendar_cxx_example_04:calendar_cxx_example_04.png:0.0 \
557# calendar_cxx_example_05:calendar_cxx_example_05.png:0.0 \ 592 calendar_cxx_example_05:calendar_cxx_example_05.png:0.0 \
558# clock_cxx_example:clock_cxx_example.png:0.5 \ 593 clock_cxx_example:clock_cxx_example.png:0.5 \
559# datetime_cxx_example:datetime_cxx_example.png:0.0 \ 594 datetime_cxx_example:datetime_cxx_example.png:0.0 \
560# hoversel_cxx_example_01:hoversel_cxx_example_01.png:0.0 \ 595 hoversel_cxx_example_01:hoversel_cxx_example_01.png:0.0 \
561# icon_cxx_example_01:icon_cxx_example_01.png:0.0 \ 596 icon_cxx_example_01:icon_cxx_example_01.png:0.0 \
562# menu_cxx_example_01:menu_cxx_example_01.png:0.5 \ 597 menu_cxx_example_01:menu_cxx_example_01.png:0.5 \
563# popup_cxx_example_01:popup_cxx_example_01.png:1.0 \ 598 popup_cxx_example_01:popup_cxx_example_01.png:1.0 \
564# popup_cxx_example_01:popup_cxx_example_01_a.png:6.0 \ 599 popup_cxx_example_01:popup_cxx_example_01_a.png:6.0 \
565# radio_cxx_example_01:radio_cxx_example_01.png:0.0 \ 600 radio_cxx_example_01:radio_cxx_example_01.png:0.0 \
566# separator_cxx_example_01:separator_cxx_example_01.png:0.0 \ 601 separator_cxx_example_01:separator_cxx_example_01.png:0.0 \
567# slider_cxx_example:slider_cxx_example.png:0.0 \ 602 slider_cxx_example:slider_cxx_example.png:0.0 \
568# spinner_cxx_example:spinner_cxx_example.png:0.0 \ 603 spinner_cxx_example:spinner_cxx_example.png:0.0 \
569# table_cxx_example_01:table_cxx_example_01.png:0.0 \ 604 table_cxx_example_01:table_cxx_example_01.png:0.0 \
570# table_cxx_example_02:table_cxx_example_02.png:0.0 \ 605 table_cxx_example_02:table_cxx_example_02.png:0.0 \
571# thumb_cxx_example_01:thumb_cxx_example_01.png:0.5 606 thumb_cxx_example_01:thumb_cxx_example_01.png:0.5
572# endif 607endif
573 608
574HTML_SS_DIR=$(top_builddir)/doc/html/screenshots 609HTML_SS_DIR=$(top_builddir)/doc/html/screenshots
575LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots 610LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots
diff --git a/src/examples/elementary/bg_cxx_example_01.cc b/src/examples/elementary/bg_cxx_example_01.cc
index a1db40a..f1c35fe 100644
--- a/src/examples/elementary/bg_cxx_example_01.cc
+++ b/src/examples/elementary/bg_cxx_example_01.cc
@@ -7,11 +7,12 @@ elm_main (int argc, char *argv[])
7{ 7{
8 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 8 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
9 9
10 ::elm::win::Standard win; 10 ::efl::ui::win::Standard win;
11 // win.title_set("Bg Plain"); 11 // win.title_set("Bg Plain");
12 win.autohide_set(true); 12 win.autohide_set(true);
13 13
14 win.eo_cxx::efl::Gfx::size_set(320,320); 14 win.eo_cxx::efl::Gfx::size_set(320,320);
15 //win.size_set(320,320);
15 win.visible_set(true); 16 win.visible_set(true);
16 17
17 elm_run(); 18 elm_run();
diff --git a/src/examples/elementary/bg_cxx_example_02.cc b/src/examples/elementary/bg_cxx_example_02.cc
index 56fc748..0662023 100644
--- a/src/examples/elementary/bg_cxx_example_02.cc
+++ b/src/examples/elementary/bg_cxx_example_02.cc
@@ -7,24 +7,25 @@ elm_main (int argc, char *argv[])
7{ 7{
8 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 8 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
9 9
10 ::elm::win_standard win; 10 efl::ui::Win win;
11 win.title_set("Bg Image"); 11 //win.title_set("Bg Image");
12 win.autohide_set(true); 12 win.autohide_set(true);
13 13
14 elm_app_compile_data_dir_set("/usr/share/elementary"); 14 //elm_app_compile_data_dir_set("/usr/share/elementary");
15 elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg"); 15 //elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg");
16 16
17 ::elm::bg bg(efl::eo::parent = win); 17 elm::Bg bg(win);
18 bg.load_size_set(20,20); 18 //bg.load_size_set(320,320);
19 bg.option_set(ELM_BG_OPTION_CENTER); 19 //bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
20 std::stringstream ss; 20 bg.option_set(ELM_BG_OPTION_SCALE);
21 ss << elm_app_data_dir_get() << "/images/plant_01.jpg"; 21 //std::stringstream ss;
22 bg.file_set(ss.str(), nullptr); 22 //ss << elm_app_data_dir_get() << "/images/plant_01.jpg";
23 bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 23 bg.file_set("/home/luciana/Pictures/surprised_cat.jpeg", nullptr);
24 win.resize_object_add(bg); 24 //win.resize_object_add(bg);
25 bg.eo_cxx::efl::Gfx::size_set(640,400);
25 bg.visible_set(true); 26 bg.visible_set(true);
26 27
27 win.size_set(320, 320); 28 win.eo_cxx::efl::Gfx::size_set(640, 400);
28 win.visible_set(true); 29 win.visible_set(true);
29 30
30 elm_run(); 31 elm_run();
diff --git a/src/examples/elementary/box_cxx_example_02.cc b/src/examples/elementary/box_cxx_example_02.cc
index f61990d..bc81fcf 100644
--- a/src/examples/elementary/box_cxx_example_02.cc
+++ b/src/examples/elementary/box_cxx_example_02.cc
@@ -46,21 +46,21 @@ elm_main(int argc, char *argv[])
46 46
47 Transitions_Data tdata; 47 Transitions_Data tdata;
48 48
49 ::elm::win_standard win; 49 ::elm::win::Standard win;
50 win.title_set("Box Transition"); 50 win.title_set("Box Transition");
51 win.autohide_set(true); 51 win.autohide_set(true);
52 52
53 elm::box bigbox ( efl::eo::parent = win ); 53 elm::Ui::Box bigbox ( efl::eo::parent = win );
54 bigbox.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 54 bigbox.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
55 win.resize_object_add(bigbox); 55 //win.resize_object_add(bigbox);
56 bigbox.visible_set(true); 56 bigbox.visible_set(true);
57 57
58 elm::box buttons ( efl::eo::parent = win ); 58 elm::ui::Box buttons ( efl::eo::parent = win );
59 buttons.horizontal_set(EINA_TRUE); 59 //buttons.horizontal_set(true);
60 bigbox.pack_end(buttons); 60 bigbox.pack_end(buttons);
61 buttons.visible_set(true); 61 buttons.visible_set(true);
62 62
63 elm::button add ( efl::eo::parent = win ); 63 elm::Button add ( efl::eo::parent = win );
64 add.text_set("elm.text", "Add"); 64 add.text_set("elm.text", "Add");
65 buttons.pack_end(add); 65 buttons.pack_end(add);
66 add.visible_set(true); 66 add.visible_set(true);
@@ -76,13 +76,13 @@ elm_main(int argc, char *argv[])
76 } 76 }
77 })); 77 }));
78 78
79 elm::button clear ( efl::eo::parent = win ); 79 elm::Button clear ( efl::eo::parent = win );
80 clear.text_set("elm.text", "Clear"); 80 clear.text_set("elm.text", "Clear");
81 buttons.pack_end(clear); 81 buttons.pack_end(clear);
82 clear.visible_set(true); 82 clear.visible_set(true);
83 clear.callback_clicked_add(std::bind([&tdata] { tdata.box.lock()->clear(); })); 83 clear.callback_clicked_add(std::bind([&tdata] { tdata.box.lock()->clear(); }));
84 84
85 elm::box dynamic ( efl::eo::parent = win ); 85 elm::Box dynamic ( efl::eo::parent = win );
86 dynamic.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 86 dynamic.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
87 dynamic.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL); 87 dynamic.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
88 bigbox.pack_end(dynamic); 88 bigbox.pack_end(dynamic);
@@ -90,14 +90,14 @@ elm_main(int argc, char *argv[])
90 90
91 auto unpack = std::bind([&tdata] (evas::clickable_interface obj) 91 auto unpack = std::bind([&tdata] (evas::clickable_interface obj)
92 { 92 {
93 elm::button btn = efl::eo::downcast<elm::button>(obj); 93 elm::Button btn = efl::eo::downcast<elm::button>(obj);
94 tdata.box.lock()->unpack(btn); 94 tdata.box.lock()->unpack(btn);
95 btn.position_set(0, 50); 95 btn.position_set(0, 50);
96 btn.object_smart::color_set(128, 64, 0, 128); 96 btn.object_smart::color_set(128, 64, 0, 128);
97 }, std::placeholders::_1) 97 }, std::placeholders::_1)
98 ; 98 ;
99 99
100 elm::button bt1 ( efl::eo::parent = win ); 100 elm::Button bt1 ( efl::eo::parent = win );
101 bt1.text_set("elm.text", "Button 1"); 101 bt1.text_set("elm.text", "Button 1");
102 bt1.callback_clicked_add(unpack); 102 bt1.callback_clicked_add(unpack);
103 bt1.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 103 bt1.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -105,7 +105,7 @@ elm_main(int argc, char *argv[])
105 dynamic.pack_end(bt1); 105 dynamic.pack_end(bt1);
106 bt1.visible_set(true); 106 bt1.visible_set(true);
107 107
108 elm::button bt2 ( efl::eo::parent = win ); 108 elm::Button bt2 ( efl::eo::parent = win );
109 bt2.text_set("elm.text", "Button 2"); 109 bt2.text_set("elm.text", "Button 2");
110 bt2.size_hint_weight_set(EVAS_HINT_EXPAND, 0.0); 110 bt2.size_hint_weight_set(EVAS_HINT_EXPAND, 0.0);
111 bt2.size_hint_align_set(1.0, 0.5); 111 bt2.size_hint_align_set(1.0, 0.5);
@@ -113,7 +113,7 @@ elm_main(int argc, char *argv[])
113 dynamic.pack_end(bt2); 113 dynamic.pack_end(bt2);
114 bt2.visible_set(true); 114 bt2.visible_set(true);
115 115
116 elm::button bt3 ( efl::eo::parent = win ); 116 elm::Button bt3 ( efl::eo::parent = win );
117 bt3.text_set("elm.text", "Button 3"); 117 bt3.text_set("elm.text", "Button 3");
118 bt3.callback_clicked_add(unpack); 118 bt3.callback_clicked_add(unpack);
119 dynamic.pack_end(bt3); 119 dynamic.pack_end(bt3);
diff --git a/src/examples/elementary/bubble_cxx_example_01.cc b/src/examples/elementary/bubble_cxx_example_01.cc
index dd2284a..e6e0931 100644
--- a/src/examples/elementary/bubble_cxx_example_01.cc
+++ b/src/examples/elementary/bubble_cxx_example_01.cc
@@ -1,3 +1,8 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2#include <Evas.hh> 7#include <Evas.hh>
3 8
@@ -6,29 +11,28 @@ elm_main (int argc, char *argv[])
6{ 11{
7 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 12 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
8 13
9 ::elm::win_standard win; 14 efl::ui::win::Standard win;
10 win.title_set("Bg Plain"); 15 // win.title_set("Bubble");
11 win.autohide_set(true); 16 win.autohide_set(true);
12 17
13 ::elm::bg bg(efl::eo::parent = win); 18 ::elm::Label label1(win);
14 bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
15 win.resize_object_add(bg);
16 bg.visible_set(true);
17
18 ::elm::label label1(efl::eo::parent = win);
19 label1.text_set(nullptr, "Bubble with no icon, info or label"); 19 label1.text_set(nullptr, "Bubble with no icon, info or label");
20 label1.visible_set(true); 20 label1.visible_set(true);
21 21
22 evas::rectangle icon(efl::eo::parent = win); 22 //::evas::Rectangle icon(efl::eo::parent = win);
23 icon.color_set( 0, 0, 255, 255); 23 elm::Icon icon(win);
24 icon.eo_cxx::efl::Gfx::color_set( 0, 0, 255, 255);
24 icon.visible_set(true); 25 icon.visible_set(true);
25 26
26 ::elm::bubble bubble1(efl::eo::parent = win); 27 ::elm::Bubble bubble1(win);
27 bubble1.content_set("icon", icon); 28 efl::Container xxx = efl::eo::downcast<efl::Container>
29 (bubble1.part("icon"));
30 xxx.content_set(icon);
31 // bubble1.part_content_set("icon", icon);
28 bubble1.text_set("info", "INFO"); 32 bubble1.text_set("info", "INFO");
29 bubble1.text_set(nullptr, "LABEL"); 33 bubble1.text_set(nullptr, "LABEL");
30 bubble1.content_set(nullptr, label1); 34 bubble1.content_set(label1);
31 bubble1.size_set(300, 100); 35 bubble1.eo_cxx::efl::Gfx::size_set(300, 100);
32 bubble1.visible_set(true); 36 bubble1.visible_set(true);
33 37
34 auto on_click = std::bind([&] () 38 auto on_click = std::bind([&] ()
@@ -41,19 +45,19 @@ elm_main (int argc, char *argv[])
41 bubble1.pos_set(static_cast<Elm_Bubble_Pos>(corner)); 45 bubble1.pos_set(static_cast<Elm_Bubble_Pos>(corner));
42 }); 46 });
43 47
44 bubble1.callback_clicked_add(on_click); 48 efl::eolian::event_add(/*bubble1.clicked_event*/efl::ui::Clickable::clicked_event, bubble1, on_click);
45 49
46 ::elm::label label2(efl::eo::parent = win); 50 ::elm::Label label2(win);
47 label2.text_set(nullptr, "Bubble with no icon, info or label"); 51 label2.text_set(nullptr, "Bubble with no icon, info or label");
48 label2.visible_set(true); 52 label2.visible_set(true);
49 53
50 ::elm::bubble bubble2(efl::eo::parent = win); 54 ::elm::Bubble bubble2(win);
51 bubble2.content_set(nullptr, label2); 55 bubble2.content_set(label2);
52 bubble2.size_set(200, 50); 56 bubble2.eo_cxx::efl::Gfx::size_set(200, 50);
53 bubble2.position_set(0, 110); 57 bubble2.eo_cxx::efl::Gfx::position_set(0, 110);
54 bubble2.visible_set(true); 58 bubble2.visible_set(true);
55 59
56 win.size_set(300, 200); 60 win.eo_cxx::efl::Gfx::size_set(300, 200);
57 win.visible_set(true); 61 win.visible_set(true);
58 62
59 elm_run(); 63 elm_run();
diff --git a/src/examples/elementary/button_cxx_example_00.cc b/src/examples/elementary/button_cxx_example_00.cc
index c12f504..c441dae 100644
--- a/src/examples/elementary/button_cxx_example_00.cc
+++ b/src/examples/elementary/button_cxx_example_00.cc
@@ -1,4 +1,7 @@
1#define EFL_EO_API_SUPPORT 1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
2 5
3#include <Elementary.hh> 6#include <Elementary.hh>
4 7
@@ -7,21 +10,28 @@ elm_main (int argc, char *argv[])
7{ 10{
8 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
9 12
10 ::elm::win::Standard win; 13 efl::ui::win::Standard win;
11 //win.title_set("Hello, World!"); 14// //win.title_set("Hello, World!");
15// win.autohide_set(true);
16
17// ::elm::Button btn(win);
18// btn.text_set("elm.text","Good-Bye, World!");
19// btn.eo_cxx::efl::Gfx::size_set(120, 30);
20// btn.eo_cxx::efl::Gfx::position_set(60, 15);
21// // btn.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
22// // btn.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
23 // win.title_set("Hello, World!");
12 win.autohide_set(true); 24 win.autohide_set(true);
13 25
14 ::elm::Button btn(win); 26 ::elm::Button btn(win);
15 btn.text_set("elm.text","Good-Bye, World!"); 27 btn.text_set(nullptr,"Good-Bye, World!");
16 btn.eo_cxx::efl::Gfx::size_set(120, 30); 28 btn.eo_cxx::efl::Gfx::size_set(120, 30);
17 btn.eo_cxx::efl::Gfx::position_set(60, 15); 29 btn.eo_cxx::efl::Gfx::position_set(60, 15);
18 // btn.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
19 // btn.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
20 btn.visible_set(true); 30 btn.visible_set(true);
21 31
22 auto on_click = std::bind([] () { elm_exit(); }); 32 auto on_click = std::bind([] () { elm_exit(); });
23 33
24 efl::eolian::event_add(evas::Clickable_Interface::clicked_event, btn, on_click); 34 efl::eolian::event_add(efl::ui::Clickable::clicked_event, btn, on_click);
25 35
26 win.eo_cxx::efl::Gfx::size_set(240, 60); 36 win.eo_cxx::efl::Gfx::size_set(240, 60);
27 win.visible_set(true); 37 win.visible_set(true);
diff --git a/src/examples/elementary/calendar_cxx_example_01.cc b/src/examples/elementary/calendar_cxx_example_01.cc
index 9014b5c..b094fc5 100644
--- a/src/examples/elementary/calendar_cxx_example_01.cc
+++ b/src/examples/elementary/calendar_cxx_example_01.cc
@@ -1,18 +1,26 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2 7
3EAPI_MAIN int 8EAPI_MAIN int
4elm_main (int argc, char *argv[]) 9elm_main (int argc, char *argv[])
5{ 10{
6 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
7 ::elm::win_standard win; 12
8 win.title_set("Calendar Creation Example"); 13 efl::ui::win::Standard win;
14 //win.title_set("Calendar Creation Example");
9 win.autohide_set(true); 15 win.autohide_set(true);
10 16
11 ::elm::calendar cal(efl::eo::parent = win); 17 ::elm::Calendar cal(win);
12 cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 18 //cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
13 win.resize_object_add(cal); 19 cal.eo_cxx::efl::Gfx::size_set(134,134);
20 //win.resize_object_add(cal);
14 cal.visible_set(true); 21 cal.visible_set(true);
15 22
23 win.eo_cxx::efl::Gfx::size_set(134,134);
16 win.visible_set(true); 24 win.visible_set(true);
17 25
18 elm_run(); 26 elm_run();
diff --git a/src/examples/elementary/calendar_cxx_example_02.cc b/src/examples/elementary/calendar_cxx_example_02.cc
index ce8d0eb..bc626e9 100644
--- a/src/examples/elementary/calendar_cxx_example_02.cc
+++ b/src/examples/elementary/calendar_cxx_example_02.cc
@@ -1,3 +1,8 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2 7
3static char * 8static char *
@@ -18,17 +23,19 @@ elm_main (int argc, char *argv[])
18 "S", "M", "T", "W", "T", "F", "S" 23 "S", "M", "T", "W", "T", "F", "S"
19 }; 24 };
20 25
21 ::elm::win_standard win; 26 efl::ui::win::Standard win;
22 win.title_set("Calendar Layout Formatting Example"); 27 //win.title_set("Calendar Layout Formatting Example");
23 win.autohide_set(true); 28 win.autohide_set(true);
24 29
25 ::elm::calendar cal(efl::eo::parent = win); 30 ::elm::Calendar cal(win);
26 cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 31 //cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
27 win.resize_object_add(cal); 32 //win.resize_object_add(cal);
28 33
29 cal.format_function_set(_format_month_year); 34 cal.format_function_set(_format_month_year);
30 cal.weekdays_names_set(weekdays); 35 // cal.weekdays_names_set(weekdays);
31 36
37 cal.eo_cxx::efl::Gfx::size_set(125,134);
38 win.eo_cxx::efl::Gfx::size_set(125,134);
32 cal.visible_set(true); 39 cal.visible_set(true);
33 win.visible_set(true); 40 win.visible_set(true);
34 41
diff --git a/src/examples/elementary/calendar_cxx_example_03.cc b/src/examples/elementary/calendar_cxx_example_03.cc
index 9aacade..7ebc206 100644
--- a/src/examples/elementary/calendar_cxx_example_03.cc
+++ b/src/examples/elementary/calendar_cxx_example_03.cc
@@ -1,3 +1,8 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2 7
3EAPI_MAIN int 8EAPI_MAIN int
@@ -5,16 +10,18 @@ elm_main (int argc, char *argv[])
5{ 10{
6 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
7 12
8 ::elm::win_standard win; 13 efl::ui::win::Standard win;
9 win.title_set("Calendar Min/Max Year Example"); 14 //win.title_set("Calendar Min/Max Year Example");
10 win.autohide_set(true); 15 win.autohide_set(true);
11 16
12 ::elm::calendar cal(efl::eo::parent = win); 17 elm::Calendar cal(win);
13 cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 18 //cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
14 win.resize_object_add(cal); 19 //win.resize_object_add(cal);
15 cal.min_max_year_set(2020, 2022); 20 cal.min_max_year_set(2020, 2022);
16 cal.visible_set(true); 21 cal.visible_set(true);
17 22
23 cal.eo_cxx::efl::Gfx::size_set(140,140);
24 win.eo_cxx::efl::Gfx::size_set(140,140);
18 win.visible_set(true); 25 win.visible_set(true);
19 26
20 elm_run(); 27 elm_run();
diff --git a/src/examples/elementary/calendar_cxx_example_04.cc b/src/examples/elementary/calendar_cxx_example_04.cc
index 9df983d..6a26778 100644
--- a/src/examples/elementary/calendar_cxx_example_04.cc
+++ b/src/examples/elementary/calendar_cxx_example_04.cc
@@ -1,3 +1,8 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2 7
3#define SECS_DAY 86400 8#define SECS_DAY 86400
@@ -10,31 +15,37 @@ elm_main (int argc, char *argv[])
10 15
11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 16 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
12 17
13 ::elm::win_standard win; 18 efl::ui::win::Standard win;
14 win.title_set("Calendar Day Selection Example"); 19 //win.title_set("Calendar Day Selection Example");
15 win.autohide_set(true); 20 win.autohide_set(true);
16 21
17 ::elm::box bx(efl::eo::parent = win); 22 ::efl::ui::Box bx(win);
18 bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 23 //bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
19 win.resize_object_add(bx); 24 //win.resize_object_add(bx);
25 bx.eo_cxx::efl::Gfx::size_set(700,700);
20 bx.visible_set(true); 26 bx.visible_set(true);
21 27
22 ::elm::calendar cal(efl::eo::parent = win); 28 ::elm::Calendar cal(win);
23 cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 29 // cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
24 cal.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL); 30 // cal.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
25 cal.select_mode_set(ELM_CALENDAR_SELECT_MODE_NONE); 31 cal.select_mode_set(ELM_CALENDAR_SELECT_MODE_NONE);
32 cal.eo_cxx::efl::Gfx::size_set(125,135);
26 cal.visible_set(true); 33 cal.visible_set(true);
27 bx.pack_end(cal); 34 //bx.pack_end(cal); no matching function for call to ‘efl::ui::Box::pack_end(elm::Calendar&)’
35 //candidate: bool eo_cxx::efl::pack::Linear::pack_end(Efl_Gfx*) const
36 // inline bool eo_cxx::efl::pack::Linear::pack_end(Efl_Gfx * subobj_) const
28 37
29 ::elm::calendar cal2(efl::eo::parent = win); 38 ::elm::Calendar cal2(win);
30 cal2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 39 //cal2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
31 cal2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL); 40 //cal2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
32 current_time = time(NULL) +2 * SECS_DAY; 41 current_time = time(NULL) +2 * SECS_DAY;
33 localtime_r(&current_time, &selected_time); 42 localtime_r(&current_time, &selected_time);
34 cal2.selected_time_set(&selected_time); 43 // cal2.selected_time_set(&selected_time);
44 cal2.eo_cxx::efl::Gfx::size_set(125,135);
35 cal2.visible_set(true); 45 cal2.visible_set(true);
36 bx.pack_end(cal2); 46 //bx.pack_end(cal2);
37 47
48 win.eo_cxx::efl::Gfx::size_set(500,560);
38 win.visible_set(true); 49 win.visible_set(true);
39 50
40 elm_run(); 51 elm_run();
diff --git a/src/examples/elementary/calendar_cxx_example_05.cc b/src/examples/elementary/calendar_cxx_example_05.cc
index b209efe..0e04d15 100644
--- a/src/examples/elementary/calendar_cxx_example_05.cc
+++ b/src/examples/elementary/calendar_cxx_example_05.cc
@@ -1,3 +1,8 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2 7
3EAPI_MAIN int 8EAPI_MAIN int
@@ -5,43 +10,45 @@ elm_main (int argc, char *argv[])
5{ 10{
6 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
7 12
8 ::elm::win_standard win; 13 efl::ui::win::Standard win;
9 win.title_set("Calendar Getters Example"); 14 //win.title_set("Calendar Getters Example");
10 win.autohide_set(true); 15 win.autohide_set(true);
11 16
12 ::elm::calendar cal(efl::eo::parent = win); 17 elm::Calendar cal(win);
13 cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 18 //cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
14 win.resize_object_add(cal); 19 //win.resize_object_add(cal);
20 cal.eo_cxx::efl::Gfx::size_set(135,135);
15 21
16 auto print_cal_info = std::bind([] (::elm::calendar obj) 22 // auto print_cal_info = std::bind([] (::elm::Calendar obj)
17 { 23 // {
18 int year_min, year_max; 24 // int year_min, year_max;
19 bool sel_enabled; 25 // bool sel_enabled;
20 const char **wds; 26 // const char **wds;
21 struct tm sel_time; 27 // struct tm sel_time;
22 double interval; 28 // double interval;
23 29
24 if (!obj.selected_time_get(&sel_time)) 30 // if (!obj.selected_time_get(&sel_time))
25 return; 31 // return;
26 32
27 interval = obj.interval_get(); 33 // interval = obj.interval_get();
28 obj.min_max_year_get(&year_min, &year_max); 34 // obj.min_max_year_get(&year_min, &year_max);
29 sel_enabled = (obj.select_mode_get() != ELM_CALENDAR_SELECT_MODE_NONE); 35 // sel_enabled = (obj.select_mode_get() != ELM_CALENDAR_SELECT_MODE_NONE);
30 wds = obj.weekdays_names_get(); 36 // wds = obj.weekdays_names_get();
31 37
32 std::cout << "Day: " << sel_time.tm_mday << ", Mon: " << sel_time.tm_mon << ", Year " << 38 // std::cout << "Day: " << sel_time.tm_mday << ", Mon: " << sel_time.tm_mon << ", Year " <<
33 sel_time.tm_year + 1900 << ", WeekDay: " << sel_time.tm_wday << "<br>" << std::endl; 39 // sel_time.tm_year + 1900 << ", WeekDay: " << sel_time.tm_wday << "<br>" << std::endl;
34 40
35 std::cout << "Interval: " << interval << ", Year_Min: " << year_min << ", Year_Max " << 41 // std::cout << "Interval: " << interval << ", Year_Min: " << year_min << ", Year_Max " <<
36 year_max << ", Sel Enabled: " << sel_enabled << "<br>" << std::endl; 42 // year_max << ", Sel Enabled: " << sel_enabled << "<br>" << std::endl;
37 43
38 std::cout << "Weekdays: " << wds[0] << ", " << wds[1] << ", " << wds[2] << ", " << wds[3] << 44 // std::cout << "Weekdays: " << wds[0] << ", " << wds[1] << ", " << wds[2] << ", " << wds[3] <<
39 ", " << wds[4] << ", " << wds[5] << ", " << wds[6] << "<br>" << std::endl << std::endl; 45 // ", " << wds[4] << ", " << wds[5] << ", " << wds[6] << "<br>" << std::endl << std::endl;
40 } , std::placeholders::_1 ); 46 // } , std::placeholders::_1 );
41 47
42 cal.callback_changed_add(print_cal_info); 48 // cal.callback_changed_add(print_cal_info);
43 cal.visible_set(true); 49 cal.visible_set(true);
44 50
51 win.eo_cxx::efl::Gfx::size_set(135,135);
45 win.visible_set(true); 52 win.visible_set(true);
46 53
47 elm_run(); 54 elm_run();
diff --git a/src/examples/elementary/clock_cxx_example.cc b/src/examples/elementary/clock_cxx_example.cc
index 546ad33..f1e2c3e 100644
--- a/src/examples/elementary/clock_cxx_example.cc
+++ b/src/examples/elementary/clock_cxx_example.cc
@@ -1,3 +1,8 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2 7
3EAPI_MAIN int 8EAPI_MAIN int
@@ -5,31 +10,32 @@ elm_main (int argc, char *argv[])
5{ 10{
6 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
7 12
8 ::elm::win_standard win; 13 efl::ui::win::Standard win;
9 win.title_set("Clock Example"); 14 //win.title_set("Clock Example");
10 win.autohide_set(true); 15 win.autohide_set(true);
11 16
12 ::elm::box bx(efl::eo::parent = win); 17 efl::ui::Box bx(win);
13 bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 18 //bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
14 win.resize_object_add(bx); 19 //win.resize_object_add(bx);
20 bx.eo_cxx::efl::Gfx::size_set(300,300);
15 bx.visible_set(true); 21 bx.visible_set(true);
16 22
17 ::elm::clock ck(efl::eo::parent = win); 23 ::elm::Clock ck(win);
18 bx.pack_end(ck); 24 bx.pack_end(ck);
19 ck.visible_set(true); 25 ck.visible_set(true);
20 26
21 ::elm::clock ck2(efl::eo::parent = win); 27 ::elm::Clock ck2(win);
22 ck2.show_am_pm_set(true); 28 ck2.show_am_pm_set(true);
23 bx.pack_end(ck2); 29 bx.pack_end(ck2);
24 ck2.visible_set(true); 30 ck2.visible_set(true);
25 31
26 ::elm::clock ck3(efl::eo::parent = win); 32 ::elm::Clock ck3(win);
27 ck3.show_seconds_set(true); 33 ck3.show_seconds_set(true);
28 ck3.time_set(10, 11, 12); 34 ck3.time_set(10, 11, 12);
29 bx.pack_end(ck3); 35 bx.pack_end(ck3);
30 ck3.visible_set(true); 36 ck3.visible_set(true);
31 37
32 ::elm::clock ck4(efl::eo::parent = win); 38 ::elm::Clock ck4(win);
33 ck4.edit_set(true); 39 ck4.edit_set(true);
34 ck4.show_seconds_set(true); 40 ck4.show_seconds_set(true);
35 ck4.show_am_pm_set(true); 41 ck4.show_am_pm_set(true);
@@ -37,7 +43,7 @@ elm_main (int argc, char *argv[])
37 bx.pack_end(ck4); 43 bx.pack_end(ck4);
38 ck4.visible_set(true); 44 ck4.visible_set(true);
39 45
40 ::elm::clock ck5(efl::eo::parent = win); 46 ::elm::Clock ck5(win);
41 ck5.show_seconds_set(true); 47 ck5.show_seconds_set(true);
42 ck5.edit_set(true); 48 ck5.edit_set(true);
43 int digedit = ELM_CLOCK_EDIT_HOUR_UNIT | ELM_CLOCK_EDIT_MIN_UNIT | ELM_CLOCK_EDIT_SEC_UNIT; 49 int digedit = ELM_CLOCK_EDIT_HOUR_UNIT | ELM_CLOCK_EDIT_MIN_UNIT | ELM_CLOCK_EDIT_SEC_UNIT;
@@ -45,6 +51,7 @@ elm_main (int argc, char *argv[])
45 bx.pack_end(ck5); 51 bx.pack_end(ck5);
46 ck5.visible_set(true); 52 ck5.visible_set(true);
47 53
54 win.eo_cxx::efl::Gfx::size_set(500,500);
48 win.visible_set(true); 55 win.visible_set(true);
49 56
50 elm_run(); 57 elm_run();
diff --git a/src/examples/elementary/datetime_cxx_example.cc b/src/examples/elementary/datetime_cxx_example.cc
index 1eb55ec..d47a054 100644
--- a/src/examples/elementary/datetime_cxx_example.cc
+++ b/src/examples/elementary/datetime_cxx_example.cc
@@ -1,3 +1,8 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2 7
3EAPI_MAIN int 8EAPI_MAIN int
@@ -5,42 +10,46 @@ elm_main (int argc, char *argv[])
5{ 10{
6 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
7 12
8 ::elm::win_standard win; 13 efl::ui::win::Standard win;
9 win.title_set("Datetime"); 14 //win.title_set("Datetime");
10 win.autohide_set(true); 15 win.autohide_set(true);
11 16
12 ::elm::bg bg(efl::eo::parent = win); 17 //::elm::Bg bg(efl::eo::parent = win);
13 bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 18 //bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
14 win.resize_object_add(bg); 19 //win.resize_object_add(bg);
15 bg.visible_set(true); 20 //bg.efl::Gfx::size_set(100,100);
21 //bg.visible_set(true);
16 22
17 ::elm::box bx(efl::eo::parent = win); 23 efl::ui::Box bx(win);
18 bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 24 //bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
19 win.resize_object_add(bx); 25 //win.resize_object_add(bx);
26 bx.eo_cxx::efl::Gfx::size_set(20,20);
20 bx.visible_set(true); 27 bx.visible_set(true);
21 28
22 ::elm::datetime datetime(efl::eo::parent = bx); 29 ::elm::Datetime datetime(bx);
23 datetime.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 30 // datetime.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
24 datetime.size_hint_align_set(EVAS_HINT_FILL, 0.5); 31 // datetime.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
25 datetime.field_visible_set(ELM_DATETIME_HOUR, false); 32 datetime.field_visible_set(ELM_DATETIME_HOUR, false);
26 datetime.field_visible_set(ELM_DATETIME_MINUTE, false); 33 datetime.field_visible_set(ELM_DATETIME_MINUTE, false);
27 datetime.field_visible_set(ELM_DATETIME_AMPM, false); 34 datetime.field_visible_set(ELM_DATETIME_AMPM, false);
28 bx.pack_end(datetime); 35 //bx.pack_end(datetime);
29 datetime.visible_set(true); 36 datetime.visible_set(true);
30 37
31 ::elm::datetime datetime2(efl::eo::parent = bx); 38 ::elm::Datetime datetime2(bx);
32 datetime2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 39 // datetime2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
33 datetime2.size_hint_align_set(EVAS_HINT_FILL, 0.5); 40 // datetime2.size_hint_align_set(EVAS_HINT_FILL, 0.5);
34 datetime2.field_visible_set(ELM_DATETIME_YEAR, false); 41 datetime2.field_visible_set(ELM_DATETIME_YEAR, false);
35 datetime2.field_visible_set(ELM_DATETIME_MONTH, false); 42 datetime2.field_visible_set(ELM_DATETIME_MONTH, false);
36 datetime2.field_visible_set(ELM_DATETIME_DATE, false); 43 datetime2.field_visible_set(ELM_DATETIME_DATE, false);
37 bx.pack_end(datetime2); 44 //bx.pack_end(datetime2);
45 datetime2.eo_cxx::efl::Gfx::size_set(200,150);
38 datetime2.visible_set(true); 46 datetime2.visible_set(true);
39 47
40 ::elm::datetime datetime3(efl::eo::parent = bx); 48 ::elm::Datetime datetime3(bx);
41 datetime3.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 49 // datetime3.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
42 datetime3.size_hint_align_set(EVAS_HINT_FILL, 0.5); 50 // datetime3.size_hint_align_set(EVAS_HINT_FILL, 0.5);
43 bx.pack_end(datetime3); 51 //bx.pack_end(datetime3);
52 datetime3.eo_cxx::efl::Gfx::size_set(200,280);
44 datetime3.visible_set(true); 53 datetime3.visible_set(true);
45 54
46 win.visible_set(true); 55 win.visible_set(true);
diff --git a/src/examples/elementary/hoversel_cxx_example_01.cc b/src/examples/elementary/hoversel_cxx_example_01.cc
index 776d92a..13d8187 100644
--- a/src/examples/elementary/hoversel_cxx_example_01.cc
+++ b/src/examples/elementary/hoversel_cxx_example_01.cc
@@ -12,18 +12,18 @@ elm_main (int argc, char *argv[])
12 12
13 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 13 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
14 14
15 ::elm::win_standard win; 15 ::elm::win::Standard win;
16 win.title_set("Hoversel"); 16 win.title_set("Hoversel");
17 win.autohide_set(true); 17 win.autohide_set(true);
18 18
19 evas::rectangle rect(efl::eo::parent = win); 19 ::evas::Rectangle rect(efl::eo::parent = win);
20 rect.color_set(255, 0, 0, 255); 20 rect.color_set(255, 0, 0, 255);
21 rect.visible_set(true); 21 rect.visible_set(true);
22 22
23 ::elm::hoversel hoversel(efl::eo::parent = win); 23 ::elm::hoversel hoversel(efl::eo::parent = win);
24 hoversel.horizontal_set(false); 24 hoversel.horizontal_set(false);
25 hoversel.text_set("elm.text", "Add an item to Hoversel"); 25 hoversel.part_text_set("elm.text", "Add an item to Hoversel");
26 hoversel.content_set(nullptr, rect); 26 hoversel.part_content_set(nullptr, rect);
27 27
28 hoversel.item_add("Print items", nullptr, ELM_ICON_NONE, &_print_items, NULL); 28 hoversel.item_add("Print items", nullptr, ELM_ICON_NONE, &_print_items, NULL);
29 hoversel.item_add( "Option 2", "home", ELM_ICON_STANDARD, NULL,NULL); 29 hoversel.item_add( "Option 2", "home", ELM_ICON_STANDARD, NULL,NULL);
diff --git a/src/examples/elementary/icon_cxx_example_01.cc b/src/examples/elementary/icon_cxx_example_01.cc
index 399c080..bb844ab 100644
--- a/src/examples/elementary/icon_cxx_example_01.cc
+++ b/src/examples/elementary/icon_cxx_example_01.cc
@@ -1,3 +1,8 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#include "elementary_config.h"
4#endif
5
1#include <Elementary.hh> 6#include <Elementary.hh>
2 7
3EAPI_MAIN int 8EAPI_MAIN int
@@ -5,31 +10,30 @@ elm_main (int argc, char *argv[])
5{ 10{
6 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 11 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
7 12
8 ::elm::win win(elm_win_util_standard_add("icon", "Icon")); 13 efl::ui::win::Standard win;
14 //win.title_set("Icon");
9 win.autohide_set(true); 15 win.autohide_set(true);
10 16
11 ::elm::icon icon(efl::eo::parent = win); 17 efl::ui::Image icon(win);
12 icon.order_lookup_set(ELM_ICON_LOOKUP_THEME_FDO); 18 icon.icon_set("home");
13 icon.standard_set("home");
14 19
15 const char *path, *group; 20 efl::eina::string_view path, group;
16 icon.file_get(&path, &group); 21 icon.file_get(path, group);
17 std::cout << "path = " << path << ", group = "<< group; 22 std::cout << "path = " << path << ", group = "<< group;
18 23
19 efl::eina::optional<std::string> name; 24 std::cout << ", name = " << icon.icon_get() << std::endl;
20 name = icon.standard_get();
21 std::cout << ", name = " << *name << std::endl;
22 25
23 icon.no_scale_set(true); 26 icon.scale_type_set(EFL_UI_IMAGE_SCALE_TYPE_NONE);
24 icon.resizable_set(false, true); 27 //icon.resizable_set(false, true);
25 icon.smooth_set(false); 28 //icon.smooth_set(false);
26 icon.fill_outside_set(true); 29 //icon.fill_outside_set(true);
27 30
28 icon.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 31 // icon.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
29 win.resize_object_add(icon); 32 //win.resize_object_add(icon);
33 icon.eo_cxx::efl::Gfx::size_set(320,320);
30 icon.visible_set(true); 34 icon.visible_set(true);
31 35
32 win.size_set(320, 320); 36 win.eo_cxx::efl::Gfx::size_set(320, 320);
33 win.visible_set(true); 37 win.visible_set(true);
34 38
35 elm_run(); 39 elm_run();
diff --git a/src/examples/elementary/radio_cxx_example_01.cc b/src/examples/elementary/radio_cxx_example_01.cc
index 34a9f09..7a760aa 100644
--- a/src/examples/elementary/radio_cxx_example_01.cc
+++ b/src/examples/elementary/radio_cxx_example_01.cc
@@ -11,7 +11,7 @@ elm_main (int argc, char *argv[])
11 win.title_set("Radio"); 11 win.title_set("Radio");
12 win.autohide_set(true); 12 win.autohide_set(true);
13 13
14 ::elm::box bx(efl::eo::parent = win); 14 ::efl::ui::Box bx(efl::eo::parent = win);
15 bx.horizontal_set(true); 15 bx.horizontal_set(true);
16 bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 16 bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
17 win.resize_object_add(bx); 17 win.resize_object_add(bx);
diff --git a/src/examples/elementary/separator_cxx_example_01.cc b/src/examples/elementary/separator_cxx_example_01.cc
index 98bf264..bfc6242 100644
--- a/src/examples/elementary/separator_cxx_example_01.cc
+++ b/src/examples/elementary/separator_cxx_example_01.cc
@@ -1,3 +1,4 @@
1
1#include <Elementary.hh> 2#include <Elementary.hh>
2#include <Evas.hh> 3#include <Evas.hh>
3 4
@@ -6,42 +7,44 @@ elm_main (int argc, char *argv[])
6{ 7{
7 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 8 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
8 9
9 ::elm::win_standard win; 10 ::efl::ui::win::Standard win;
10 win.title_set("Separator"); 11 //win.title_set("Separator");
11 win.autohide_set(true); 12 win.autohide_set(true);
12 13
13 ::elm::bg bg(efl::eo::parent = win); 14 ::efl::ui::Box bx(win);
14 bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 15 bx.eo_cxx::efl::Orientation::orientation_set(EFL_ORIENT_HORIZONTAL);
15 win.resize_object_add(bg); 16 //bx.horizontal_set(true);
16 bg.visible_set(true); 17 // bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
17 18 //win.resize_object_add(bx);
18 ::elm::box bx(efl::eo::parent = win); 19 bx.eo_cxx::efl::Gfx::size_set(200,200);
19 bx.horizontal_set(true);
20 bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
21 win.resize_object_add(bx);
22 bx.visible_set(true); 20 bx.visible_set(true);
23 21
24 evas::rectangle rect(efl::eo::parent = win); 22 efl::canvas::Rectangle rect(win);
25 rect.color_set( 0, 255, 0, 255); 23 rect.color_set( 0, 255, 0, 255);
26 rect.size_hint_min_set( 90, 200); 24 // rect.size_hint_min_set( 90, 200);
27 rect.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 25 // rect.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
28 rect.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL); 26 // rect.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
29 rect.visible_set(true); 27 rect.visible_set(true);
28 rect.eo_cxx::efl::Gfx::size_set(20,20);
30 bx.pack_end(rect); 29 bx.pack_end(rect);
31 30
32 ::elm::separator separator(efl::eo::parent = win); 31 ::elm::Separator separator(win);
33 separator.horizontal_set(true); 32 separator.eo_cxx::efl::Orientation::orientation_set(EFL_ORIENT_HORIZONTAL);
33 // separator.horizontal_set(true);
34 separator.visible_set(true); 34 separator.visible_set(true);
35 separator.eo_cxx::efl::Gfx::size_set(200,200);
35 bx.pack_end(separator); 36 bx.pack_end(separator);
36 37
37 evas::rectangle rect2(efl::eo::parent = win); 38 efl::canvas::Rectangle rect2(win);
38 rect2.color_set( 0, 0, 255, 255); 39 rect2.color_set( 0, 0, 255, 255);
39 rect2.size_hint_min_set( 90, 200); 40 // rect2.size_hint_min_set( 90, 200);
40 rect2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 41 // rect2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
41 rect2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL); 42 // rect2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
42 rect2.visible_set(true); 43 rect2.visible_set(true);
44 rect2.eo_cxx::efl::Gfx::size_set(10,10);
43 bx.pack_end(rect2); 45 bx.pack_end(rect2);
44 46
47 win.eo_cxx::efl::Gfx::size_set(200,200);
45 win.visible_set(true); 48 win.visible_set(true);
46 49
47 elm_run(); 50 elm_run();
diff --git a/src/examples/elementary/table_cxx_example_01.cc b/src/examples/elementary/table_cxx_example_01.cc
index 1af3b45..c55637e 100644
--- a/src/examples/elementary/table_cxx_example_01.cc
+++ b/src/examples/elementary/table_cxx_example_01.cc
@@ -1,3 +1,4 @@
1
1#include <Elementary.hh> 2#include <Elementary.hh>
2 3
3EAPI_MAIN int 4EAPI_MAIN int
diff --git a/src/examples/elementary/thumb_cxx_example_01.cc b/src/examples/elementary/thumb_cxx_example_01.cc
index abca9ac..b0d86ca 100644
--- a/src/examples/elementary/thumb_cxx_example_01.cc
+++ b/src/examples/elementary/thumb_cxx_example_01.cc
@@ -11,11 +11,11 @@ elm_main(int argc, char *argv[])
11 elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg"); 11 elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg");
12 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN); 12 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
13 13
14 ::elm::win_standard win; 14 efl::ui::win::Standard win;
15 win.title_set("Thumbnailer"); 15 //win.title_set("Thumbnailer");
16 win.autohide_set(true); 16 win.autohide_set(true);
17 17
18 ::elm::thumb thumb(efl::eo::parent = win); 18 elm::Thumb thumb(win);
19 19
20 auto generation_started = std::bind([] { std::cout << "thumbnail generation started." << std::endl; }); 20 auto generation_started = std::bind([] { std::cout << "thumbnail generation started." << std::endl; });
21 21
@@ -23,22 +23,21 @@ elm_main(int argc, char *argv[])
23 23
24 auto generation_error = std::bind([] { std::cout << "thumbnail generation error." << std::endl; }); 24 auto generation_error = std::bind([] { std::cout << "thumbnail generation error." << std::endl; });
25 25
26 thumb.callback_generate_start_add( generation_started ); 26 efl::eolian::event_add(thumb.generate_start_event, thumb, generation_started);
27 thumb.callback_generate_stop_add( generation_finished ); 27 efl::eolian::event_add(thumb.generate_stop_event, thumb, generation_finished);
28 thumb.callback_generate_error_add( generation_error ); 28 efl::eolian::event_add(thumb.generate_error_event, thumb, generation_error);
29 29
30 thumb.size_set(160, 160);
31 thumb.editable_set(false);
32 std::stringstream ss; 30 std::stringstream ss;
33 ss << elm_app_data_dir_get() << "/images/plant_01.jpg"; 31 ss << elm_app_data_dir_get() << "/images/plant_01.jpg";
34 thumb.file_set(ss.str(), "image"); 32 thumb.file_set(ss.str(), "image");
35 thumb.reload(); 33 thumb.eo_cxx::efl::Gfx::size_set(160, 160);
34 //thumb.reload();
36 35
37 thumb.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 36 // thumb.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
38 win.resize_object_add(thumb); 37 //win.resize_object_add(thumb);
39 thumb.visible_set(true); 38 thumb.visible_set(true);
40 39
41 win.size_set(320, 320); 40 win.eo_cxx::efl::Gfx::size_set(200, 200);
42 win.visible_set(true); 41 win.visible_set(true);
43 42
44 elm_run(); 43 elm_run();