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