elementary-cxx: Fix compilation of some C++ examples

This commit is contained in:
Luciana Magno de Almeida 2016-05-26 18:46:29 -03:00 committed by Felipe Magno de Almeida
parent 8071109a70
commit 5af3757ad3
19 changed files with 405 additions and 291 deletions

View File

@ -18,14 +18,14 @@ AM_CPPFLAGS = \
-I$(top_builddir)/src/lib/efl/interfaces \
-I$(top_srcdir)/src/lib/eina \
-I$(top_builddir)/src/lib/eina \
-I$(top_srcdir)/src/bindings/eina_cxx \
-I$(top_builddir)/src/bindings/eina_cxx \
-I$(top_srcdir)/src/bindings/cxx/eina_cxx \
-I$(top_builddir)/src/bindings/cxx/eina_cxx \
-I$(top_srcdir)/src/lib/eo \
-I$(top_builddir)/src/lib/eo \
-I$(top_srcdir)/src/bindings/eo_cxx \
-I$(top_builddir)/src/bindings/eo_cxx \
-I$(top_srcdir)/src/bindings/eldbus_cxx \
-I$(top_builddir)/src/bindings/eldbus_cxx \
-I$(top_srcdir)/src/bindings/cxx/eo_cxx \
-I$(top_builddir)/src/bindings/cxx/eo_cxx \
-I$(top_srcdir)/src/bindings/cxx/eldbus_cxx \
-I$(top_builddir)/src/bindings/cxx/eldbus_cxx \
-I$(top_srcdir)/src/lib/ector \
-I$(top_builddir)/src/lib/ector \
-I$(top_srcdir)/src/lib/evas \
@ -87,16 +87,6 @@ datetime_example.c \
dayselector_example.c \
diskselector_example_01.c \
diskselector_example_02.c \
efl_thread_1.c \
efl_thread_2.c \
efl_thread_3.c \
efl_thread_4.c \
efl_thread_5.c \
efl_thread_6.c \
efl_thread_win32_1.c \
efl_thread_win32_2.c \
efl_thread_win32_3.c \
efl_thread_win32_4.c \
entry_example.c \
fileselector_button_example.c \
fileselector_entry_example.c \
@ -171,42 +161,59 @@ transit_example_04.c \
web_example_01.c \
web_example_02.c \
win_example.c \
evas3d_scene_on_button_example.c \
track_example_01.c \
twitter_example_01.edc
# evas3d_scene_on_button_example.c \
evas3d_object_on_button_example.c \
evas3d_map_example.edc \
evas3d_map_example.c \
track_example_01.c \
twitter_example_01.edc
efl_thread_1.c \
efl_thread_2.c \
efl_thread_3.c \
efl_thread_4.c \
efl_thread_5.c \
efl_thread_6.c \
efl_thread_win32_1.c \
efl_thread_win32_2.c \
efl_thread_win32_3.c \
efl_thread_win32_4.c
# if HAVE_CXX11
# SRCS += \
# thumb_cxx_example_01.cc \
# table_cxx_example_02.cc \
# table_cxx_example_01.cc \
# spinner_cxx_example.cc \
# slider_cxx_example.cc \
# separator_cxx_example_01.cc \
# radio_cxx_example_01.cc \
# popup_cxx_example_01.cc \
# menu_cxx_example_01.cc \
# location_cxx_example_01.cc \
# icon_cxx_example_01.cc \
# hoversel_cxx_example_01.cc \
# glview_cxx_example_01.cc \
# datetime_cxx_example.cc \
# clock_cxx_example.cc \
# calendar_cxx_example_05.cc \
# calendar_cxx_example_04.cc \
# calendar_cxx_example_03.cc \
# calendar_cxx_example_02.cc \
# calendar_cxx_example_01.cc \
# button_cxx_example_01.cc \
# button_cxx_example_00.cc \
# bubble_cxx_example_01.cc \
# box_cxx_example_02.cc \
# bg_cxx_example_02.cc \
# bg_cxx_example_01.cc
# endif
if HAVE_CXX11
SRCS += \
bg_cxx_example_01.cc \
bg_cxx_example_02.cc \
calendar_cxx_example_01.cc \
calendar_cxx_example_02.cc \
calendar_cxx_example_03.cc \
calendar_cxx_example_04.cc \
calendar_cxx_example_05.cc \
clock_cxx_example.cc \
datetime_cxx_example.cc \
icon_cxx_example_01.cc \
separator_cxx_example_01.cc \
thumb_cxx_example_01.cc \
bubble_cxx_example_01.cc \
button_cxx_example_00.cc
endif
#table_cxx_example_02.cc \
table_cxx_example_01.cc \
spinner_cxx_example.cc \
slider_cxx_example.cc \
radio_cxx_example_01.cc \
popup_cxx_example_01.cc \
menu_cxx_example_01.cc \
location_cxx_example_01.cc \
hoversel_cxx_example_01.cc \
glview_cxx_example_01.cc \
calendar_cxx_example_05.cc \
calendar_cxx_example_04.cc \
calendar_cxx_example_03.cc \
calendar_cxx_example_02.cc \
calendar_cxx_example_01.cc \
button_cxx_example_01.cc \
box_cxx_example_02.cc \
bg_cxx_example_02.cc \
bg_cxx_example_01.cc
.edc.edj:
$(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) $< $@
@ -278,12 +285,6 @@ datetime_example \
dayselector_example \
diskselector_example_01 \
diskselector_example_02 \
efl_thread_1 \
efl_thread_2 \
efl_thread_3 \
efl_thread_4 \
efl_thread_5 \
efl_thread_6 \
entry_example \
fileselector_button_example \
fileselector_entry_example \
@ -356,14 +357,20 @@ transit_example_04 \
web_example_01 \
web_example_02 \
win_example \
track_example_01
#benchmark3d \
sphere-hunter \
evas3d_scene_on_button_example \
evas3d_object_on_button_example \
evas3d_map_example \
track_example_01 \
benchmark3d \
sphere-hunter
efl_thread_1 \
efl_thread_2 \
efl_thread_3 \
efl_thread_4 \
efl_thread_5 \
efl_thread_6
benchmark3d_SOURCES = \
# benchmark3d_SOURCES = \
performance/performance.c \
performance/camera_light.c \
performance/tools_private.h \
@ -371,22 +378,37 @@ benchmark3d_SOURCES = \
performance/Tools.h \
performance/graphical.c
sphere_hunter_SOURCES = \
# sphere_hunter_SOURCES = \
sphere_hunter/evas_3d_sphere_hunter.c
files_DATA += performance/layout.edj sphere_hunter/sphere_hunter.edj
# files_DATA += performance/layout.edj sphere_hunter/sphere_hunter.edj
performance/layout.edj: performance/layout.edc
$(AM_V_EDJ) \
# performance/layout.edj: performance/layout.edc
# $(AM_V_EDJ) \
$(MKDIR_P) performance/; \
$(EDJE_CC) $(EDJE_CC_FLAGS) -id performance/ $< $@
sphere_hunter/sphere_hunter.edj: sphere_hunter/sphere_hunter.edc
$(AM_V_EDJ) \
# sphere_hunter/sphere_hunter.edj: sphere_hunter/sphere_hunter.edc
# $(AM_V_EDJ) \
$(MKDIR_P) sphere_hunter/; \
$(EDJE_CC) $(EDJE_CC_FLAGS) -id sphere_hunter/ -id $(top_srcdir)/data/elementary/themes $< $@
# if HAVE_CXX11
if HAVE_CXX11
examples_PROGRAMS += \
bg_cxx_example_01 \
bg_cxx_example_02 \
calendar_cxx_example_01 \
calendar_cxx_example_02 \
calendar_cxx_example_03 \
calendar_cxx_example_04 \
calendar_cxx_example_05 \
clock_cxx_example \
datetime_cxx_example \
icon_cxx_example_01 \
thumb_cxx_example_01 \
separator_cxx_example_01 \
bubble_cxx_example_01 \
button_cxx_example_00
# examples_PROGRAMS += \
# thumb_cxx_example_01 \
# table_cxx_example_02 \
@ -414,7 +436,7 @@ sphere_hunter/sphere_hunter.edj: sphere_hunter/sphere_hunter.edc
# box_cxx_example_02 \
# bg_cxx_example_02 \
# bg_cxx_example_01
# endif
endif
if HAVE_WINDOWS
efl_thread_1_SOURCES = efl_thread_win32_1.c
@ -428,8 +450,21 @@ efl_thread_3_SOURCES = efl_thread_3.c
efl_thread_4_SOURCES = efl_thread_4.c
endif
# if HAVE_CXX11
# thumb_cxx_example_01_SOURCES = thumb_cxx_example_01.cc
if HAVE_CXX11
icon_cxx_example_01_SOURCES = icon_cxx_example_01.cc
datetime_cxx_example_SOURCES = datetime_cxx_example.cc
clock_cxx_example_SOURCES = clock_cxx_example.cc
calendar_cxx_example_05_SOURCES = calendar_cxx_example_05.cc
calendar_cxx_example_04_SOURCES = calendar_cxx_example_04.cc
calendar_cxx_example_03_SOURCES = calendar_cxx_example_03.cc
calendar_cxx_example_02_SOURCES = calendar_cxx_example_02.cc
calendar_cxx_example_01_SOURCES = calendar_cxx_example_01.cc
bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc
bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
thumb_cxx_example_01_SOURCES = thumb_cxx_example_01.cc
separator_cxx_example_01_SOURCES = separator_cxx_example_01.cc
bubble_cxx_example_01_SOURCES = bubble_cxx_example_01.cc
button_cxx_example_00_SOURCES = button_cxx_example_00.cc
# table_cxx_example_02_SOURCES = table_cxx_example_02.cc
# table_cxx_example_01_SOURCES = table_cxx_example_01.cc
# spinner_cxx_example_SOURCES = spinner_cxx_example.cc
@ -455,7 +490,7 @@ endif
# box_cxx_example_02_SOURCES = box_cxx_example_02.cc
# bg_cxx_example_02_SOURCES = bg_cxx_example_02.cc
# bg_cxx_example_01_SOURCES = bg_cxx_example_01.cc
# endif
endif
# This variable will hold the list of screenshots that will be made
# 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 \
table_example_02:table_example_02.png:0.0 \
menu_example_01:menu_example_01.png:0.5
# if HAVE_CXX11
# SCREENSHOTS += \
# bg_cxx_example_02:bg_cxx_example_02.png:0.0 \
# box_cxx_example_02:box_cxx_example_02.png:1.3 \
# bubble_cxx_example_01:bubble_cxx_example_01.png:0.0 \
# button_cxx_example_00:button_cxx_example_00.png:0.0 \
# button_cxx_example_01:button_cxx_example_01.png:0.0 \
# calendar_cxx_example_01:calendar_cxx_example_01.png:0.0 \
# calendar_cxx_example_02:calendar_cxx_example_02.png:0.0 \
# calendar_cxx_example_03:calendar_cxx_example_03.png:0.0 \
# calendar_cxx_example_04:calendar_cxx_example_04.png:0.0 \
# calendar_cxx_example_05:calendar_cxx_example_05.png:0.0 \
# clock_cxx_example:clock_cxx_example.png:0.5 \
# datetime_cxx_example:datetime_cxx_example.png:0.0 \
# hoversel_cxx_example_01:hoversel_cxx_example_01.png:0.0 \
# icon_cxx_example_01:icon_cxx_example_01.png:0.0 \
# menu_cxx_example_01:menu_cxx_example_01.png:0.5 \
# popup_cxx_example_01:popup_cxx_example_01.png:1.0 \
# popup_cxx_example_01:popup_cxx_example_01_a.png:6.0 \
# radio_cxx_example_01:radio_cxx_example_01.png:0.0 \
# separator_cxx_example_01:separator_cxx_example_01.png:0.0 \
# slider_cxx_example:slider_cxx_example.png:0.0 \
# spinner_cxx_example:spinner_cxx_example.png:0.0 \
# table_cxx_example_01:table_cxx_example_01.png:0.0 \
# table_cxx_example_02:table_cxx_example_02.png:0.0 \
# thumb_cxx_example_01:thumb_cxx_example_01.png:0.5
# endif
if HAVE_CXX11
SCREENSHOTS += \
bg_cxx_example_02:bg_cxx_example_02.png:0.0 \
box_cxx_example_02:box_cxx_example_02.png:1.3 \
bubble_cxx_example_01:bubble_cxx_example_01.png:0.0 \
button_cxx_example_00:button_cxx_example_00.png:0.0 \
button_cxx_example_01:button_cxx_example_01.png:0.0 \
calendar_cxx_example_01:calendar_cxx_example_01.png:0.0 \
calendar_cxx_example_02:calendar_cxx_example_02.png:0.0 \
calendar_cxx_example_03:calendar_cxx_example_03.png:0.0 \
calendar_cxx_example_04:calendar_cxx_example_04.png:0.0 \
calendar_cxx_example_05:calendar_cxx_example_05.png:0.0 \
clock_cxx_example:clock_cxx_example.png:0.5 \
datetime_cxx_example:datetime_cxx_example.png:0.0 \
hoversel_cxx_example_01:hoversel_cxx_example_01.png:0.0 \
icon_cxx_example_01:icon_cxx_example_01.png:0.0 \
menu_cxx_example_01:menu_cxx_example_01.png:0.5 \
popup_cxx_example_01:popup_cxx_example_01.png:1.0 \
popup_cxx_example_01:popup_cxx_example_01_a.png:6.0 \
radio_cxx_example_01:radio_cxx_example_01.png:0.0 \
separator_cxx_example_01:separator_cxx_example_01.png:0.0 \
slider_cxx_example:slider_cxx_example.png:0.0 \
spinner_cxx_example:spinner_cxx_example.png:0.0 \
table_cxx_example_01:table_cxx_example_01.png:0.0 \
table_cxx_example_02:table_cxx_example_02.png:0.0 \
thumb_cxx_example_01:thumb_cxx_example_01.png:0.5
endif
HTML_SS_DIR=$(top_builddir)/doc/html/screenshots
LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots

