NuMaker emWin HMI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PROGBAR_Private.h Source File

PROGBAR_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        : PROGBAR_Private.h
00040 Purpose     : Internal header file
00041 ---------------------------END-OF-HEADER------------------------------
00042 */
00043 
00044 #ifndef PROGBAR_PRIVATE_H
00045 #define PROGBAR_PRIVATE_H
00046 
00047 #include "PROGBAR.h"
00048 #include "WIDGET.h"
00049 
00050 #if GUI_WINSUPPORT
00051 
00052 /*********************************************************************
00053 *
00054 *       Defines
00055 *
00056 **********************************************************************
00057 */
00058 #define PROGBAR_SF_HORIZONTAL PROGBAR_CF_HORIZONTAL
00059 #define PROGBAR_SF_VERTICAL   PROGBAR_CF_VERTICAL
00060 #define PROGBAR_SF_USER       PROGBAR_CF_USER
00061 
00062 /*********************************************************************
00063 *
00064 *       Types
00065 *
00066 **********************************************************************
00067 */
00068 typedef struct {
00069   WIDGET_DRAW_ITEM_FUNC * pfDrawSkin;
00070 } PROGBAR_SKIN_PRIVATE;
00071 
00072 typedef struct {
00073   const GUI_FONT * pFont;
00074   GUI_COLOR aBarColor[2];
00075   GUI_COLOR aTextColor[2];
00076   PROGBAR_SKIN_PRIVATE SkinPrivate;
00077 } PROGBAR_PROPS;
00078 
00079 typedef struct {
00080   WIDGET Widget;
00081   int v;
00082   WM_HMEM hpText;
00083   I16 XOff, YOff;
00084   I16 TextAlign;
00085   int Min, Max;
00086   PROGBAR_PROPS Props;
00087   WIDGET_SKIN const * pWidgetSkin;
00088   U8 Flags;
00089 } PROGBAR_Obj;
00090 
00091 /*********************************************************************
00092 *
00093 *       Macros for internal use
00094 *
00095 **********************************************************************
00096 */
00097 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00098   #define PROGBAR_INIT_ID(p) p->Widget.DebugId = PROGBAR_ID
00099 #else
00100   #define PROGBAR_INIT_ID(p)
00101 #endif
00102 
00103 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00104   PROGBAR_Obj * PROGBAR_LockH(PROGBAR_Handle h);
00105   #define PROGBAR_LOCK_H(h)   PROGBAR_LockH(h)
00106 #else
00107   #define PROGBAR_LOCK_H(h)   (PROGBAR_Obj *)GUI_LOCK_H(h)
00108 #endif
00109 
00110 /*********************************************************************
00111 *
00112 *       Public data (internal defaults)
00113 *
00114 **********************************************************************
00115 */
00116 extern PROGBAR_PROPS PROGBAR__DefaultProps;
00117 
00118 extern const WIDGET_SKIN PROGBAR__SkinClassic;
00119 extern       WIDGET_SKIN PROGBAR__Skin;
00120 
00121 extern WIDGET_SKIN const * PROGBAR__pSkinDefault;
00122 
00123 /*********************************************************************
00124 *
00125 *       Public functions (internal)
00126 *
00127 **********************************************************************
00128 */
00129 char * PROGBAR__GetTextLocked(const PROGBAR_Obj * pObj);
00130 void   PROGBAR__GetTextRect  (const PROGBAR_Obj * pObj, GUI_RECT * pRect, const char * pText);
00131 int    PROGBAR__Value2Pos    (const PROGBAR_Obj * pObj, int v);
00132 
00133 #endif /* GUI_WINSUPPORT */
00134 #endif /* PROGBAR_PRIVATE_H */
00135 
00136 /*************************** End of file ****************************/