STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
HEADER.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 : HEADER.h
30 Purpose : HEADER include
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef HEADER_H
35 #define HEADER_H
36 
37 #include "WM.h"
38 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */
39 #include "WIDGET.h"
40 
41 #if GUI_WINSUPPORT
42 
43 #if defined(__cplusplus)
44  extern "C" { /* Make sure we have C-declarations in C++ programs */
45 #endif
46 
47 /*********************************************************************
48 *
49 * Public Types
50 *
51 **********************************************************************
52 */
53 
54 typedef WM_HMEM HEADER_Handle;
55 
56 typedef struct {
57  GUI_COLOR aColorFrame[2];
58  GUI_COLOR aColorUpper[2];
59  GUI_COLOR aColorLower[2];
60  GUI_COLOR ColorArrow;
61 } HEADER_SKINFLEX_PROPS;
62 
63 /*********************************************************************
64 *
65 * Create functions
66 *
67 **********************************************************************
68 */
69 
70 HEADER_Handle HEADER_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int SpecialFlags);
71 HEADER_Handle HEADER_CreateAttached(WM_HWIN hParent, int Id, int SpecialFlags);
72 HEADER_Handle HEADER_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id);
73 HEADER_Handle HEADER_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes);
74 HEADER_Handle HEADER_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
75 
76 /*********************************************************************
77 *
78 * The callback ...
79 *
80 * Do not call it directly ! It is only to be used from within an
81 * overwritten callback.
82 */
83 void HEADER_Callback(WM_MESSAGE * pMsg);
84 
85 /*********************************************************************
86 *
87 * Standard member functions
88 *
89 **********************************************************************
90 */
91 
92 #define HEADER_EnableMemdev(hObj) WM_EnableMemdev (hObj)
93 #define HEADER_DisableMemdev(hObj) WM_DisableMemdev (hObj)
94 #define HEADER_Delete(hObj) WM_DeleteWindow (hObj)
95 #define HEADER_Paint(hObj) WM_Paint (hObj)
96 #define HEADER_Invalidate(hObj) WM_InvalidateWindow(hObj)
97 
98 /*********************************************************************
99 *
100 * Global functions
101 *
102 **********************************************************************
103 */
104 
105 /* Set defaults */
106 GUI_COLOR HEADER_SetDefaultArrowColor(GUI_COLOR Color);
107 GUI_COLOR HEADER_SetDefaultBkColor (GUI_COLOR Color);
108 const GUI_CURSOR * HEADER_SetDefaultCursor (const GUI_CURSOR * pCursor);
109 const GUI_FONT * HEADER_SetDefaultFont (const GUI_FONT * pFont);
110 int HEADER_SetDefaultBorderH (int Spacing);
111 int HEADER_SetDefaultBorderV (int Spacing);
112 GUI_COLOR HEADER_SetDefaultTextColor (GUI_COLOR Color);
113 
114 /* Get defaults */
115 GUI_COLOR HEADER_GetDefaultArrowColor(void);
116 GUI_COLOR HEADER_GetDefaultBkColor (void);
117 const GUI_CURSOR * HEADER_GetDefaultCursor (void);
118 const GUI_FONT * HEADER_GetDefaultFont (void);
119 int HEADER_GetDefaultBorderH (void);
120 int HEADER_GetDefaultBorderV (void);
121 GUI_COLOR HEADER_GetDefaultTextColor (void);
122 
123 /*********************************************************************
124 *
125 * Member functions
126 *
127 **********************************************************************
128 */
129 void HEADER_AddItem (HEADER_Handle hObj, int Width, const char * s, int Align);
130 void HEADER_DeleteItem (HEADER_Handle hObj, unsigned Index);
131 GUI_COLOR HEADER_GetArrowColor (HEADER_Handle hObj);
132 GUI_COLOR HEADER_GetBkColor (HEADER_Handle hObj);
133 int HEADER_GetHeight (HEADER_Handle hObj);
134 int HEADER_GetItemWidth (HEADER_Handle hObj, unsigned int Index);
135 int HEADER_GetNumItems (HEADER_Handle hObj);
136 int HEADER_GetSel (HEADER_Handle hObj);
137 GUI_COLOR HEADER_GetTextColor (HEADER_Handle hObj);
138 int HEADER_GetUserData (HEADER_Handle hObj, void * pDest, int NumBytes);
139 void HEADER_SetArrowColor (HEADER_Handle hObj, GUI_COLOR Color);
140 void HEADER_SetBitmap (HEADER_Handle hObj, unsigned int Index, const GUI_BITMAP * pBitmap);
141 void HEADER_SetBitmapEx (HEADER_Handle hObj, unsigned int Index, const GUI_BITMAP * pBitmap, int x, int y);
142 void HEADER_SetBkColor (HEADER_Handle hObj, GUI_COLOR Color);
143 void HEADER_SetBMP (HEADER_Handle hObj, unsigned int Index, const void * pBitmap);
144 void HEADER_SetBMPEx (HEADER_Handle hObj, unsigned int Index, const void * pBitmap, int x, int y);
145 void HEADER_SetDirIndicator (HEADER_Handle hObj, int Column, int Reverse); /* !!!Not to be documented!!! */
146 void HEADER_SetDragLimit (HEADER_Handle hObj, unsigned DragLimit);
147 unsigned HEADER_SetFixed (HEADER_Handle hObj, unsigned Fixed);
148 void HEADER_SetFont (HEADER_Handle hObj, const GUI_FONT * pFont);
149 void HEADER_SetHeight (HEADER_Handle hObj, int Height);
150 void HEADER_SetTextAlign (HEADER_Handle hObj, unsigned int Index, int Align);
151 void HEADER_SetItemText (HEADER_Handle hObj, unsigned int Index, const char * s);
152 void HEADER_SetItemWidth (HEADER_Handle hObj, unsigned int Index, int Width);
153 void HEADER_SetScrollPos (HEADER_Handle hObj, int ScrollPos);
154 void HEADER_SetStreamedBitmap (HEADER_Handle hObj, unsigned int Index, const GUI_BITMAP_STREAM * pBitmap);
155 void HEADER_SetStreamedBitmapEx(HEADER_Handle hObj, unsigned int Index, const GUI_BITMAP_STREAM * pBitmap, int x, int y);
156 void HEADER_SetTextColor (HEADER_Handle hObj, GUI_COLOR Color);
157 int HEADER_SetUserData (HEADER_Handle hObj, const void * pSrc, int NumBytes);
158 
159 /*********************************************************************
160 *
161 * Member functions: Skinning
162 *
163 **********************************************************************
164 */
165 void HEADER_GetSkinFlexProps (HEADER_SKINFLEX_PROPS * pProps, int Index);
166 void HEADER_SetSkinClassic (HEADER_Handle hObj);
167 void HEADER_SetSkin (HEADER_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
168 int HEADER_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo);
169 void HEADER_SetSkinFlexProps (const HEADER_SKINFLEX_PROPS * pProps, int Index);
170 void HEADER_SetDefaultSkinClassic(void);
171 WIDGET_DRAW_ITEM_FUNC * HEADER_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
172 
173 #define HEADER_SKIN_FLEX HEADER_DrawSkinFlex
174 
175 /*********************************************************************
176 *
177 * Macros for compatibility with older versions
178 *
179 **********************************************************************
180 */
181 
182 #ifdef HEADER_SPACING_H
183  #define HEADER_BORDER_H_DEFAULT HEADER_SPACING_H
184 #endif
185 #ifdef HEADER_SPACING_V
186  #define HEADER_BORDER_V_DEFAULT HEADER_SPACING_V
187 #endif
188 #define HEADER_SetDefaultSpacingH(Value) HEADER_SetDefaultBorderH(Value)
189 #define HEADER_SetDefaultSpacingV(Value) HEADER_SetDefaultBorderV(Value)
190 #define HEADER_GetDefaultSpacingH() HEADER_GetDefaultBorderH()
191 #define HEADER_GetDefaultSpacingV() HEADER_GetDefaultBorderV()
192 
193 #if defined(__cplusplus)
194  }
195 #endif
196 
197 #endif // GUI_WINSUPPORT
198 #endif // HEADER_H
199 
200 /*************************** End of file ****************************/
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50