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>
|
|
|
|
|
2017-11-01 06:42:04 -07:00
|
|
|
using efl::eo::instantiate;
|
|
|
|
|
|
|
|
static void
|
|
|
|
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
2014-12-16 13:04:43 -08:00
|
|
|
{
|
2017-11-01 06:42:04 -07:00
|
|
|
Efl_Time min = {}, max = {};
|
2016-11-21 15:29:47 -08:00
|
|
|
|
2014-12-16 13:04:43 -08:00
|
|
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
|
|
|
|
|
2016-11-21 15:29:47 -08:00
|
|
|
min.tm_year = 2020 - 1900;
|
|
|
|
max.tm_year = 2022 - 1900;
|
|
|
|
|
2017-11-01 06:42:04 -07:00
|
|
|
auto win = efl::ui::Win(instantiate);
|
|
|
|
win.text_set("Calendar Min/Max Year Example");
|
|
|
|
win.autohide_set(true);
|
|
|
|
|
|
|
|
auto cal = efl::ui::Calendar(instantiate, win);
|
|
|
|
win.content_set(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
|
|
|
|
2017-11-01 06:42:04 -07:00
|
|
|
win.size_set({320,320});
|
2014-12-16 13:04:43 -08:00
|
|
|
}
|
2017-11-01 06:42:04 -07:00
|
|
|
EFL_MAIN()
|