Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
RADIO.h
00001 /********************************************************************* 00002 * SEGGER Software GmbH * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2018 SEGGER Microcontroller GmbH * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.48 - 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 by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan 00019 for the purposes of creating libraries for its 00020 Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation 00021 under the terms and conditions of an End User 00022 License Agreement supplied with the libraries. 00023 Full source code is available at: www.segger.com 00024 00025 We appreciate your understanding and fairness. 00026 ---------------------------------------------------------------------- 00027 Licensing information 00028 Licensor: SEGGER Software GmbH 00029 Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan 00030 Licensed SEGGER software: emWin 00031 License number: GUI-00735 00032 License model: emWin License Agreement, signed February 27, 2018 00033 Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation 00034 ---------------------------------------------------------------------- 00035 Support and Update Agreement (SUA) 00036 SUA period: 2018-03-26 - 2019-03-27 00037 Contact to extend SUA: sales@segger.com 00038 ---------------------------------------------------------------------- 00039 File : RADIO.h 00040 Purpose : RADIO include 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef RADIO_H 00045 #define RADIO_H 00046 00047 #include "WM.h" 00048 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ 00049 #include "WIDGET.h" 00050 00051 #if GUI_WINSUPPORT 00052 00053 #if defined(__cplusplus) 00054 extern "C" { /* Make sure we have C-declarations in C++ programs */ 00055 #endif 00056 00057 /********************************************************************* 00058 * 00059 * Bitmap indices 00060 */ 00061 #define RADIO_BI_INACTIV 0 00062 #define RADIO_BI_ACTIV 1 00063 #define RADIO_BI_CHECK 2 00064 00065 /********************************************************************* 00066 * 00067 * Skinning property indices 00068 */ 00069 #define RADIO_SKINFLEX_PI_PRESSED 0 00070 #define RADIO_SKINFLEX_PI_UNPRESSED 1 00071 00072 /********************************************************************* 00073 * 00074 * Defaults for public configuration switches 00075 * 00076 ********************************************************************** 00077 00078 The following are defaults for config switches which affect the 00079 interface specified in this module 00080 */ 00081 00082 /********************************************************************* 00083 * 00084 * Defines 00085 * 00086 ********************************************************************** 00087 */ 00088 #define RADIO_TEXTPOS_RIGHT 0 00089 #define RADIO_TEXTPOS_LEFT WIDGET_STATE_USER0 /* Not implemented, TBD */ 00090 00091 /********************************************************************* 00092 * 00093 * Public Types 00094 * 00095 ********************************************************************** 00096 */ 00097 typedef WM_HMEM RADIO_Handle; 00098 00099 typedef struct { 00100 GUI_COLOR aColorButton[4]; 00101 int ButtonSize; 00102 } RADIO_SKINFLEX_PROPS; 00103 00104 /********************************************************************* 00105 * 00106 * Create functions 00107 * 00108 ********************************************************************** 00109 */ 00110 00111 RADIO_Handle RADIO_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, unsigned Para); 00112 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); 00113 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); 00114 RADIO_Handle RADIO_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00115 00116 /********************************************************************* 00117 * 00118 * The callback ... 00119 * 00120 * Do not call it directly ! It is only to be used from within an 00121 * overwritten callback. 00122 */ 00123 void RADIO_Callback(WM_MESSAGE * pMsg); 00124 00125 /********************************************************************* 00126 * 00127 * Managing default values 00128 * 00129 ********************************************************************** 00130 */ 00131 00132 void RADIO_SetDefaultFont (const GUI_FONT * pFont); 00133 GUI_COLOR RADIO_SetDefaultFocusColor(GUI_COLOR Color); 00134 void RADIO_SetDefaultImage (const GUI_BITMAP * pBitmap, unsigned int Index); 00135 void RADIO_SetDefaultTextColor (GUI_COLOR TextColor); 00136 const GUI_FONT * RADIO_GetDefaultFont (void); 00137 GUI_COLOR RADIO_GetDefaultTextColor (void); 00138 00139 /********************************************************************* 00140 * 00141 * Member functions 00142 * 00143 ********************************************************************** 00144 */ 00145 00146 void RADIO_AddValue (RADIO_Handle hObj, int Add); 00147 void RADIO_Dec (RADIO_Handle hObj); 00148 GUI_COLOR RADIO_GetBkColor (RADIO_Handle hObj); 00149 GUI_COLOR RADIO_GetFocusColor(RADIO_Handle hObj); 00150 const GUI_FONT * RADIO_GetFont (RADIO_Handle hObj); 00151 const GUI_BITMAP * RADIO_GetImage (RADIO_Handle hObj, unsigned int Index); 00152 int RADIO_GetNumItems (RADIO_Handle hObj); 00153 int RADIO_GetText (RADIO_Handle hObj, unsigned Index, char * pBuffer, int MaxLen); 00154 GUI_COLOR RADIO_GetTextColor (RADIO_Handle hObj); 00155 int RADIO_GetUserData (RADIO_Handle hObj, void * pDest, int NumBytes); 00156 void RADIO_Inc (RADIO_Handle hObj); 00157 void RADIO_SetBkColor (RADIO_Handle hObj, GUI_COLOR Color); 00158 GUI_COLOR RADIO_SetFocusColor(RADIO_Handle hObj, GUI_COLOR Color); 00159 void RADIO_SetFont (RADIO_Handle hObj, const GUI_FONT * pFont); 00160 void RADIO_SetGroupId (RADIO_Handle hObj, U8 GroupId); 00161 void RADIO_SetImage (RADIO_Handle hObj, const GUI_BITMAP * pBitmap, unsigned int Index); 00162 void RADIO_SetText (RADIO_Handle hObj, const char* pText, unsigned Index); 00163 void RADIO_SetTextColor (RADIO_Handle hObj, GUI_COLOR Color); 00164 void RADIO_SetValue (RADIO_Handle hObj, int v); 00165 int RADIO_SetUserData (RADIO_Handle hObj, const void * pSrc, int NumBytes); 00166 00167 /********************************************************************* 00168 * 00169 * Member functions: Skinning 00170 * 00171 ********************************************************************** 00172 */ 00173 void RADIO_GetSkinFlexProps (RADIO_SKINFLEX_PROPS * pProps, int Index); 00174 void RADIO_SetSkinClassic (RADIO_Handle hObj); 00175 void RADIO_SetSkin (RADIO_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00176 int RADIO_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); 00177 void RADIO_SetSkinFlexProps (const RADIO_SKINFLEX_PROPS * pProps, int Index); 00178 void RADIO_SetDefaultSkinClassic(void); 00179 WIDGET_DRAW_ITEM_FUNC * RADIO_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00180 00181 #define RADIO_SKIN_FLEX RADIO_DrawSkinFlex 00182 00183 /********************************************************************* 00184 * 00185 * Query state 00186 * 00187 ********************************************************************** 00188 */ 00189 int RADIO_GetValue(RADIO_Handle hObj); 00190 00191 #if defined(__cplusplus) 00192 } 00193 #endif 00194 00195 #endif // GUI_WINSUPPORT 00196 #endif // RADIO_H 00197 00198 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2