NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
Embed:
(wiki syntax)
Show/hide line numbers
RADIO_Private.h
00001 /********************************************************************* 00002 * SEGGER Microcontroller GmbH & Co. KG * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2016 SEGGER Microcontroller GmbH & Co. KG * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.38 - Graphical user interface for embedded applications ** 00013 All Intellectual Property rights in the Software belongs to SEGGER. 00014 emWin is protected by international copyright laws. Knowledge of the 00015 source code may not be used to write a similar product. This file may 00016 only be used in accordance with the following terms: 00017 00018 The software has been licensed to NXP Semiconductors USA, Inc. whose 00019 registered office is situated at 411 E. Plumeria Drive, San Jose, 00020 CA 95134, USA solely for the purposes of creating libraries for 00021 NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and 00022 distributed under the terms and conditions of the NXP End User License 00023 Agreement. 00024 Full source code is available at: www.segger.com 00025 00026 We appreciate your understanding and fairness. 00027 ---------------------------------------------------------------------- 00028 Licensing information 00029 00030 Licensor: SEGGER Microcontroller Systems LLC 00031 Licensed to: NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA 00032 Licensed SEGGER software: emWin 00033 License number: GUI-00186 00034 License model: emWin License Agreement, dated August 20th 2011 00035 Licensed product: - 00036 Licensed platform: NXP's ARM 7/9, Cortex-M0,M3,M4 00037 Licensed number of seats: - 00038 ---------------------------------------------------------------------- 00039 File : RADIO_Private.h 00040 Purpose : RADIO private header file 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef RADIO_PRIVATE_H 00045 #define RADIO_PRIVATE_H 00046 00047 #include "WM.h" 00048 00049 #if GUI_WINSUPPORT 00050 00051 #include "RADIO.h" 00052 #include "WIDGET.h" 00053 #include "GUI_ARRAY.h" 00054 00055 /********************************************************************* 00056 * 00057 * Defines 00058 * 00059 ********************************************************************** 00060 */ 00061 /* Define default image inactiv */ 00062 #ifndef RADIO_IMAGE0_DEFAULT 00063 #define RADIO_IMAGE0_DEFAULT &RADIO__abmRadio[0] 00064 #endif 00065 00066 /* Define default image activ */ 00067 #ifndef RADIO_IMAGE1_DEFAULT 00068 #define RADIO_IMAGE1_DEFAULT &RADIO__abmRadio[1] 00069 #endif 00070 00071 /* Define default image check */ 00072 #ifndef RADIO_IMAGE_CHECK_DEFAULT 00073 #define RADIO_IMAGE_CHECK_DEFAULT &RADIO__bmCheck 00074 #endif 00075 00076 /* Define default font */ 00077 #ifndef RADIO_FONT_DEFAULT 00078 #if WIDGET_USE_SCHEME_SMALL 00079 #define RADIO_SPACING_DEFAULT 20 00080 #define RADIO_FONT_DEFAULT &GUI_Font13_1 00081 #elif WIDGET_USE_SCHEME_MEDIUM 00082 #define RADIO_SPACING_DEFAULT 24 00083 #define RADIO_FONT_DEFAULT &GUI_Font16_1 00084 #elif WIDGET_USE_SCHEME_LARGE 00085 #define RADIO_SPACING_DEFAULT 30 00086 #define RADIO_FONT_DEFAULT &GUI_Font24_1 00087 #endif 00088 #endif 00089 00090 /* Define vertical default spacing */ 00091 #ifndef RADIO_SPACING_DEFAULT 00092 #define RADIO_SPACING_DEFAULT 20 00093 #endif 00094 00095 /* Define default text color */ 00096 #ifndef RADIO_DEFAULT_TEXT_COLOR 00097 #define RADIO_DEFAULT_TEXT_COLOR GUI_BLACK 00098 #endif 00099 00100 /* Define default background color */ 00101 #ifndef RADIO_DEFAULT_BKCOLOR 00102 #define RADIO_DEFAULT_BKCOLOR GUI_GRAY_C0 00103 #endif 00104 00105 #ifndef RADIO_FOCUSCOLOR_DEFAULT 00106 #define RADIO_FOCUSCOLOR_DEFAULT GUI_BLACK 00107 #endif 00108 00109 #define RADIO_BORDER 2 00110 00111 /********************************************************************* 00112 * 00113 * Object definition 00114 * 00115 ********************************************************************** 00116 */ 00117 typedef struct { 00118 unsigned (* pfGetButtonSize)(RADIO_Handle hObj); 00119 WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 00120 } RADIO_SKIN_PRIVATE; 00121 00122 typedef struct { 00123 GUI_COLOR BkColor; 00124 GUI_COLOR TextColor; 00125 GUI_COLOR FocusColor; 00126 const GUI_FONT * pFont; 00127 const GUI_BITMAP * apBmRadio[2]; 00128 const GUI_BITMAP * pBmCheck; 00129 RADIO_SKIN_PRIVATE SkinPrivate; 00130 } RADIO_PROPS; 00131 00132 typedef struct { 00133 WIDGET Widget; 00134 RADIO_PROPS Props; 00135 WIDGET_SKIN const * pWidgetSkin; 00136 GUI_ARRAY TextArray; 00137 I16 Sel; /* current selection */ 00138 U16 Spacing; 00139 U16 NumItems; 00140 U8 GroupId; 00141 } RADIO_Obj; 00142 00143 /********************************************************************* 00144 * 00145 * Macros for internal use 00146 * 00147 ********************************************************************** 00148 */ 00149 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00150 #define RADIO_INIT_ID(p) p->Widget.DebugId = RADIO_ID 00151 #else 00152 #define RADIO_INIT_ID(p) 00153 #endif 00154 00155 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00156 RADIO_Obj * RADIO_LockH(RADIO_Handle h); 00157 #define RADIO_LOCK_H(h) RADIO_LockH(h) 00158 #else 00159 #define RADIO_LOCK_H(h) (RADIO_Obj *)GUI_LOCK_H(h) 00160 #endif 00161 00162 /********************************************************************* 00163 * 00164 * Types 00165 * 00166 ********************************************************************** 00167 */ 00168 00169 typedef void tRADIO_SetValue(RADIO_Handle hObj, int v); 00170 00171 /********************************************************************* 00172 * 00173 * Extern data 00174 * 00175 ********************************************************************** 00176 */ 00177 00178 extern RADIO_PROPS RADIO__DefaultProps; 00179 00180 extern const WIDGET_SKIN RADIO__SkinClassic; 00181 extern WIDGET_SKIN RADIO__Skin; 00182 00183 extern WIDGET_SKIN const * RADIO__pSkinDefault; 00184 00185 extern const GUI_BITMAP RADIO__abmRadio[2]; 00186 extern const GUI_BITMAP RADIO__bmCheck; 00187 extern tRADIO_SetValue* RADIO__pfHandleSetValue; 00188 00189 /********************************************************************* 00190 * 00191 * public functions (internal) 00192 * 00193 ********************************************************************** 00194 */ 00195 void RADIO__SetValue (RADIO_Handle hObj, int v); 00196 unsigned RADIO__GetButtonSize(RADIO_Handle hObj); 00197 00198 #endif /* GUI_WINSUPPORT */ 00199 #endif /* RADIO_PRIVATE_H */ 00200 00201 /************************* end of file ******************************/
Generated on Tue Jul 12 2022 19:43:37 by 1.7.2