Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
FRAMEWIN_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 : FRAMEWIN_Private.h 00040 Purpose : FRAMEWIN private header file 00041 --------------------END-OF-HEADER------------------------------------- 00042 */ 00043 00044 #ifndef FRAMEWIN_PRIVATE_H 00045 #define FRAMEWIN_PRIVATE_H 00046 00047 #include "WM.h" 00048 #include "FRAMEWIN.h" 00049 #include "WIDGET.h" 00050 #include "GUI_HOOK.h" 00051 00052 #if GUI_WINSUPPORT 00053 00054 /****************************************************************** 00055 * 00056 * Config defaults 00057 * 00058 ******************************************************************* 00059 */ 00060 // 00061 //Support for 3D effects 00062 // 00063 #ifndef FRAMEWIN_CLIENTCOLOR_DEFAULT 00064 #if WIDGET_USE_FLEX_SKIN 00065 #define FRAMEWIN_CLIENTCOLOR_DEFAULT GUI_WHITE 00066 #else 00067 #define FRAMEWIN_CLIENTCOLOR_DEFAULT GUI_GRAY_C0 00068 #endif 00069 #endif 00070 00071 // 00072 // Default for top frame size 00073 // 00074 #ifndef FRAMEWIN_TITLEHEIGHT_DEFAULT 00075 #define FRAMEWIN_TITLEHEIGHT_DEFAULT 0 00076 #endif 00077 00078 // 00079 // Default for left/right/top/bottom frame size 00080 // 00081 #ifndef FRAMEWIN_BORDER_DEFAULT 00082 #define FRAMEWIN_BORDER_DEFAULT 3 00083 #endif 00084 00085 // 00086 // Default for inner frame size 00087 // 00088 #ifndef FRAMEWIN_IBORDER_DEFAULT 00089 #define FRAMEWIN_IBORDER_DEFAULT 1 00090 #endif 00091 00092 // 00093 // Default font 00094 // 00095 #ifndef FRAMEWIN_DEFAULT_FONT 00096 #if WIDGET_USE_FLEX_SKIN 00097 #if WIDGET_USE_SCHEME_SMALL 00098 #define FRAMEWIN_DEFAULT_FONT &GUI_Font13_1 00099 #elif WIDGET_USE_SCHEME_MEDIUM 00100 #define FRAMEWIN_DEFAULT_FONT &GUI_Font16_1 00101 #elif WIDGET_USE_SCHEME_LARGE 00102 #define FRAMEWIN_DEFAULT_FONT &GUI_Font24_1 00103 #endif 00104 #else 00105 #if WIDGET_USE_SCHEME_SMALL 00106 #define FRAMEWIN_DEFAULT_FONT &GUI_Font8_1 00107 #elif WIDGET_USE_SCHEME_MEDIUM 00108 #define FRAMEWIN_DEFAULT_FONT &GUI_Font13_1 00109 #elif WIDGET_USE_SCHEME_LARGE 00110 #define FRAMEWIN_DEFAULT_FONT &GUI_Font16_1 00111 #endif 00112 #endif 00113 #endif 00114 00115 // 00116 // Default bar color when framewin is active 00117 // 00118 #ifndef FRAMEWIN_BARCOLOR_ACTIVE_DEFAULT 00119 #define FRAMEWIN_BARCOLOR_ACTIVE_DEFAULT GUI_BLUE 00120 #endif 00121 00122 // 00123 // Default bar color when framewin is inactive 00124 // 00125 #ifndef FRAMEWIN_BARCOLOR_INACTIVE_DEFAULT 00126 #define FRAMEWIN_BARCOLOR_INACTIVE_DEFAULT GUI_DARKGRAY 00127 #endif 00128 00129 // 00130 // Default frame color 00131 // 00132 #ifndef FRAMEWIN_FRAMECOLOR_DEFAULT 00133 #define FRAMEWIN_FRAMECOLOR_DEFAULT GUI_GRAY_AA 00134 #endif 00135 00136 // 00137 // Default text color when framewin is active 00138 // 00139 #ifndef FRAMEWIN_TEXTCOLOR_INACTIVE_DEFAULT 00140 #if WIDGET_USE_FLEX_SKIN 00141 #define FRAMEWIN_TEXTCOLOR_INACTIVE_DEFAULT GUI_BLACK 00142 #else 00143 #define FRAMEWIN_TEXTCOLOR_INACTIVE_DEFAULT GUI_WHITE 00144 #endif 00145 #endif 00146 00147 // 00148 // Default text color when framewin is inactive 00149 // 00150 #ifndef FRAMEWIN_TEXTCOLOR_ACTIVE_DEFAULT 00151 #if WIDGET_USE_FLEX_SKIN 00152 #define FRAMEWIN_TEXTCOLOR_ACTIVE_DEFAULT GUI_BLACK 00153 #else 00154 #define FRAMEWIN_TEXTCOLOR_ACTIVE_DEFAULT GUI_WHITE 00155 #endif 00156 #endif 00157 00158 // 00159 // Default text alignment 00160 // 00161 #ifndef FRAMEWIN_TEXTALIGN_DEFAULT 00162 #define FRAMEWIN_TEXTALIGN_DEFAULT GUI_TA_LEFT 00163 #endif 00164 00165 /********************************************************************* 00166 * 00167 * Object definition 00168 * 00169 ********************************************************************** 00170 */ 00171 typedef struct { 00172 unsigned (* pfGetBordersize)(FRAMEWIN_Handle hObj, unsigned Index); 00173 WIDGET_DRAW_ITEM_FUNC * pfDrawSkin; 00174 } FRAMEWIN_SKIN_PRIVATE; 00175 00176 typedef struct { 00177 const GUI_FONT * pFont; 00178 GUI_COLOR aBarColor[2]; 00179 GUI_COLOR aTextColor[2]; 00180 GUI_COLOR ClientColor; 00181 FRAMEWIN_SKIN_PRIVATE SkinPrivate; 00182 I16 TitleHeight; 00183 I16 BorderSize; 00184 I16 IBorderSize; 00185 I16 TextAlign; 00186 } FRAMEWIN_PROPS; 00187 00188 typedef struct { 00189 WIDGET Widget; 00190 FRAMEWIN_PROPS Props; 00191 WIDGET_SKIN const * pWidgetSkin; 00192 WIDGET_DRAW_ITEM_FUNC * pfDrawItem; // Only for drawing the title bar... 00193 WM_CALLBACK * cb; 00194 WM_HWIN hClient; 00195 WM_HWIN hMenu; 00196 WM_HWIN hText; 00197 GUI_RECT rRestore; 00198 U16 Flags; 00199 WM_HWIN hFocusedChild; // Handle to focused child .. default none (0) 00200 WM_DIALOG_STATUS * pDialogStatus; 00201 GUI_HOOK * pFirstHook; 00202 } FRAMEWIN_Obj; 00203 00204 typedef struct { 00205 I16 TitleHeight; 00206 I16 MenuHeight; 00207 GUI_RECT rClient; 00208 GUI_RECT rTitleText; 00209 } FRAMEWIN_POSITIONS; 00210 00211 /********************************************************************* 00212 * 00213 * Macros for internal use 00214 * 00215 ********************************************************************** 00216 */ 00217 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00218 #define FRAMEWIN_INIT_ID(p) (p->Widget.DebugId = FRAMEWIN_ID) 00219 #else 00220 #define FRAMEWIN_INIT_ID(p) 00221 #endif 00222 00223 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL 00224 FRAMEWIN_Obj * FRAMEWIN_LockH(FRAMEWIN_Handle h); 00225 #define FRAMEWIN_LOCK_H(h) FRAMEWIN_LockH(h) 00226 #else 00227 #define FRAMEWIN_LOCK_H(h) (FRAMEWIN_Obj *)GUI_LOCK_H(h) 00228 #endif 00229 00230 /********************************************************************* 00231 * 00232 * Public data (internal defaults) 00233 * 00234 ********************************************************************** 00235 */ 00236 extern FRAMEWIN_PROPS FRAMEWIN__DefaultProps; 00237 00238 extern const WIDGET_SKIN FRAMEWIN__SkinClassic; 00239 extern WIDGET_SKIN FRAMEWIN__Skin; 00240 00241 extern const WIDGET_SKIN * FRAMEWIN__pSkinDefault; 00242 00243 /********************************************************************* 00244 * 00245 * Private functions 00246 * 00247 ********************************************************************** 00248 */ 00249 void FRAMEWIN__CalcPositions (FRAMEWIN_Handle hObj, FRAMEWIN_POSITIONS * pPos); 00250 int FRAMEWIN__CalcTitleHeight(FRAMEWIN_Obj * pObj); 00251 void FRAMEWIN__UpdatePositions(FRAMEWIN_Handle hObj); 00252 void FRAMEWIN__UpdateButtons (FRAMEWIN_Handle hObj, int OldHeight, int OldBorderSizeL, int OldBorderSizeR, int OldBorderSizeT); 00253 void FRAMEWIN__GetTitleLimits (FRAMEWIN_Handle hObj, int * pxMin, int * pxMax); 00254 unsigned FRAMEWIN__GetBorderSize (FRAMEWIN_Handle hObj, unsigned Index); 00255 00256 #endif // GUI_WINSUPPORT 00257 #endif // FRAMEWIN_PRIVATE_H 00258 00259 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2