Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
CALENDAR.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller GmbH * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2018 SEGGER Microcontroller GmbH * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.48 - Graphical user interface for embedded applications ** 00013 All Intellectual Property rights in the Software belongs to SEGGER. 00014 emWin is protected by international copyright laws. Knowledge of the 00015 source code may not be used to write a similar product. This file may 00016 only be used in accordance with the following terms: 00017 00018 The software has been licensed to Cypress Semiconductor Corporation, 00019 whose registered office is situated at 198 Champion Ct. San Jose, CA 00020 95134 USA solely for the purposes of creating libraries for Cypress 00021 PSoC3 and PSoC5 processor-based devices, sublicensed and distributed 00022 under the terms and conditions of the Cypress End User License 00023 Agreement. 00024 Full source code is available at: www.segger.com 00025 00026 We appreciate your understanding and fairness. 00027 ---------------------------------------------------------------------- 00028 Licensing information 00029 Licensor: SEGGER Microcontroller Systems LLC 00030 Licensed to: Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA 00031 Licensed SEGGER software: emWin 00032 License number: GUI-00319 00033 License model: Services and License Agreement, signed June 10th, 2009 00034 Licensed platform: Any Cypress platform (Initial targets are: PSoC3, PSoC5) 00035 ---------------------------------------------------------------------- 00036 Support and Update Agreement (SUA) 00037 SUA period: 2009-06-12 - 2022-07-27 00038 Contact to extend SUA: sales@segger.com 00039 ---------------------------------------------------------------------- 00040 File : CALENDAR.h 00041 Purpose : Message box interface 00042 --------------------END-OF-HEADER------------------------------------- 00043 */ 00044 00045 #ifndef CALENDAR_H 00046 #define CALENDAR_H 00047 00048 #include "WM.h" 00049 00050 #if GUI_WINSUPPORT 00051 00052 #if defined(__cplusplus) 00053 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00054 #endif 00055 00056 /********************************************************************* 00057 * 00058 * Defines 00059 * 00060 ********************************************************************** 00061 */ 00062 #define CALENDAR_CI_WEEKEND 0 00063 #define CALENDAR_CI_WEEKDAY 1 00064 #define CALENDAR_CI_SEL 2 00065 00066 #define CALENDAR_CI_HEADER 3 00067 #define CALENDAR_CI_MONTH 4 00068 #define CALENDAR_CI_LABEL 5 00069 #define CALENDAR_CI_FRAME 6 00070 00071 #define CALENDAR_FI_CONTENT 0 00072 #define CALENDAR_FI_HEADER 1 00073 00074 #define CALENDAR_SI_HEADER 0 00075 #define CALENDAR_SI_CELL_X 1 00076 #define CALENDAR_SI_CELL_Y 2 00077 00078 /********************************************************************* 00079 * 00080 * Notification codes 00081 * 00082 * The following is the list of notification codes specific to this widget, 00083 * Send with the WM_NOTIFY_PARENT message 00084 */ 00085 #define CALENDAR_NOTIFICATION_MONTH_CLICKED (WM_NOTIFICATION_WIDGET + 0) 00086 #define CALENDAR_NOTIFICATION_MONTH_RELEASED (WM_NOTIFICATION_WIDGET + 1) 00087 00088 /********************************************************************* 00089 * 00090 * Types 00091 * 00092 ********************************************************************** 00093 */ 00094 /********************************************************************* 00095 * 00096 * CALENDAR_DATE 00097 */ 00098 typedef struct { 00099 int Year; 00100 int Month; 00101 int Day; 00102 } CALENDAR_DATE; 00103 00104 /********************************************************************* 00105 * 00106 * CALENDAR_SKINFLEX_PROPS 00107 */ 00108 typedef struct { 00109 GUI_COLOR aColorFrame[3]; // Frame colors of buttons 00110 GUI_COLOR aColorUpper[2]; // Upper gradient colors of buttons 00111 GUI_COLOR aColorLower[2]; // Lower gradient colors of buttons 00112 GUI_COLOR ColorArrow; // Arrow colors 00113 } CALENDAR_SKINFLEX_PROPS; 00114 00115 /********************************************************************* 00116 * 00117 * Public code 00118 * 00119 ********************************************************************** 00120 */ 00121 WM_HWIN CALENDAR_Create (WM_HWIN hParent, int xPos, int yPos, unsigned Year, unsigned Month, unsigned Day, unsigned FirstDayOfWeek, int Id, int Flags); 00122 void CALENDAR_GetDate (WM_HWIN hWin, CALENDAR_DATE * pDate); 00123 int CALENDAR_GetDaysOfMonth (CALENDAR_DATE * pDate); 00124 void CALENDAR_GetSel (WM_HWIN hWin, CALENDAR_DATE * pDate); 00125 int CALENDAR_GetWeekday (CALENDAR_DATE * pDate); 00126 void CALENDAR_SetDate (WM_HWIN hWin, CALENDAR_DATE * pDate); 00127 void CALENDAR_SetSel (WM_HWIN hWin, CALENDAR_DATE * pDate); 00128 void CALENDAR_ShowDate (WM_HWIN hWin, CALENDAR_DATE * pDate); 00129 int CALENDAR_AddKey (WM_HWIN hWin, int Key); 00130 00131 /********************************************************************* 00132 * 00133 * Default related 00134 */ 00135 void CALENDAR_SetDefaultBkColor(unsigned Index, GUI_COLOR Color); 00136 void CALENDAR_SetDefaultColor (unsigned Index, GUI_COLOR Color); 00137 void CALENDAR_SetDefaultDays (const char ** apDays); 00138 void CALENDAR_SetDefaultFont (unsigned Index, const GUI_FONT * pFont); 00139 void CALENDAR_SetDefaultMonths (const char ** apMonths); 00140 void CALENDAR_SetDefaultSize (unsigned Index, unsigned Size); 00141 00142 /********************************************************************* 00143 * 00144 * Skinning related 00145 */ 00146 void CALENDAR_GetSkinFlexProps (CALENDAR_SKINFLEX_PROPS * pProps, int Index); 00147 void CALENDAR_SetSkinFlexProps (const CALENDAR_SKINFLEX_PROPS * pProps, int Index); 00148 00149 /********************************************************************* 00150 * 00151 * The callback ... 00152 * 00153 * Do not call it directly ! It is only to be used from within an 00154 * overwritten callback. 00155 */ 00156 void CALENDAR_Callback(WM_MESSAGE * pMsg); 00157 00158 #if defined(__cplusplus) 00159 } 00160 #endif 00161 00162 #endif // GUI_WINSUPPORT 00163 #endif // CALENDAR_H 00164 00165 /*************************** End of file ****************************/
Generated on Thu Jul 14 2022 12:58:39 by