View File

@ -7,11 +7,12 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win::Standard win;
::efl::ui::win::Standard win;
// win.title_set("Bg Plain");
win.autohide_set(true);
win.eo_cxx::efl::Gfx::size_set(320,320);
//win.size_set(320,320);
win.visible_set(true);
elm_run();

View File

@ -7,24 +7,25 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Bg Image");
efl::ui::Win win;
//win.title_set("Bg Image");
win.autohide_set(true);
elm_app_compile_data_dir_set("/usr/share/elementary");
elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg");
//elm_app_compile_data_dir_set("/usr/share/elementary");
//elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg");
::elm::bg bg(efl::eo::parent = win);
bg.load_size_set(20,20);
bg.option_set(ELM_BG_OPTION_CENTER);
std::stringstream ss;
ss << elm_app_data_dir_get() << "/images/plant_01.jpg";
bg.file_set(ss.str(), nullptr);
bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bg);
elm::Bg bg(win);
//bg.load_size_set(320,320);
//bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
bg.option_set(ELM_BG_OPTION_SCALE);
//std::stringstream ss;
//ss << elm_app_data_dir_get() << "/images/plant_01.jpg";
bg.file_set("/home/luciana/Pictures/surprised_cat.jpeg", nullptr);
//win.resize_object_add(bg);
bg.eo_cxx::efl::Gfx::size_set(640,400);
bg.visible_set(true);
win.size_set(320, 320);
win.eo_cxx::efl::Gfx::size_set(640, 400);
win.visible_set(true);
elm_run();

