2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Runtime.InteropServices;
20 internal static partial class Interop
22 internal static partial class Elementary
24 internal enum Elm_Calendar_Mark_Repeat_Type
26 ELM_CALENDAR_UNIQUE = 0, /* Default value. Marks will be displayed only on event day. */
27 ELM_CALENDAR_DAILY, /* Marks will be displayed every day after event day (inclusive). */
28 ELM_CALENDAR_WEEKLY, /* Marks will be displayed every week after event day (inclusive) */
29 ELM_CALENDAR_MONTHLY, /* Marks will be displayed every month day that coincides to event day. */
30 ELM_CALENDAR_ANNUALLY, /* Marks will be displayed every year that coincides to event day (and month). */
31 LM_CALENDAR_LAST_DAY_OF_MONTH /* Marks will be displayed every last day of month after event day (inclusive). */
34 internal enum Elm_Calendar_Select_Mode
36 ELM_CALENDAR_SELECT_MODE_DEFAULT = 0, /* Default value. a day is always selected. */
37 ELM_CALENDAR_SELECT_MODE_ALWAYS, /* a day is always selected. */
38 ELM_CALENDAR_SELECT_MODE_NONE, /* None of the days can be selected. */
39 ELM_CALENDAR_SELECT_MODE_ONDEMAND /* User may have selected a day or not. */
42 [DllImport(Libraries.Elementary)]
43 internal static extern IntPtr elm_calendar_add(IntPtr parent);
45 [DllImport(Libraries.Elementary)]
46 internal static extern IntPtr elm_calendar_weekdays_names_get(IntPtr obj);
48 [DllImport(Libraries.Elementary)]
49 internal static extern void elm_calendar_weekdays_names_set(IntPtr obj, string[] weekdays);
51 [DllImport(Libraries.Elementary)]
52 internal static extern void elm_calendar_min_max_year_set(IntPtr obj, int min, int max);
54 [DllImport(Libraries.Elementary)]
55 internal static extern void elm_calendar_min_max_year_get(IntPtr obj, out int min, out int max);
57 [DllImport(Libraries.Elementary)]
58 internal static extern void elm_calendar_selected_time_set(IntPtr obj, ref Libc.SystemTime selectedtime);
60 [DllImport(Libraries.Elementary)]
61 internal static extern void elm_calendar_selected_time_get(IntPtr obj, ref Libc.SystemTime selectedtime);
63 [DllImport(Libraries.Elementary)]
64 internal static extern void elm_calendar_first_day_of_week_set(IntPtr obj, int day);
66 [DllImport(Libraries.Elementary)]
67 internal static extern int elm_calendar_first_day_of_week_get(IntPtr obj);
69 [DllImport(Libraries.Elementary)]
70 internal static extern void elm_calendar_selectable_set(IntPtr obj, int SelectedField);
72 [DllImport(Libraries.Elementary)]
73 internal static extern int elm_calendar_selectable_get(IntPtr obj);
75 [DllImport(Libraries.Elementary)]
76 internal static extern bool elm_calendar_displayed_time_get(IntPtr obj, out Libc.SystemTime displayedtime);
78 [DllImport(Libraries.Elementary)]
79 internal static extern void elm_calendar_interval_set(IntPtr obj, double interval);
81 [DllImport(Libraries.Elementary)]
82 internal static extern double elm_calendar_interval_get(IntPtr obj);
84 [DllImport(Libraries.Elementary)]
85 internal static extern void elm_calendar_select_mode_set(IntPtr obj, Elm_Calendar_Select_Mode mode);
87 [DllImport(Libraries.Elementary)]
88 internal static extern int elm_calendar_select_mode_get(IntPtr obj);
90 [DllImport(Libraries.Elementary)]
91 internal static extern IntPtr elm_calendar_mark_add(IntPtr obj, string type, ref Libc.SystemTime date, Elm_Calendar_Mark_Repeat_Type repeatType);
93 [DllImport(Libraries.Elementary)]
94 internal static extern void elm_calendar_mark_del(IntPtr markItem);
96 [DllImport(Libraries.Elementary)]
97 internal static extern void elm_calendar_marks_draw(IntPtr obj);
99 [DllImport(Libraries.Elementary)]
100 internal static extern void elm_calendar_marks_clear(IntPtr obj);
102 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
103 internal delegate string Elm_Calendar_Format_Cb(Libc.SystemTime date);
105 [DllImport(Libraries.Elementary)]
106 internal static extern void elm_calendar_format_function_set(IntPtr obj, Elm_Calendar_Format_Cb format_function);