Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
GRAPH_Private.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 : GRAPH_Private.h 00040 Purpose : GRAPH private header file 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef GRAPH_PRIVATE_H 00045 #define GRAPH_PRIVATE_H 00046 00047 #include "GRAPH.h" 00048 #include "GUI_ARRAY.h" 00049 #include "WIDGET.h" 00050 00051 #if GUI_WINSUPPORT 00052 00053 /********************************************************************* 00054 * 00055 * Object definition 00056 * 00057 ********************************************************************** 00058 */ 00059 typedef struct GRAPH_OBJ GRAPH_OBJ; 00060 typedef struct GRAPH_DATA_OBJ GRAPH_DATA_OBJ; 00061 typedef struct GRAPH_SCALE_OBJ GRAPH_SCALE_OBJ; 00062 typedef struct GRAPH_PAINT_OBJ GRAPH_PAINT_OBJ; 00063 00064 struct GRAPH_PAINT_OBJ { 00065 void (* pfOnPaint) (WM_HMEM hObj, GUI_RECT * pRectInvalid); /* Pointer to paint function */ 00066 void (* pfOnDelete) (WM_HMEM hObj); /* Pointer to delete function */ 00067 WM_HWIN hGraph; /* Handle of graph widget */ 00068 }; 00069 00070 typedef struct { 00071 GUI_COLOR TextColor; 00072 const GUI_FONT * pFont; 00073 } GRAPH_SCALE_PROPS; 00074 00075 struct GRAPH_SCALE_OBJ { 00076 GRAPH_PAINT_OBJ PaintObj; 00077 GRAPH_SCALE_PROPS Props; 00078 int Pos; 00079 int TextAlign; 00080 unsigned TickDist; 00081 int Off; 00082 U16 Flags; 00083 float Factor; 00084 int NumDecs; 00085 }; 00086 00087 struct GRAPH_DATA_OBJ { 00088 GRAPH_PAINT_OBJ PaintObj; 00089 void (* pfInvalidateNewItem)(GRAPH_DATA_OBJ * pDataObj); /* Pointer to a function which can be used for invalidating the required area */ 00090 unsigned NumItems; 00091 unsigned MaxNumItems; 00092 GUI_COLOR Color; 00093 int OffX, OffY; 00094 }; 00095 00096 typedef struct { 00097 GUI_COLOR aColor[4]; 00098 unsigned GridSpacingX; 00099 unsigned GridSpacingY; 00100 unsigned GridOffX; 00101 unsigned GridOffY; 00102 unsigned BorderL; 00103 unsigned BorderT; 00104 unsigned BorderR; 00105 unsigned BorderB; 00106 } GRAPH_PROPS; 00107 00108 struct GRAPH_OBJ { 00109 WIDGET Widget; 00110 GRAPH_PROPS Props; 00111 GUI_ARRAY GraphArray; 00112 GUI_ARRAY ScaleArray; 00113 U8 ShowGrid; 00114 unsigned RangeX, RangeY; 00115 U16 Flags; 00116 U8 LineStyleV; 00117 U8 LineStyleH; 00118 WM_SCROLL_STATE ScrollStateV; 00119 WM_SCROLL_STATE ScrollStateH; 00120 void (* pUserDraw)(WM_HWIN hObj, int Stage); 00121 }; 00122 00123 /********************************************************************* 00124 * 00125 * Macros for internal use 00126 * 00127 ********************************************************************** 00128 */ 00129 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00130 #define GRAPH_INIT_ID(p) (p->Widget.DebugId = GRAPH_ID) 00131 #else 00132 #define GRAPH_INIT_ID(p) 00133 #endif 00134 00135 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00136 GRAPH_OBJ * GRAPH_LockH(GRAPH_Handle h); 00137 #define GRAPH_LOCK_H(h) GRAPH_LockH(h) 00138 #else 00139 #define GRAPH_LOCK_H(h) (GRAPH_OBJ *)GUI_LOCK_H(h) 00140 #endif 00141 00142 /********************************************************************* 00143 * 00144 * Public data (internal defaults) 00145 * 00146 ********************************************************************** 00147 */ 00148 extern GRAPH_PROPS GRAPH__DefaultProps; 00149 00150 /********************************************************************* 00151 * 00152 * Private functions 00153 * 00154 ********************************************************************** 00155 */ 00156 void GRAPH__AddValue (GRAPH_DATA_OBJ * pDataObj, void * pData, void * pValue, int Size); 00157 int GRAPH__GetValue (GRAPH_DATA_OBJ * pDataObj, void * pData, void * pValue, int Size, U32 Index); 00158 void GRAPH__InvalidateGraph(GRAPH_Handle hObj); 00159 00160 #endif /* GUI_WINSUPPORT */ 00161 #endif /* GRAPH_PRIVATE_H */ 00162 00163 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2