Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
PROGBAR.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 : PROGBAR.h 00040 Purpose : Progressbar include 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef PROGBAR_H /* Avoid multiple inclusion */ 00045 #define PROGBAR_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 * Defines 00060 * 00061 ********************************************************************** 00062 */ 00063 /********************************************************************* 00064 * 00065 * Create flags 00066 */ 00067 #define PROGBAR_CF_HORIZONTAL (0 << 0) 00068 #define PROGBAR_CF_VERTICAL (1 << 0) 00069 #define PROGBAR_CF_USER (1 << 1) 00070 00071 /********************************************************************* 00072 * 00073 * Skinning constants 00074 */ 00075 #define PROGBAR_SKINFLEX_L 0 00076 #define PROGBAR_SKINFLEX_R 1 00077 00078 /********************************************************************* 00079 * 00080 * Types 00081 * 00082 ********************************************************************** 00083 */ 00084 typedef WM_HMEM PROGBAR_Handle; 00085 00086 typedef struct { 00087 GUI_COLOR aColorUpperL[2]; 00088 GUI_COLOR aColorLowerL[2]; 00089 GUI_COLOR aColorUpperR[2]; 00090 GUI_COLOR aColorLowerR[2]; 00091 GUI_COLOR ColorFrame; 00092 GUI_COLOR ColorText; 00093 } PROGBAR_SKINFLEX_PROPS; 00094 00095 typedef struct { 00096 int IsVertical; 00097 int Index; 00098 const char * pText; 00099 } PROGBAR_SKINFLEX_INFO; 00100 00101 /********************************************************************* 00102 * 00103 * Create functions 00104 * 00105 ********************************************************************** 00106 */ 00107 00108 PROGBAR_Handle PROGBAR_Create (int x0, int y0, int xSize, int ySize, int Flags); 00109 PROGBAR_Handle PROGBAR_CreateAsChild (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags); 00110 PROGBAR_Handle PROGBAR_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id); 00111 PROGBAR_Handle PROGBAR_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes); 00112 PROGBAR_Handle PROGBAR_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); 00113 00114 /********************************************************************* 00115 * 00116 * The callback ... 00117 * 00118 * Do not call it directly ! It is only to be used from within an 00119 * overwritten callback. 00120 */ 00121 void PROGBAR_Callback(WM_MESSAGE * pMsg); 00122 00123 /********************************************************************* 00124 * 00125 * Individual member functions 00126 * 00127 ********************************************************************** 00128 */ 00129 GUI_COLOR PROGBAR_GetBarColor(PROGBAR_Handle hObj, unsigned int Index); 00130 const GUI_FONT * PROGBAR_GetFont (PROGBAR_Handle hObj); 00131 void PROGBAR_GetMinMax (PROGBAR_Handle hObj, int * pMin, int * pMax); 00132 int PROGBAR_GetUserData (PROGBAR_Handle hObj, void * pDest, int NumBytes); 00133 GUI_COLOR PROGBAR_GetTextColor(PROGBAR_Handle hObj, unsigned int Index); 00134 int PROGBAR_GetValue (PROGBAR_Handle hObj); 00135 void PROGBAR_SetBarColor (PROGBAR_Handle hObj, unsigned int index, GUI_COLOR color); 00136 void PROGBAR_SetFont (PROGBAR_Handle hObj, const GUI_FONT * pfont); 00137 void PROGBAR_SetMinMax (PROGBAR_Handle hObj, int Min, int Max); 00138 void PROGBAR_SetText (PROGBAR_Handle hObj, const char* s); 00139 void PROGBAR_SetTextAlign(PROGBAR_Handle hObj, int Align); 00140 void PROGBAR_SetTextColor(PROGBAR_Handle hObj, unsigned int index, GUI_COLOR color); 00141 void PROGBAR_SetTextPos (PROGBAR_Handle hObj, int XOff, int YOff); 00142 void PROGBAR_SetValue (PROGBAR_Handle hObj, int v); 00143 int PROGBAR_SetUserData (PROGBAR_Handle hObj, const void * pSrc, int NumBytes); 00144 00145 /********************************************************************* 00146 * 00147 * Member functions: Skinning 00148 * 00149 ********************************************************************** 00150 */ 00151 void PROGBAR_GetSkinFlexProps (PROGBAR_SKINFLEX_PROPS * pProps, int Index); 00152 void PROGBAR_SetSkinClassic (PROGBAR_Handle hObj); 00153 void PROGBAR_SetSkin (PROGBAR_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00154 int PROGBAR_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); 00155 void PROGBAR_SetSkinFlexProps (const PROGBAR_SKINFLEX_PROPS * pProps, int Index); 00156 void PROGBAR_SetDefaultSkinClassic(void); 00157 WIDGET_DRAW_ITEM_FUNC * PROGBAR_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin); 00158 00159 #define PROGBAR_SKIN_FLEX PROGBAR_DrawSkinFlex 00160 00161 #if defined(__cplusplus) 00162 } 00163 #endif 00164 00165 #endif // GUI_WINSUPPORT 00166 #endif // PROGBAR_H 00167 00168 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2