2016-05-26 14:46:29 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#include "elementary_config.h"
|
|
|
|
#endif
|
2016-06-05 22:54:36 -07:00
|
|
|
|
2014-12-16 13:04:43 -08:00
|
|
|
#include <Elementary.hh>
|
|
|
|
|
|
|
|
EAPI_MAIN int
|
|
|
|
elm_main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
|
|
|
|
|
2016-05-26 14:46:29 -07:00
|
|
|
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!");
|
2014-12-16 13:04:43 -08:00
|
|
|
win.autohide_set(true);
|
|
|
|
|
2016-06-05 22:54:36 -07:00
|
|
|
::elm::Button btn(win);
|
2017-01-18 16:25:02 -08:00
|
|
|
btn.eo_cxx::elm::Layout::text_set(nullptr,"Good-Bye, World!");
|
2016-06-05 22:54:36 -07:00
|
|
|
btn.eo_cxx::efl::Gfx::size_set(120, 30);
|
|
|
|
btn.eo_cxx::efl::Gfx::position_set(60, 15);
|
2014-12-16 13:04:43 -08:00
|
|
|
btn.visible_set(true);
|
|
|
|
|
|
|
|
auto on_click = std::bind([] () { elm_exit(); });
|
|
|
|
|
2016-05-26 14:46:29 -07:00
|
|
|
efl::eolian::event_add(efl::ui::Clickable::clicked_event, btn, on_click);
|
2014-12-16 13:04:43 -08:00
|
|
|
|
2016-06-05 22:54:36 -07:00
|
|
|
win.eo_cxx::efl::Gfx::size_set(240, 60);
|
2014-12-16 13:04:43 -08:00
|
|
|
win.visible_set(true);
|
|
|
|
|
|
|
|
elm_run();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
ELM_MAIN()
|