View File

@ -46,21 +46,21 @@ elm_main(int argc, char *argv[])
Transitions_Data tdata;
::elm::win_standard win;
::elm::win::Standard win;
win.title_set("Box Transition");
win.autohide_set(true);
elm::box bigbox ( efl::eo::parent = win );
elm::Ui::Box bigbox ( efl::eo::parent = win );
bigbox.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bigbox);
//win.resize_object_add(bigbox);
bigbox.visible_set(true);
elm::box buttons ( efl::eo::parent = win );
buttons.horizontal_set(EINA_TRUE);
elm::ui::Box buttons ( efl::eo::parent = win );
//buttons.horizontal_set(true);
bigbox.pack_end(buttons);
buttons.visible_set(true);
elm::button add ( efl::eo::parent = win );
elm::Button add ( efl::eo::parent = win );
add.text_set("elm.text", "Add");
buttons.pack_end(add);
add.visible_set(true);
@ -76,13 +76,13 @@ elm_main(int argc, char *argv[])
}
}));
elm::button clear ( efl::eo::parent = win );
elm::Button clear ( efl::eo::parent = win );
clear.text_set("elm.text", "Clear");
buttons.pack_end(clear);
clear.visible_set(true);
clear.callback_clicked_add(std::bind([&tdata] { tdata.box.lock()->clear(); }));
elm::box dynamic ( efl::eo::parent = win );
elm::Box dynamic ( efl::eo::parent = win );
dynamic.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
dynamic.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
bigbox.pack_end(dynamic);
@ -90,14 +90,14 @@ elm_main(int argc, char *argv[])
auto unpack = std::bind([&tdata] (evas::clickable_interface obj)
{
elm::button btn = efl::eo::downcast<elm::button>(obj);
elm::Button btn = efl::eo::downcast<elm::button>(obj);
tdata.box.lock()->unpack(btn);
btn.position_set(0, 50);
btn.object_smart::color_set(128, 64, 0, 128);
}, std::placeholders::_1)
;
elm::button bt1 ( efl::eo::parent = win );
elm::Button bt1 ( efl::eo::parent = win );
bt1.text_set("elm.text", "Button 1");
bt1.callback_clicked_add(unpack);
bt1.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@ -105,7 +105,7 @@ elm_main(int argc, char *argv[])
dynamic.pack_end(bt1);
bt1.visible_set(true);
elm::button bt2 ( efl::eo::parent = win );
elm::Button bt2 ( efl::eo::parent = win );
bt2.text_set("elm.text", "Button 2");
bt2.size_hint_weight_set(EVAS_HINT_EXPAND, 0.0);
bt2.size_hint_align_set(1.0, 0.5);
@ -113,7 +113,7 @@ elm_main(int argc, char *argv[])
dynamic.pack_end(bt2);
bt2.visible_set(true);
elm::button bt3 ( efl::eo::parent = win );
elm::Button bt3 ( efl::eo::parent = win );
bt3.text_set("elm.text", "Button 3");
bt3.callback_clicked_add(unpack);
dynamic.pack_end(bt3);

