Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
SPINBOX_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 : SPINBOX_Private.h 00040 Purpose : Private SPINBOX include 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef SPINBOX_PRIVATE_H 00045 #define SPINBOX_PRIVATE_H 00046 00047 #include "SPINBOX.h" 00048 #include "EDIT.h" 00049 #include "GUI_Private.h" 00050 00051 #if GUI_WINSUPPORT 00052 00053 /********************************************************************* 00054 * 00055 * Private config defaults 00056 * 00057 ********************************************************************** 00058 */ 00059 00060 /********************************************************************* 00061 * 00062 * Object definition 00063 * 00064 ********************************************************************** 00065 */ 00066 typedef struct { 00067 WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 00068 } SPINBOX_SKIN_PRIVATE; 00069 00070 typedef struct { 00071 GUI_COLOR aButtonBkColor[3]; // Button background color for the states (disabled, pressed, unpressed). 00072 GUI_COLOR aButtonUpperColor[3]; // Upper color for the button states (disabled, pressed, unpressed). 00073 GUI_COLOR aButtonLowerColor[3]; // Lower color for the button states (disabled, pressed, unpressed). 00074 GUI_COLOR aButtonOuterColor[3]; // Outer color for the button states (disabled, pressed, unpressed). 00075 GUI_COLOR aTriangleColor[3]; // Color of the triangle for the button states (disabled, pressed, unpressed). 00076 GUI_COLOR aBkColor[2]; // Background color for the states (enabled, disabled). 00077 GUI_COLOR aTextColor[2]; // Text color for the states (enabled, disabled). 00078 I32 Min; // Minimum allowed value. 00079 I32 Max; // Maximum allowed value. 00080 U16 Step; // Value will be increased/decreased by this amount when a button is clicked. 00081 U16 ButtonSize; // Size of the button depending on the orientation. 00082 U8 Edge; // Buttons reside on the left or right edge of the widget. 00083 SPINBOX_SKIN_PRIVATE SkinPrivate; // Structure containing a pointer to the used DrawSkin-function. 00084 } SPINBOX_PROPS; 00085 00086 typedef struct { 00087 WIDGET Widget; 00088 SPINBOX_PROPS Props; 00089 const WIDGET_SKIN * pWidgetSkin; 00090 EDIT_Handle hEdit; 00091 GUI_TIMER_HANDLE hTimer; 00092 I8 TimerButton; 00093 I8 LastButton; 00094 I8 NoAction; 00095 U8 State; // Pressed state 00096 } SPINBOX_OBJ; 00097 00098 /********************************************************************* 00099 * 00100 * Macros for internal use 00101 * 00102 ********************************************************************** 00103 */ 00104 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00105 #define SPINBOX_INIT_ID(p) (p->Widget.DebugId = SPINBOX_ID) 00106 #else 00107 #define SPINBOX_INIT_ID(p) 00108 #endif 00109 00110 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00111 SPINBOX_OBJ * SPINBOX_LockH(SPINBOX_Handle h); 00112 #define SPINBOX_LOCK_H(h) SPINBOX_LockH(h) 00113 #else 00114 #define SPINBOX_LOCK_H(h) (SPINBOX_OBJ *)GUI_LOCK_H(h) 00115 #endif 00116 00117 #define SPINBOX_BUTTON_NONE -1 00118 #define SPINBOX_BUTTON_0 0 00119 #define SPINBOX_BUTTON_1 1 00120 00121 #define SPINBOX_TIMER_ID 1234 00122 00123 /********************************************************************* 00124 * 00125 * Private function prototypes 00126 * 00127 ********************************************************************** 00128 */ 00129 void SPINBOX__ApplyProps (SPINBOX_Handle hObj, SPINBOX_SKINFLEX_PROPS * const * ppProps); 00130 void SPINBOX__DrawBk (SPINBOX_Handle hObj, GUI_COLOR Color); 00131 void SPINBOX__GetButtonRect (SPINBOX_Handle hObj, GUI_RECT * pButtonRect, U8 ButtonIndex); 00132 void SPINBOX__GetButtonRectEx(SPINBOX_Handle hObj, WIDGET_ITEM_DRAW_INFO * ItemInfo); 00133 int SPINBOX__GetDefaultMax (void); 00134 int SPINBOX__GetDefaultMin (void); 00135 00136 /********************************************************************* 00137 * 00138 * Module internal data 00139 * 00140 ********************************************************************** 00141 */ 00142 /********************************************************************* 00143 * 00144 * Public data (internal defaults) 00145 * 00146 ********************************************************************** 00147 */ 00148 extern SPINBOX_PROPS SPINBOX__DefaultProps; 00149 extern const WIDGET_SKIN SPINBOX__SkinClassic; 00150 extern WIDGET_SKIN SPINBOX__Skin; 00151 extern const WIDGET_SKIN * SPINBOX__pSkinDefault; 00152 00153 #endif // GUI_WINSUPPORT 00154 #endif // SPINBOX_PRIVATE_H 00155 00156 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2