aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/elementary/src/examples/calendar_example_02.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:29:19 +1000
committerDavid Walter Seikel2013-01-13 17:29:19 +1000
commit07274513e984f0b5544586c74508ccd16e7dcafa (patch)
treeb32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/elementary/src/examples/calendar_example_02.c
parentAdded Irrlicht 1.8, but without all the Windows binaries. (diff)
downloadSledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/elementary/src/examples/calendar_example_02.c')
-rw-r--r--libraries/elementary/src/examples/calendar_example_02.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/libraries/elementary/src/examples/calendar_example_02.c b/libraries/elementary/src/examples/calendar_example_02.c
deleted file mode 100644
index 8978451..0000000
--- a/libraries/elementary/src/examples/calendar_example_02.c
+++ /dev/null
@@ -1,59 +0,0 @@
1/**
2 * Elementary's <b>calendar widget</b> example, demonstrates how to modify
3 * layout strings, using functions to set weekdays names and to format
4 * month and year label.
5 *
6 * See stdout/stderr for output. Compile with:
7 *
8 * @verbatim
9 * gcc -o calendar_example_02 calendar_example_02.c -g `pkg-config --cflags --libs elementary`
10 * @endverbatim
11 */
12
13#include <Elementary.h>
14
15static char *
16_format_month_year(struct tm *format_time)
17{
18 char buf[32];
19 /* abbreviates month and year */
20 if (!strftime(buf, sizeof(buf), "%b %y", format_time)) return NULL;
21 return strdup(buf);
22}
23
24EAPI_MAIN int
25elm_main(int argc, char **argv)
26{
27 Evas_Object *win, *bg, *cal;
28 const char *weekdays[] =
29 {
30 "S", "M", "T", "W", "T", "F", "S"
31 };
32
33 win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
34 elm_win_title_set(win, "Calendar Layout Formatting Example");
35 elm_win_autodel_set(win, EINA_TRUE);
36 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
37
38 bg = elm_bg_add(win);
39 elm_win_resize_object_add(win, bg);
40 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
41 evas_object_show(bg);
42
43 cal = elm_calendar_add(win);
44 elm_win_resize_object_add(win, cal);
45 evas_object_size_hint_weight_set(cal, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
46
47 elm_calendar_format_function_set(cal, _format_month_year);
48 elm_calendar_weekdays_names_set(cal, weekdays);
49
50 evas_object_show(cal);
51
52 evas_object_show(win);
53
54 elm_run();
55 elm_shutdown();
56
57 return 0;
58}
59ELM_MAIN()