View File

@ -1,3 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
#include <Evas.hh>
@ -6,29 +11,28 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Bg Plain");
efl::ui::win::Standard win;
// win.title_set("Bubble");
win.autohide_set(true);
::elm::bg bg(efl::eo::parent = win);
bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bg);
bg.visible_set(true);
::elm::label label1(efl::eo::parent = win);
::elm::Label label1(win);
label1.text_set(nullptr, "Bubble with no icon, info or label");
label1.visible_set(true);
evas::rectangle icon(efl::eo::parent = win);
icon.color_set( 0, 0, 255, 255);
//::evas::Rectangle icon(efl::eo::parent = win);
elm::Icon icon(win);
icon.eo_cxx::efl::Gfx::color_set( 0, 0, 255, 255);
icon.visible_set(true);
::elm::bubble bubble1(efl::eo::parent = win);
bubble1.content_set("icon", icon);
::elm::Bubble bubble1(win);
efl::Container xxx = efl::eo::downcast<efl::Container>
(bubble1.part("icon"));
xxx.content_set(icon);
// bubble1.part_content_set("icon", icon);
bubble1.text_set("info", "INFO");
bubble1.text_set(nullptr, "LABEL");
bubble1.content_set(nullptr, label1);
bubble1.size_set(300, 100);
bubble1.content_set(label1);
bubble1.eo_cxx::efl::Gfx::size_set(300, 100);
bubble1.visible_set(true);
auto on_click = std::bind([&] ()
@ -41,19 +45,19 @@ elm_main (int argc, char *argv[])
bubble1.pos_set(static_cast<Elm_Bubble_Pos>(corner));
});
bubble1.callback_clicked_add(on_click);
efl::eolian::event_add(/*bubble1.clicked_event*/efl::ui::Clickable::clicked_event, bubble1, on_click);
::elm::label label2(efl::eo::parent = win);
::elm::Label label2(win);
label2.text_set(nullptr, "Bubble with no icon, info or label");
label2.visible_set(true);
::elm::bubble bubble2(efl::eo::parent = win);
bubble2.content_set(nullptr, label2);
bubble2.size_set(200, 50);
bubble2.position_set(0, 110);
::elm::Bubble bubble2(win);
bubble2.content_set(label2);
bubble2.eo_cxx::efl::Gfx::size_set(200, 50);
bubble2.eo_cxx::efl::Gfx::position_set(0, 110);
bubble2.visible_set(true);
win.size_set(300, 200);
win.eo_cxx::efl::Gfx::size_set(300, 200);
win.visible_set(true);
elm_run();

