1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "elementary_config.h"
#endif
#include <Elementary.hh>
EAPI_MAIN int
elm_main (int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN);
using efl::eo::instantiate;
efl::ui::Win win(instantiate);
//win.title_set("Calendar Getters Example");
win.autohide_set(true);
elm::Calendar cal(instantiate, 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;
// 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();
// 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 << "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.visible_set(true);
win.eo_cxx::efl::Gfx::size_set({135,135});
win.visible_set(true);
elm_run();
return 0;
}
ELM_MAIN()
|