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