STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
BUTTON_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 : BUTTON_Private.h
30 Purpose : BUTTON private header file
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef BUTTON_PRIVATE_H
35 #define BUTTON_PRIVATE_H
36 
37 #include "WM.h"
38 #include "BUTTON.h"
39 
40 #if GUI_WINSUPPORT
41 
42 /*********************************************************************
43 *
44 * Defines
45 *
46 **********************************************************************
47 */
48 #ifndef BUTTON_3D_MOVE_X
49  #define BUTTON_3D_MOVE_X 1
50 #endif
51 #ifndef BUTTON_3D_MOVE_Y
52  #define BUTTON_3D_MOVE_Y 1
53 #endif
54 
55 /*********************************************************************
56 *
57 * Object definition
58 *
59 **********************************************************************
60 */
61 typedef struct {
62  WIDGET_DRAW_ITEM_FUNC * pfDrawSkin;
63 } BUTTON_SKIN_PRIVATE;
64 
65 typedef struct {
66  GUI_COLOR aBkColor[3];
67  GUI_COLOR aTextColor[3];
68  GUI_COLOR FocusColor;
69  GUI_COLOR FrameColor;
70  const GUI_FONT * pFont;
71  BUTTON_SKIN_PRIVATE SkinPrivate;
72  I16 Align;
73  I16 xPosText, yPosText;
74 } BUTTON_PROPS;
75 
76 typedef struct {
77  WIDGET Widget;
78  BUTTON_PROPS Props;
79  WIDGET_SKIN const * pWidgetSkin;
80  WM_HMEM hpText;
81  WM_HMEM ahDrawObj[3];
82 } BUTTON_Obj;
83 
84 /*********************************************************************
85 *
86 * Macros for internal use
87 *
88 **********************************************************************
89 */
90 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
91  #define BUTTON_INIT_ID(p) (p->Widget.DebugId = BUTTON_ID)
92 #else
93  #define BUTTON_INIT_ID(p)
94 #endif
95 
96 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
97  BUTTON_Obj * BUTTON_LockH(BUTTON_Handle h);
98  #define BUTTON_LOCK_H(h) BUTTON_LockH(h)
99 #else
100  #define BUTTON_LOCK_H(h) (BUTTON_Obj *)GUI_LOCK_H(h)
101 #endif
102 
103 /*********************************************************************
104 *
105 * Public data (internal defaults)
106 *
107 **********************************************************************
108 */
109 extern BUTTON_PROPS BUTTON__DefaultProps;
110 
111 extern const WIDGET_SKIN BUTTON__SkinClassic;
112 extern WIDGET_SKIN BUTTON__Skin;
113 
114 extern WIDGET_SKIN const * BUTTON__pSkinDefault;
115 
116 /*********************************************************************
117 *
118 * Private functions
119 *
120 **********************************************************************
121 */
122 void BUTTON__SetDrawObj(BUTTON_Handle hObj, int Index, GUI_DRAW_HANDLE hDrawObj);
123 
124 
125 #endif /* GUI_WINSUPPORT */
126 #endif /* BUTTON_H */
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
#define I16
Definition: Global.h:56