View File

@ -1,4 +1,7 @@
#define EFL_EO_API_SUPPORT
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
@ -7,21 +10,28 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win::Standard win;
//win.title_set("Hello, World!");
efl::ui::win::Standard win;
// //win.title_set("Hello, World!");
// win.autohide_set(true);
// ::elm::Button btn(win);
// btn.text_set("elm.text","Good-Bye, World!");
// btn.eo_cxx::efl::Gfx::size_set(120, 30);
// btn.eo_cxx::efl::Gfx::position_set(60, 15);
// // btn.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// // btn.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
// win.title_set("Hello, World!");
win.autohide_set(true);
::elm::Button btn(win);
btn.text_set("elm.text","Good-Bye, World!");
btn.text_set(nullptr,"Good-Bye, World!");
btn.eo_cxx::efl::Gfx::size_set(120, 30);
btn.eo_cxx::efl::Gfx::position_set(60, 15);
// btn.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// btn.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
btn.visible_set(true);
auto on_click = std::bind([] () { elm_exit(); });
efl::eolian::event_add(evas::Clickable_Interface::clicked_event, btn, on_click);
efl::eolian::event_add(efl::ui::Clickable::clicked_event, btn, on_click);
win.eo_cxx::efl::Gfx::size_set(240, 60);
win.visible_set(true);

View File

@ -1,18 +1,26 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
EAPI_MAIN int
elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Calendar Creation Example");
efl::ui::win::Standard win;
//win.title_set("Calendar Creation Example");
win.autohide_set(true);
::elm::calendar cal(efl::eo::parent = win);
cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(cal);
::elm::Calendar cal(win);
//cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
cal.eo_cxx::efl::Gfx::size_set(134,134);
//win.resize_object_add(cal);
cal.visible_set(true);
win.eo_cxx::efl::Gfx::size_set(134,134);
win.visible_set(true);
elm_run();

View File

@ -1,3 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
static char *
@ -18,17 +23,19 @@ elm_main (int argc, char *argv[])
"S", "M", "T", "W", "T", "F", "S"
};
::elm::win_standard win;
win.title_set("Calendar Layout Formatting Example");
efl::ui::win::Standard win;
//win.title_set("Calendar Layout Formatting Example");
win.autohide_set(true);
::elm::calendar cal(efl::eo::parent = win);
cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(cal);
::elm::Calendar cal(win);
//cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(cal);
cal.format_function_set(_format_month_year);
cal.weekdays_names_set(weekdays);
// cal.weekdays_names_set(weekdays);
cal.eo_cxx::efl::Gfx::size_set(125,134);
win.eo_cxx::efl::Gfx::size_set(125,134);
cal.visible_set(true);
win.visible_set(true);

View File

@ -1,3 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
EAPI_MAIN int
@ -5,16 +10,18 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Calendar Min/Max Year Example");
efl::ui::win::Standard win;
//win.title_set("Calendar Min/Max Year Example");
win.autohide_set(true);
::elm::calendar cal(efl::eo::parent = win);
cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(cal);
elm::Calendar cal(win);
//cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(cal);
cal.min_max_year_set(2020, 2022);
cal.visible_set(true);
cal.eo_cxx::efl::Gfx::size_set(140,140);
win.eo_cxx::efl::Gfx::size_set(140,140);
win.visible_set(true);
elm_run();

View File

