STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
KNOB.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 : KNOB.h
30 Purpose : KNOB include
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef KNOB_H
35 #define KNOB_H
36 
37 #include "WM.h"
38 #include "DIALOG_Intern.h" // Req. for Create indirect data structure
39 #include "WIDGET.h"
40 #include "GUI_Debug.h"
41 
42 #if (GUI_SUPPORT_MEMDEV && GUI_WINSUPPORT)
43 
44 #if defined(__cplusplus)
45  extern "C" { // Make sure we have C-declarations in C++ programs
46 #endif
47 
48 /*********************************************************************
49 *
50 * Public Types
51 *
52 **********************************************************************
53 */
54 typedef WM_HMEM KNOB_Handle;
55 
56 /*********************************************************************
57 *
58 * Create functions
59 *
60 **********************************************************************
61 */
62 KNOB_Handle KNOB_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int Id);
63 KNOB_Handle KNOB_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int Id, int NumExtraBytes);
64 KNOB_Handle KNOB_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
65 
66 /*********************************************************************
67 *
68 * The callback ...
69 *
70 * Do not call it directly ! It is only to be used from within an
71 * overwritten callback.
72 */
73 void KNOB_Callback(WM_MESSAGE * pMsg);
74 
75 /*********************************************************************
76 *
77 * Member functions
78 *
79 **********************************************************************
80 */
81 void KNOB_AddValue (KNOB_Handle hObj, I32 Value);
82 int KNOB_GetUserData(KNOB_Handle hObj, void * pDest, int NumBytes); // Gets user defined data
83 I32 KNOB_GetValue (KNOB_Handle hObj); // Returns the position of the knob in tenth of degree
84 void KNOB_SetBkColor (KNOB_Handle hObj, GUI_COLOR Color); // Sets the BK color of the widget
85 void KNOB_SetBkDevice(KNOB_Handle hObj, GUI_MEMDEV_Handle hMemBk); // Sets the background device
86 void KNOB_SetDevice (KNOB_Handle hObj, GUI_MEMDEV_Handle hMemSrc); // Sets the memory device with the drawn knob
87 void KNOB_SetKeyValue(KNOB_Handle hObj, I32 KeyValue); // Sets the value the knob will rotate on one key press
88 void KNOB_SetOffset (KNOB_Handle hObj, I32 Offset); // Sets the offset angle of the knob
89 void KNOB_SetPeriod (KNOB_Handle hObj, I32 Period); // Sets the period in which the knob stops
90 void KNOB_SetPos (KNOB_Handle hObj, I32 Pos); // Sets position of the knob in tenth of degree
91 void KNOB_SetRange (KNOB_Handle hObj, I32 MinRange, I32 MaxRange); // Sets the usable range of the knob widget
92 void KNOB_SetSnap (KNOB_Handle hObj, I32 Snap); // Sets Snap positions where the knob stops
93 void KNOB_SetTickSize(KNOB_Handle hObj, I32 TickSize); // Sets the ticksize, in 1/10 of degree
94 int KNOB_SetUserData(KNOB_Handle hObj, const void * pSrc, int NumBytes); // Sets user defined data
95 
96 /*********************************************************************
97 *
98 * Global functions
99 *
100 **********************************************************************
101 */
102 
103 #if defined(__cplusplus)
104  }
105 #endif
106 
107 #endif // (GUI_SUPPORT_MEMDEV && GUI_WINSUPPORT)
108 #endif // KNOB_H
109 
110 /*************************** End of file ****************************/
GUI_HMEM GUI_MEMDEV_Handle
Definition: GUI.h:889
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
#define I32
Definition: Global.h:59