STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
RADIO.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 : RADIO.h
30 Purpose : RADIO include
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef RADIO_H
35 #define RADIO_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 * Bitmap indices
50 */
51 #define RADIO_BI_INACTIV 0
52 #define RADIO_BI_ACTIV 1
53 #define RADIO_BI_CHECK 2
54 
55 /*********************************************************************
56 *
57 * Skinning property indices
58 */
59 #define RADIO_SKINFLEX_PI_PRESSED 0
60 #define RADIO_SKINFLEX_PI_UNPRESSED 1
61 
62 /*********************************************************************
63 *
64 * Defaults for public configuration switches
65 *
66 **********************************************************************
67 
68 The following are defaults for config switches which affect the
69 interface specified in this module
70 */
71 
72 /*********************************************************************
73 *
74 * Defines
75 *
76 **********************************************************************
77 */
78 #define RADIO_TEXTPOS_RIGHT 0
79 #define RADIO_TEXTPOS_LEFT WIDGET_STATE_USER0 /* Not implemented, TBD */
80 
81 /*********************************************************************
82 *
83 * Public Types
84 *
85 **********************************************************************
86 */
87 typedef WM_HMEM RADIO_Handle;
88 
89 typedef struct {
90  GUI_COLOR aColorButton[4];
91  int ButtonSize;
92 } RADIO_SKINFLEX_PROPS;
93 
94 /*********************************************************************
95 *
96 * Create functions
97 *
98 **********************************************************************
99 */
100 
101 RADIO_Handle RADIO_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, unsigned Para);
102 RADIO_Handle RADIO_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumItems, int Spacing);
103 RADIO_Handle RADIO_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumItems, int Spacing, int NumExtraBytes);
104 RADIO_Handle RADIO_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
105 
106 /*********************************************************************
107 *
108 * The callback ...
109 *
110 * Do not call it directly ! It is only to be used from within an
111 * overwritten callback.
112 */
113 void RADIO_Callback(WM_MESSAGE * pMsg);
114 
115 /*********************************************************************
116 *
117 * Standard member functions
118 *
119 **********************************************************************
120 */
121 
122 void RADIO_SetDefaultFont (const GUI_FONT * pFont);
123 GUI_COLOR RADIO_SetDefaultFocusColor(GUI_COLOR Color);
124 void RADIO_SetDefaultImage (const GUI_BITMAP * pBitmap, unsigned int Index);
125 void RADIO_SetDefaultTextColor (GUI_COLOR TextColor);
126 
127 const GUI_FONT * RADIO_GetDefaultFont (void);
128 GUI_COLOR RADIO_GetDefaultTextColor (void);
129 
130 /*********************************************************************
131 *
132 * Member functions
133 *
134 **********************************************************************
135 */
136 
137 void RADIO_AddValue (RADIO_Handle hObj, int Add);
138 void RADIO_Dec (RADIO_Handle hObj);
139 int RADIO_GetText (RADIO_Handle hObj, unsigned Index, char * pBuffer, int MaxLen);
140 int RADIO_GetUserData (RADIO_Handle hObj, void * pDest, int NumBytes);
141 void RADIO_Inc (RADIO_Handle hObj);
142 void RADIO_SetBkColor (RADIO_Handle hObj, GUI_COLOR Color);
143 GUI_COLOR RADIO_SetFocusColor(RADIO_Handle hObj, GUI_COLOR Color);
144 void RADIO_SetFont (RADIO_Handle hObj, const GUI_FONT * pFont);
145 void RADIO_SetGroupId (RADIO_Handle hObj, U8 GroupId);
146 void RADIO_SetImage (RADIO_Handle hObj, const GUI_BITMAP * pBitmap, unsigned int Index);
147 void RADIO_SetText (RADIO_Handle hObj, const char* pText, unsigned Index);
148 void RADIO_SetTextColor (RADIO_Handle hObj, GUI_COLOR Color);
149 void RADIO_SetValue (RADIO_Handle hObj, int v);
150 int RADIO_SetUserData (RADIO_Handle hObj, const void * pSrc, int NumBytes);
151 
152 const GUI_BITMAP * RADIO_GetImage(RADIO_Handle hObj, unsigned int Index);
153 
154 /*********************************************************************
155 *
156 * Member functions: Skinning
157 *
158 **********************************************************************
159 */
160 void RADIO_GetSkinFlexProps (RADIO_SKINFLEX_PROPS * pProps, int Index);
161 void RADIO_SetSkinClassic (RADIO_Handle hObj);
162 void RADIO_SetSkin (RADIO_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
163 int RADIO_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo);
164 void RADIO_SetSkinFlexProps (const RADIO_SKINFLEX_PROPS * pProps, int Index);
165 void RADIO_SetDefaultSkinClassic(void);
166 WIDGET_DRAW_ITEM_FUNC * RADIO_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
167 
168 #define RADIO_SKIN_FLEX RADIO_DrawSkinFlex
169 
170 /*********************************************************************
171 *
172 * Query state
173 *
174 **********************************************************************
175 */
176 int RADIO_GetValue(RADIO_Handle hObj);
177 
178 #if defined(__cplusplus)
179  }
180 #endif
181 
182 #endif // GUI_WINSUPPORT
183 #endif // RADIO_H
184 
185 /*************************** End of file ****************************/
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
#define U8
Definition: Global.h:44