STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
CALENDAR.h
Go to the documentation of this file.
1 /*********************************************************************
2 * SEGGER Microcontroller GmbH & Co. KG *
3 * Solutions for real time microcontroller applications *
4 **********************************************************************
5 * *
6 * (c) 1996 - 2015 SEGGER Microcontroller GmbH & Co. KG *
7 * *
8 * Internet: www.segger.com Support: support@segger.com *
9 * *
10 **********************************************************************
11 
12 ** emWin V5.28 - Graphical user interface for embedded applications **
13 All Intellectual Property rights in the Software belongs to SEGGER.
14 emWin is protected by international copyright laws. Knowledge of the
15 source code may not be used to write a similar product. This file may
16 only be used in accordance with the following terms:
17 
18 The software has been licensed to STMicroelectronics International
19 N.V. a Dutch company with a Swiss branch and its headquarters in Plan-
20 les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the
21 purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_
22 troller products commercialized by Licensee only, sublicensed and dis_
23 tributed under the terms and conditions of the End User License Agree_
24 ment supplied by STMicroelectronics International N.V.
25 Full source code is available at: www.segger.com
26 
27 We appreciate your understanding and fairness.
28 ----------------------------------------------------------------------
29 File : CALENDAR.h
30 Purpose : Message box interface
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef CALENDAR_H
35 #define CALENDAR_H
36 
37 #include "WM.h"
38 
39 #if GUI_WINSUPPORT
40 
41 #if defined(__cplusplus)
42  extern "C" { /* Make sure we have C-declarations in C++ programs */
43 #endif
44 
45 /*********************************************************************
46 *
47 * Defines
48 *
49 **********************************************************************
50 */
51 #define CALENDAR_CI_WEEKEND 0
52 #define CALENDAR_CI_WEEKDAY 1
53 #define CALENDAR_CI_SEL 2
54 
55 #define CALENDAR_CI_HEADER 3
56 #define CALENDAR_CI_MONTH 4
57 #define CALENDAR_CI_LABEL 5
58 #define CALENDAR_CI_FRAME 6
59 
60 #define CALENDAR_FI_CONTENT 0
61 #define CALENDAR_FI_HEADER 1
62 
63 #define CALENDAR_SI_HEADER 0
64 #define CALENDAR_SI_CELL_X 1
65 #define CALENDAR_SI_CELL_Y 2
66 
67 /*********************************************************************
68 *
69 * Notification codes
70 *
71 * The following is the list of notification codes specific to this widget,
72 * Send with the WM_NOTIFY_PARENT message
73 */
74 #define CALENDAR_NOTIFICATION_MONTH_CLICKED (WM_NOTIFICATION_WIDGET + 0)
75 #define CALENDAR_NOTIFICATION_MONTH_RELEASED (WM_NOTIFICATION_WIDGET + 1)
76 
77 /*********************************************************************
78 *
79 * Types
80 *
81 **********************************************************************
82 */
83 /*********************************************************************
84 *
85 * CALENDAR_DATE
86 */
87 typedef struct {
88  int Year;
89  int Month;
90  int Day;
91 } CALENDAR_DATE;
92 
93 /*********************************************************************
94 *
95 * CALENDAR_SKINFLEX_PROPS
96 */
97 typedef struct {
98  GUI_COLOR aColorFrame[3]; // Frame colors of buttons
99  GUI_COLOR aColorUpper[2]; // Upper gradient colors of buttons
100  GUI_COLOR aColorLower[2]; // Lower gradient colors of buttons
101  GUI_COLOR ColorArrow; // Arrow colors
102 } CALENDAR_SKINFLEX_PROPS;
103 
104 /*********************************************************************
105 *
106 * Public code
107 *
108 **********************************************************************
109 */
110 WM_HWIN CALENDAR_Create (WM_HWIN hParent, int xPos, int yPos, unsigned Year, unsigned Month, unsigned Day, unsigned FirstDayOfWeek, int Id, int Flags);
111 void CALENDAR_GetDate (WM_HWIN hWin, CALENDAR_DATE * pDate);
112 void CALENDAR_GetSel (WM_HWIN hWin, CALENDAR_DATE * pDate);
113 void CALENDAR_SetDate (WM_HWIN hWin, CALENDAR_DATE * pDate);
114 void CALENDAR_SetSel (WM_HWIN hWin, CALENDAR_DATE * pDate);
115 void CALENDAR_ShowDate (WM_HWIN hWin, CALENDAR_DATE * pDate);
116 
117 /*********************************************************************
118 *
119 * Default related
120 */
121 void CALENDAR_SetDefaultBkColor(unsigned Index, GUI_COLOR Color);
122 void CALENDAR_SetDefaultColor (unsigned Index, GUI_COLOR Color);
123 void CALENDAR_SetDefaultDays (const char ** apDays);
124 void CALENDAR_SetDefaultFont (unsigned Index, const GUI_FONT * pFont);
125 void CALENDAR_SetDefaultMonths (const char ** apMonths);
126 void CALENDAR_SetDefaultSize (unsigned Index, unsigned Size);
127 
128 /*********************************************************************
129 *
130 * Skinning related
131 */
132 void CALENDAR_GetSkinFlexProps (CALENDAR_SKINFLEX_PROPS * pProps, int Index);
133 void CALENDAR_SetSkinFlexProps (const CALENDAR_SKINFLEX_PROPS * pProps, int Index);
134 
135 /*********************************************************************
136 *
137 * The callback ...
138 *
139 * Do not call it directly ! It is only to be used from within an
140 * overwritten callback.
141 */
142 void CALENDAR_Callback(WM_MESSAGE * pMsg);
143 
144 #if defined(__cplusplus)
145  }
146 #endif
147 
148 #endif // GUI_WINSUPPORT
149 #endif // CALENDAR_H
150 
151 /*************************** End of file ****************************/
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50