2016-05-26 14:46:29 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
2014-12-16 13:04:43 -08:00
|
|
|
#include <Elementary.hh>
|
|
|
|
|
|
|
|
EAPI_MAIN int
|
2017-04-19 23:33:59 -07:00
|
|
|
elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
2014-12-16 13:04:43 -08:00
|
|
|
{
|
2016-11-21 15:29:47 -08:00
|
|
|
Efl_Time min, max;
|
|
|
|
|
2014-12-16 13:04:43 -08:00
|
|
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
|
|
|
|
|
2017-09-11 11:12:30 -07:00
|
|
|
using efl::eo::instantiate;
|
|
|
|
|
|
|
|
efl::ui::Win win(instantiate);
|
2016-05-26 14:46:29 -07:00
|
|
|
//win.title_set("Calendar Min/Max Year Example");
|
2014-12-16 13:04:43 -08:00
|
|
|
win.autohide_set(true);
|
|
|
|
|
2017-09-11 11:12:30 -07:00
|
|
|
elm::Calendar cal(instantiate, win);
|
2016-11-21 15:29:47 -08:00
|
|
|
|
|
|
|
min.tm_year = 2020 - 1900;
|
|
|
|
max.tm_year = 2022 - 1900;
|
|
|
|
|
2016-05-26 14:46:29 -07:00
|
|
|
//cal.size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
//win.resize_object_add(cal);
|
2016-11-21 15:29:47 -08:00
|
|
|
cal.date_min_set(min);
|
|
|
|
cal.date_max_set(max);
|
2014-12-16 13:04:43 -08:00
|
|
|
cal.visible_set(true);
|
|
|
|
|
2017-09-18 23:23:48 -07:00
|
|
|
cal.eo_cxx::efl::Gfx::size_set({140,140});
|
|
|
|
win.eo_cxx::efl::Gfx::size_set({140,140});
|
2014-12-16 13:04:43 -08:00
|
|
|
win.visible_set(true);
|
|
|
|
|
|
|
|
elm_run();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
ELM_MAIN()
|