NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
emwin/emWin_header/CALENDAR.h@0:dd702039127a, 2018-09-20 (annotated)
- Committer:
- alejandroRL
- Date:
- Thu Sep 20 19:16:34 2018 +0000
- Revision:
- 0:dd702039127a
emWin GUI Demo for RT1050
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alejandroRL | 0:dd702039127a | 1 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 2 | * SEGGER Microcontroller GmbH & Co. KG * |
alejandroRL | 0:dd702039127a | 3 | * Solutions for real time microcontroller applications * |
alejandroRL | 0:dd702039127a | 4 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 5 | * * |
alejandroRL | 0:dd702039127a | 6 | * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * |
alejandroRL | 0:dd702039127a | 7 | * * |
alejandroRL | 0:dd702039127a | 8 | * Internet: www.segger.com Support: support@segger.com * |
alejandroRL | 0:dd702039127a | 9 | * * |
alejandroRL | 0:dd702039127a | 10 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 11 | |
alejandroRL | 0:dd702039127a | 12 | ** emWin V5.38 - Graphical user interface for embedded applications ** |
alejandroRL | 0:dd702039127a | 13 | All Intellectual Property rights in the Software belongs to SEGGER. |
alejandroRL | 0:dd702039127a | 14 | emWin is protected by international copyright laws. Knowledge of the |
alejandroRL | 0:dd702039127a | 15 | source code may not be used to write a similar product. This file may |
alejandroRL | 0:dd702039127a | 16 | only be used in accordance with the following terms: |
alejandroRL | 0:dd702039127a | 17 | |
alejandroRL | 0:dd702039127a | 18 | The software has been licensed to NXP Semiconductors USA, Inc. whose |
alejandroRL | 0:dd702039127a | 19 | registered office is situated at 411 E. Plumeria Drive, San Jose, |
alejandroRL | 0:dd702039127a | 20 | CA 95134, USA solely for the purposes of creating libraries for |
alejandroRL | 0:dd702039127a | 21 | NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and |
alejandroRL | 0:dd702039127a | 22 | distributed under the terms and conditions of the NXP End User License |
alejandroRL | 0:dd702039127a | 23 | Agreement. |
alejandroRL | 0:dd702039127a | 24 | Full source code is available at: www.segger.com |
alejandroRL | 0:dd702039127a | 25 | |
alejandroRL | 0:dd702039127a | 26 | We appreciate your understanding and fairness. |
alejandroRL | 0:dd702039127a | 27 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 28 | Licensing information |
alejandroRL | 0:dd702039127a | 29 | |
alejandroRL | 0:dd702039127a | 30 | Licensor: SEGGER Microcontroller Systems LLC |
alejandroRL | 0:dd702039127a | 31 | Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA |
alejandroRL | 0:dd702039127a | 32 | Licensed SEGGER software: emWin |
alejandroRL | 0:dd702039127a | 33 | License number: GUI-00186 |
alejandroRL | 0:dd702039127a | 34 | License model: emWin License Agreement, dated August 20th 2011 |
alejandroRL | 0:dd702039127a | 35 | Licensed product: - |
alejandroRL | 0:dd702039127a | 36 | Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 |
alejandroRL | 0:dd702039127a | 37 | Licensed number of seats: - |
alejandroRL | 0:dd702039127a | 38 | ---------------------------------------------------------------------- |
alejandroRL | 0:dd702039127a | 39 | File : CALENDAR.h |
alejandroRL | 0:dd702039127a | 40 | Purpose : Message box interface |
alejandroRL | 0:dd702039127a | 41 | --------------------END-OF-HEADER------------------------------------- |
alejandroRL | 0:dd702039127a | 42 | */ |
alejandroRL | 0:dd702039127a | 43 | |
alejandroRL | 0:dd702039127a | 44 | #ifndef CALENDAR_H |
alejandroRL | 0:dd702039127a | 45 | #define CALENDAR_H |
alejandroRL | 0:dd702039127a | 46 | |
alejandroRL | 0:dd702039127a | 47 | #include "WM.h" |
alejandroRL | 0:dd702039127a | 48 | |
alejandroRL | 0:dd702039127a | 49 | #if GUI_WINSUPPORT |
alejandroRL | 0:dd702039127a | 50 | |
alejandroRL | 0:dd702039127a | 51 | #if defined(__cplusplus) |
alejandroRL | 0:dd702039127a | 52 | extern "C" { /* Make sure we have C-declarations in C++ programs */ |
alejandroRL | 0:dd702039127a | 53 | #endif |
alejandroRL | 0:dd702039127a | 54 | |
alejandroRL | 0:dd702039127a | 55 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 56 | * |
alejandroRL | 0:dd702039127a | 57 | * Defines |
alejandroRL | 0:dd702039127a | 58 | * |
alejandroRL | 0:dd702039127a | 59 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 60 | */ |
alejandroRL | 0:dd702039127a | 61 | #define CALENDAR_CI_WEEKEND 0 |
alejandroRL | 0:dd702039127a | 62 | #define CALENDAR_CI_WEEKDAY 1 |
alejandroRL | 0:dd702039127a | 63 | #define CALENDAR_CI_SEL 2 |
alejandroRL | 0:dd702039127a | 64 | |
alejandroRL | 0:dd702039127a | 65 | #define CALENDAR_CI_HEADER 3 |
alejandroRL | 0:dd702039127a | 66 | #define CALENDAR_CI_MONTH 4 |
alejandroRL | 0:dd702039127a | 67 | #define CALENDAR_CI_LABEL 5 |
alejandroRL | 0:dd702039127a | 68 | #define CALENDAR_CI_FRAME 6 |
alejandroRL | 0:dd702039127a | 69 | |
alejandroRL | 0:dd702039127a | 70 | #define CALENDAR_FI_CONTENT 0 |
alejandroRL | 0:dd702039127a | 71 | #define CALENDAR_FI_HEADER 1 |
alejandroRL | 0:dd702039127a | 72 | |
alejandroRL | 0:dd702039127a | 73 | #define CALENDAR_SI_HEADER 0 |
alejandroRL | 0:dd702039127a | 74 | #define CALENDAR_SI_CELL_X 1 |
alejandroRL | 0:dd702039127a | 75 | #define CALENDAR_SI_CELL_Y 2 |
alejandroRL | 0:dd702039127a | 76 | |
alejandroRL | 0:dd702039127a | 77 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 78 | * |
alejandroRL | 0:dd702039127a | 79 | * Notification codes |
alejandroRL | 0:dd702039127a | 80 | * |
alejandroRL | 0:dd702039127a | 81 | * The following is the list of notification codes specific to this widget, |
alejandroRL | 0:dd702039127a | 82 | * Send with the WM_NOTIFY_PARENT message |
alejandroRL | 0:dd702039127a | 83 | */ |
alejandroRL | 0:dd702039127a | 84 | #define CALENDAR_NOTIFICATION_MONTH_CLICKED (WM_NOTIFICATION_WIDGET + 0) |
alejandroRL | 0:dd702039127a | 85 | #define CALENDAR_NOTIFICATION_MONTH_RELEASED (WM_NOTIFICATION_WIDGET + 1) |
alejandroRL | 0:dd702039127a | 86 | |
alejandroRL | 0:dd702039127a | 87 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 88 | * |
alejandroRL | 0:dd702039127a | 89 | * Types |
alejandroRL | 0:dd702039127a | 90 | * |
alejandroRL | 0:dd702039127a | 91 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 92 | */ |
alejandroRL | 0:dd702039127a | 93 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 94 | * |
alejandroRL | 0:dd702039127a | 95 | * CALENDAR_DATE |
alejandroRL | 0:dd702039127a | 96 | */ |
alejandroRL | 0:dd702039127a | 97 | typedef struct { |
alejandroRL | 0:dd702039127a | 98 | int Year; |
alejandroRL | 0:dd702039127a | 99 | int Month; |
alejandroRL | 0:dd702039127a | 100 | int Day; |
alejandroRL | 0:dd702039127a | 101 | } CALENDAR_DATE; |
alejandroRL | 0:dd702039127a | 102 | |
alejandroRL | 0:dd702039127a | 103 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 104 | * |
alejandroRL | 0:dd702039127a | 105 | * CALENDAR_SKINFLEX_PROPS |
alejandroRL | 0:dd702039127a | 106 | */ |
alejandroRL | 0:dd702039127a | 107 | typedef struct { |
alejandroRL | 0:dd702039127a | 108 | GUI_COLOR aColorFrame[3]; // Frame colors of buttons |
alejandroRL | 0:dd702039127a | 109 | GUI_COLOR aColorUpper[2]; // Upper gradient colors of buttons |
alejandroRL | 0:dd702039127a | 110 | GUI_COLOR aColorLower[2]; // Lower gradient colors of buttons |
alejandroRL | 0:dd702039127a | 111 | GUI_COLOR ColorArrow; // Arrow colors |
alejandroRL | 0:dd702039127a | 112 | } CALENDAR_SKINFLEX_PROPS; |
alejandroRL | 0:dd702039127a | 113 | |
alejandroRL | 0:dd702039127a | 114 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 115 | * |
alejandroRL | 0:dd702039127a | 116 | * Public code |
alejandroRL | 0:dd702039127a | 117 | * |
alejandroRL | 0:dd702039127a | 118 | ********************************************************************** |
alejandroRL | 0:dd702039127a | 119 | */ |
alejandroRL | 0:dd702039127a | 120 | WM_HWIN CALENDAR_Create (WM_HWIN hParent, int xPos, int yPos, unsigned Year, unsigned Month, unsigned Day, unsigned FirstDayOfWeek, int Id, int Flags); |
alejandroRL | 0:dd702039127a | 121 | void CALENDAR_GetDate (WM_HWIN hWin, CALENDAR_DATE * pDate); |
alejandroRL | 0:dd702039127a | 122 | void CALENDAR_GetSel (WM_HWIN hWin, CALENDAR_DATE * pDate); |
alejandroRL | 0:dd702039127a | 123 | void CALENDAR_SetDate (WM_HWIN hWin, CALENDAR_DATE * pDate); |
alejandroRL | 0:dd702039127a | 124 | void CALENDAR_SetSel (WM_HWIN hWin, CALENDAR_DATE * pDate); |
alejandroRL | 0:dd702039127a | 125 | void CALENDAR_ShowDate (WM_HWIN hWin, CALENDAR_DATE * pDate); |
alejandroRL | 0:dd702039127a | 126 | |
alejandroRL | 0:dd702039127a | 127 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 128 | * |
alejandroRL | 0:dd702039127a | 129 | * Default related |
alejandroRL | 0:dd702039127a | 130 | */ |
alejandroRL | 0:dd702039127a | 131 | void CALENDAR_SetDefaultBkColor(unsigned Index, GUI_COLOR Color); |
alejandroRL | 0:dd702039127a | 132 | void CALENDAR_SetDefaultColor (unsigned Index, GUI_COLOR Color); |
alejandroRL | 0:dd702039127a | 133 | void CALENDAR_SetDefaultDays (const char ** apDays); |
alejandroRL | 0:dd702039127a | 134 | void CALENDAR_SetDefaultFont (unsigned Index, const GUI_FONT * pFont); |
alejandroRL | 0:dd702039127a | 135 | void CALENDAR_SetDefaultMonths (const char ** apMonths); |
alejandroRL | 0:dd702039127a | 136 | void CALENDAR_SetDefaultSize (unsigned Index, unsigned Size); |
alejandroRL | 0:dd702039127a | 137 | |
alejandroRL | 0:dd702039127a | 138 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 139 | * |
alejandroRL | 0:dd702039127a | 140 | * Skinning related |
alejandroRL | 0:dd702039127a | 141 | */ |
alejandroRL | 0:dd702039127a | 142 | void CALENDAR_GetSkinFlexProps (CALENDAR_SKINFLEX_PROPS * pProps, int Index); |
alejandroRL | 0:dd702039127a | 143 | void CALENDAR_SetSkinFlexProps (const CALENDAR_SKINFLEX_PROPS * pProps, int Index); |
alejandroRL | 0:dd702039127a | 144 | |
alejandroRL | 0:dd702039127a | 145 | /********************************************************************* |
alejandroRL | 0:dd702039127a | 146 | * |
alejandroRL | 0:dd702039127a | 147 | * The callback ... |
alejandroRL | 0:dd702039127a | 148 | * |
alejandroRL | 0:dd702039127a | 149 | * Do not call it directly ! It is only to be used from within an |
alejandroRL | 0:dd702039127a | 150 | * overwritten callback. |
alejandroRL | 0:dd702039127a | 151 | */ |
alejandroRL | 0:dd702039127a | 152 | void CALENDAR_Callback(WM_MESSAGE * pMsg); |
alejandroRL | 0:dd702039127a | 153 | |
alejandroRL | 0:dd702039127a | 154 | #if defined(__cplusplus) |
alejandroRL | 0:dd702039127a | 155 | } |
alejandroRL | 0:dd702039127a | 156 | #endif |
alejandroRL | 0:dd702039127a | 157 | |
alejandroRL | 0:dd702039127a | 158 | #endif // GUI_WINSUPPORT |
alejandroRL | 0:dd702039127a | 159 | #endif // CALENDAR_H |
alejandroRL | 0:dd702039127a | 160 | |
alejandroRL | 0:dd702039127a | 161 | /*************************** End of file ****************************/ |