@ -1,3 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
#define SECS_DAY 86400
@ -10,31 +15,37 @@ elm_main (int argc, char *argv[])
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Calendar Day Selection Example");
efl::ui::win::Standard win;
//win.title_set("Calendar Day Selection Example");
win.autohide_set(true);
::elm::box bx(efl::eo::parent = win);
bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bx);
::efl::ui::Box bx(win);
//bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(bx);
bx.eo_cxx::efl::Gfx::size_set(700,700);
bx.visible_set(true);
::elm::calendar cal(efl::eo::parent = win);
cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
cal.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
::elm::Calendar cal(win);
// cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// cal.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
cal.select_mode_set(ELM_CALENDAR_SELECT_MODE_NONE);
cal.eo_cxx::efl::Gfx::size_set(125,135);
cal.visible_set(true);
bx.pack_end(cal);
//bx.pack_end(cal); no matching function for call to efl::ui::Box::pack_end(elm::Calendar&)
//candidate: bool eo_cxx::efl::pack::Linear::pack_end(Efl_Gfx*) const
// inline bool eo_cxx::efl::pack::Linear::pack_end(Efl_Gfx * subobj_) const
::elm::calendar cal2(efl::eo::parent = win);
cal2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
cal2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
::elm::Calendar cal2(win);
//cal2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//cal2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
current_time = time(NULL) +2 * SECS_DAY;
localtime_r(&current_time, &selected_time);
cal2.selected_time_set(&selected_time);
// cal2.selected_time_set(&selected_time);
cal2.eo_cxx::efl::Gfx::size_set(125,135);
cal2.visible_set(true);
bx.pack_end(cal2);
//bx.pack_end(cal2);
win.eo_cxx::efl::Gfx::size_set(500,560);
win.visible_set(true);
elm_run();

View File

@ -1,3 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
EAPI_MAIN int
@ -5,43 +10,45 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Calendar Getters Example");
efl::ui::win::Standard win;
//win.title_set("Calendar Getters Example");
win.autohide_set(true);
::elm::calendar cal(efl::eo::parent = win);
cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(cal);
elm::Calendar cal(win);
//cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(cal);
cal.eo_cxx::efl::Gfx::size_set(135,135);
auto print_cal_info = std::bind([] (::elm::calendar obj)
{
int year_min, year_max;
bool sel_enabled;
const char **wds;
struct tm sel_time;
double interval;
// auto print_cal_info = std::bind([] (::elm::Calendar obj)
// {
// int year_min, year_max;
// bool sel_enabled;
// const char **wds;
// struct tm sel_time;
// double interval;
if (!obj.selected_time_get(&sel_time))
return;
// if (!obj.selected_time_get(&sel_time))
// return;
interval = obj.interval_get();
obj.min_max_year_get(&year_min, &year_max);
sel_enabled = (obj.select_mode_get() != ELM_CALENDAR_SELECT_MODE_NONE);
wds = obj.weekdays_names_get();
// interval = obj.interval_get();
// obj.min_max_year_get(&year_min, &year_max);
// sel_enabled = (obj.select_mode_get() != ELM_CALENDAR_SELECT_MODE_NONE);
// wds = obj.weekdays_names_get();
std::cout << "Day: " << sel_time.tm_mday << ", Mon: " << sel_time.tm_mon << ", Year " <<
sel_time.tm_year + 1900 << ", WeekDay: " << sel_time.tm_wday << "<br>" << std::endl;
// std::cout << "Day: " << sel_time.tm_mday << ", Mon: " << sel_time.tm_mon << ", Year " <<
// sel_time.tm_year + 1900 << ", WeekDay: " << sel_time.tm_wday << "<br>" << std::endl;
std::cout << "Interval: " << interval << ", Year_Min: " << year_min << ", Year_Max " <<
year_max << ", Sel Enabled: " << sel_enabled << "<br>" << std::endl;
// std::cout << "Interval: " << interval << ", Year_Min: " << year_min << ", Year_Max " <<
// year_max << ", Sel Enabled: " << sel_enabled << "<br>" << std::endl;
std::cout << "Weekdays: " << wds[0] << ", " << wds[1] << ", " << wds[2] << ", " << wds[3] <<
", " << wds[4] << ", " << wds[5] << ", " << wds[6] << "<br>" << std::endl << std::endl;
} , std::placeholders::_1 );
// std::cout << "Weekdays: " << wds[0] << ", " << wds[1] << ", " << wds[2] << ", " << wds[3] <<
// ", " << wds[4] << ", " << wds[5] << ", " << wds[6] << "<br>" << std::endl << std::endl;
// } , std::placeholders::_1 );
cal.callback_changed_add(print_cal_info);
// cal.callback_changed_add(print_cal_info);
cal.visible_set(true);
win.eo_cxx::efl::Gfx::size_set(135,135);
win.visible_set(true);
elm_run();

View File

