STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
GRAPH_Private.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 : GRAPH_Private.h
30 Purpose : GRAPH private header file
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef GRAPH_PRIVATE_H
35 #define GRAPH_PRIVATE_H
36 
37 #include "GRAPH.h"
38 #include "GUI_ARRAY.h"
39 #include "WIDGET.h"
40 
41 #if GUI_WINSUPPORT
42 
43 /*********************************************************************
44 *
45 * Object definition
46 *
47 **********************************************************************
48 */
49 typedef struct GRAPH_OBJ GRAPH_OBJ;
50 typedef struct GRAPH_DATA_OBJ GRAPH_DATA_OBJ;
51 typedef struct GRAPH_SCALE_OBJ GRAPH_SCALE_OBJ;
52 typedef struct GRAPH_PAINT_OBJ GRAPH_PAINT_OBJ;
53 
54 struct GRAPH_PAINT_OBJ {
55  void (* pfOnPaint) (WM_HMEM hObj, GUI_RECT * pRectInvalid); /* Pointer to paint function */
56  void (* pfOnDelete) (WM_HMEM hObj); /* Pointer to delete function */
57  WM_HWIN hGraph; /* Handle of graph widget */
58 };
59 
60 typedef struct {
61  GUI_COLOR TextColor;
62  const GUI_FONT * pFont;
63 } GRAPH_SCALE_PROPS;
64 
65 struct GRAPH_SCALE_OBJ {
66  GRAPH_PAINT_OBJ PaintObj;
67  GRAPH_SCALE_PROPS Props;
68  int Pos;
69  int TextAlign;
70  unsigned TickDist;
71  int Off;
72  U16 Flags;
73  float Factor;
74  int NumDecs;
75 };
76 
77 struct GRAPH_DATA_OBJ {
78  GRAPH_PAINT_OBJ PaintObj;
79  void (* pfInvalidateNewItem)(GRAPH_DATA_OBJ * pDataObj); /* Pointer to a function which can be used for invalidating the required area */
80  unsigned NumItems;
81  unsigned MaxNumItems;
82  GUI_COLOR Color;
83  int OffX, OffY;
84 };
85 
86 typedef struct {
87  GUI_COLOR aColor[4];
88  unsigned GridSpacingX;
89  unsigned GridSpacingY;
90  unsigned GridOffX;
91  unsigned GridOffY;
92  unsigned BorderL;
93  unsigned BorderT;
94  unsigned BorderR;
95  unsigned BorderB;
96 } GRAPH_PROPS;
97 
98 struct GRAPH_OBJ {
99  WIDGET Widget;
100  GRAPH_PROPS Props;
101  GUI_ARRAY GraphArray;
102  GUI_ARRAY ScaleArray;
103  U8 ShowGrid;
104  unsigned RangeX, RangeY;
105  U16 Flags;
106  U8 LineStyleV;
107  U8 LineStyleH;
108  WM_SCROLL_STATE ScrollStateV;
109  WM_SCROLL_STATE ScrollStateH;
110  void (* pUserDraw)(WM_HWIN hObj, int Stage);
111 };
112 
113 /*********************************************************************
114 *
115 * Macros for internal use
116 *
117 **********************************************************************
118 */
119 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
120  #define GRAPH_INIT_ID(p) (p->Widget.DebugId = GRAPH_ID)
121 #else
122  #define GRAPH_INIT_ID(p)
123 #endif
124 
125 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
126  GRAPH_OBJ * GRAPH_LockH(GRAPH_Handle h);
127  #define GRAPH_LOCK_H(h) GRAPH_LockH(h)
128 #else
129  #define GRAPH_LOCK_H(h) (GRAPH_OBJ *)GUI_LOCK_H(h)
130 #endif
131 
132 /*********************************************************************
133 *
134 * Public data (internal defaults)
135 *
136 **********************************************************************
137 */
138 extern GRAPH_PROPS GRAPH__DefaultProps;
139 
140 /*********************************************************************
141 *
142 * Private functions
143 *
144 **********************************************************************
145 */
146 void GRAPH__AddValue (GRAPH_DATA_OBJ * pDataObj, void * pData, void * pValue, int Size);
147 void GRAPH__InvalidateGraph(GRAPH_Handle hObj);
148 
149 #endif /* GUI_WINSUPPORT */
150 #endif /* GRAPH_PRIVATE_H */
Definition: LCD.h:102
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
#define U16
Definition: Global.h:47
#define U8
Definition: Global.h:44