@ -1,3 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
EAPI_MAIN int
@ -5,31 +10,32 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Clock Example");
efl::ui::win::Standard win;
//win.title_set("Clock Example");
win.autohide_set(true);
::elm::box bx(efl::eo::parent = win);
bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bx);
efl::ui::Box bx(win);
//bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(bx);
bx.eo_cxx::efl::Gfx::size_set(300,300);
bx.visible_set(true);
::elm::clock ck(efl::eo::parent = win);
::elm::Clock ck(win);
bx.pack_end(ck);
ck.visible_set(true);
::elm::clock ck2(efl::eo::parent = win);
::elm::Clock ck2(win);
ck2.show_am_pm_set(true);
bx.pack_end(ck2);
ck2.visible_set(true);
::elm::clock ck3(efl::eo::parent = win);
::elm::Clock ck3(win);
ck3.show_seconds_set(true);
ck3.time_set(10, 11, 12);
bx.pack_end(ck3);
ck3.visible_set(true);
::elm::clock ck4(efl::eo::parent = win);
::elm::Clock ck4(win);
ck4.edit_set(true);
ck4.show_seconds_set(true);
ck4.show_am_pm_set(true);
@ -37,7 +43,7 @@ elm_main (int argc, char *argv[])
bx.pack_end(ck4);
ck4.visible_set(true);
::elm::clock ck5(efl::eo::parent = win);
::elm::Clock ck5(win);
ck5.show_seconds_set(true);
ck5.edit_set(true);
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[])
bx.pack_end(ck5);
ck5.visible_set(true);
win.eo_cxx::efl::Gfx::size_set(500,500);
win.visible_set(true);
elm_run();

View File

@ -1,3 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
EAPI_MAIN int
@ -5,42 +10,46 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Datetime");
efl::ui::win::Standard win;
//win.title_set("Datetime");
win.autohide_set(true);
::elm::bg bg(efl::eo::parent = win);
bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bg);
bg.visible_set(true);
//::elm::Bg bg(efl::eo::parent = win);
//bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(bg);
//bg.efl::Gfx::size_set(100,100);
//bg.visible_set(true);
::elm::box bx(efl::eo::parent = win);
bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bx);
efl::ui::Box bx(win);
//bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(bx);
bx.eo_cxx::efl::Gfx::size_set(20,20);
bx.visible_set(true);
::elm::datetime datetime(efl::eo::parent = bx);
datetime.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
datetime.size_hint_align_set(EVAS_HINT_FILL, 0.5);
::elm::Datetime datetime(bx);
// datetime.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// datetime.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
datetime.field_visible_set(ELM_DATETIME_HOUR, false);
datetime.field_visible_set(ELM_DATETIME_MINUTE, false);
datetime.field_visible_set(ELM_DATETIME_AMPM, false);
bx.pack_end(datetime);
//bx.pack_end(datetime);
datetime.visible_set(true);
::elm::datetime datetime2(efl::eo::parent = bx);
datetime2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
datetime2.size_hint_align_set(EVAS_HINT_FILL, 0.5);
::elm::Datetime datetime2(bx);
// datetime2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// datetime2.size_hint_align_set(EVAS_HINT_FILL, 0.5);
datetime2.field_visible_set(ELM_DATETIME_YEAR, false);
datetime2.field_visible_set(ELM_DATETIME_MONTH, false);
datetime2.field_visible_set(ELM_DATETIME_DATE, false);
bx.pack_end(datetime2);
//bx.pack_end(datetime2);
datetime2.eo_cxx::efl::Gfx::size_set(200,150);
datetime2.visible_set(true);
::elm::datetime datetime3(efl::eo::parent = bx);
datetime3.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
datetime3.size_hint_align_set(EVAS_HINT_FILL, 0.5);
bx.pack_end(datetime3);
::elm::Datetime datetime3(bx);
// datetime3.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// datetime3.size_hint_align_set(EVAS_HINT_FILL, 0.5);
//bx.pack_end(datetime3);
datetime3.eo_cxx::efl::Gfx::size_set(200,280);
datetime3.visible_set(true);
win.visible_set(true);

View File

@ -12,18 +12,18 @@ elm_main (int argc, char *argv[])
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
::elm::win::Standard win;
win.title_set("Hoversel");
win.autohide_set(true);
evas::rectangle rect(efl::eo::parent = win);
::evas::Rectangle rect(efl::eo::parent = win);
rect.color_set(255, 0, 0, 255);
rect.visible_set(true);
::elm::hoversel hoversel(efl::eo::parent = win);
hoversel.horizontal_set(false);
hoversel.text_set("elm.text", "Add an item to Hoversel");
hoversel.content_set(nullptr, rect);
hoversel.part_text_set("elm.text", "Add an item to Hoversel");
hoversel.part_content_set(nullptr, rect);
hoversel.item_add("Print items", nullptr, ELM_ICON_NONE, &_print_items, NULL);
hoversel.item_add( "Option 2", "home", ELM_ICON_STANDARD, NULL,NULL);

View File

@ -1,3 +1,8 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
EAPI_MAIN int
@ -5,31 +10,30 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win win(elm_win_util_standard_add("icon", "Icon"));
efl::ui::win::Standard win;
//win.title_set("Icon");
win.autohide_set(true);
::elm::icon icon(efl::eo::parent = win);
icon.order_lookup_set(ELM_ICON_LOOKUP_THEME_FDO);
icon.standard_set("home");
efl::ui::Image icon(win);
icon.icon_set("home");
const char *path, *group;
icon.file_get(&path, &group);
efl::eina::string_view path, group;
icon.file_get(path, group);
std::cout << "path = " << path << ", group = "<< group;
efl::eina::optional<std::string> name;
name = icon.standard_get();
std::cout << ", name = " << *name << std::endl;
std::cout << ", name = " << icon.icon_get() << std::endl;
icon.no_scale_set(true);
icon.resizable_set(false, true);
icon.smooth_set(false);
icon.fill_outside_set(true);
icon.scale_type_set(EFL_UI_IMAGE_SCALE_TYPE_NONE);
//icon.resizable_set(false, true);
//icon.smooth_set(false);
//icon.fill_outside_set(true);
icon.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(icon);
// icon.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(icon);
icon.eo_cxx::efl::Gfx::size_set(320,320);
icon.visible_set(true);
win.size_set(320, 320);
win.eo_cxx::efl::Gfx::size_set(320, 320);
win.visible_set(true);
elm_run();

View File

@ -11,7 +11,7 @@ elm_main (int argc, char *argv[])
win.title_set("Radio");
win.autohide_set(true);
::elm::box bx(efl::eo::parent = win);
::efl::ui::Box bx(efl::eo::parent = win);
bx.horizontal_set(true);
bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bx);

View File

@ -1,3 +1,4 @@
#include <Elementary.hh>
#include <Evas.hh>
@ -6,42 +7,44 @@ elm_main (int argc, char *argv[])
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Separator");
::efl::ui::win::Standard win;
//win.title_set("Separator");
win.autohide_set(true);
::elm::bg bg(efl::eo::parent = win);
bg.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bg);
bg.visible_set(true);
::elm::box bx(efl::eo::parent = win);
bx.horizontal_set(true);
bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(bx);
::efl::ui::Box bx(win);
bx.eo_cxx::efl::Orientation::orientation_set(EFL_ORIENT_HORIZONTAL);
//bx.horizontal_set(true);
// bx.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(bx);
bx.eo_cxx::efl::Gfx::size_set(200,200);
bx.visible_set(true);
evas::rectangle rect(efl::eo::parent = win);
efl::canvas::Rectangle rect(win);
rect.color_set( 0, 255, 0, 255);
rect.size_hint_min_set( 90, 200);
rect.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
rect.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
// rect.size_hint_min_set( 90, 200);
// rect.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// rect.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
rect.visible_set(true);
rect.eo_cxx::efl::Gfx::size_set(20,20);
bx.pack_end(rect);
::elm::separator separator(efl::eo::parent = win);
separator.horizontal_set(true);
::elm::Separator separator(win);
separator.eo_cxx::efl::Orientation::orientation_set(EFL_ORIENT_HORIZONTAL);
// separator.horizontal_set(true);
separator.visible_set(true);
separator.eo_cxx::efl::Gfx::size_set(200,200);
bx.pack_end(separator);
evas::rectangle rect2(efl::eo::parent = win);
efl::canvas::Rectangle rect2(win);
rect2.color_set( 0, 0, 255, 255);
rect2.size_hint_min_set( 90, 200);
rect2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
rect2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
// rect2.size_hint_min_set( 90, 200);
// rect2.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
// rect2.size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL);
rect2.visible_set(true);
rect2.eo_cxx::efl::Gfx::size_set(10,10);
bx.pack_end(rect2);
win.eo_cxx::efl::Gfx::size_set(200,200);
win.visible_set(true);
elm_run();

View File

@ -1,3 +1,4 @@
#include <Elementary.hh>
EAPI_MAIN int

View File

@ -11,11 +11,11 @@ elm_main(int argc, char *argv[])
elm_app_info_set(reinterpret_cast<void*>(elm_main), "elementary", "images/plant_01.jpg");
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
::elm::win_standard win;
win.title_set("Thumbnailer");
efl::ui::win::Standard win;
//win.title_set("Thumbnailer");
win.autohide_set(true);
::elm::thumb thumb(efl::eo::parent = win);
elm::Thumb thumb(win);
auto generation_started = std::bind([] { std::cout << "thumbnail generation started." << std::endl; });
@ -23,22 +23,21 @@ elm_main(int argc, char *argv[])
auto generation_error = std::bind([] { std::cout << "thumbnail generation error." << std::endl; });
thumb.callback_generate_start_add( generation_started );
thumb.callback_generate_stop_add( generation_finished );
thumb.callback_generate_error_add( generation_error );
efl::eolian::event_add(thumb.generate_start_event, thumb, generation_started);
efl::eolian::event_add(thumb.generate_stop_event, thumb, generation_finished);
efl::eolian::event_add(thumb.generate_error_event, thumb, generation_error);
thumb.size_set(160, 160);
thumb.editable_set(false);
std::stringstream ss;
ss << elm_app_data_dir_get() << "/images/plant_01.jpg";
thumb.file_set(ss.str(), "image");
thumb.reload();
thumb.eo_cxx::efl::Gfx::size_set(160, 160);
//thumb.reload();
thumb.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
win.resize_object_add(thumb);
// thumb.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
//win.resize_object_add(thumb);
thumb.visible_set(true);
win.size_set(320, 320);
win.eo_cxx::efl::Gfx::size_set(200, 200);
win.visible_set(true);
elm_run();