Andrew Reed / Mbed OS CITY1082-i2c_master_wifi_mqtt
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PROGBAR_Private.h Source File

PROGBAR_Private.h

00001 /*********************************************************************
00002 *                SEGGER Microcontroller 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 to  Cypress Semiconductor Corporation,
00019 whose registered  office is situated  at 198 Champion Ct. San Jose, CA 
00020 95134 USA  solely for the  purposes of creating  libraries for Cypress
00021 PSoC3 and  PSoC5 processor-based devices,  sublicensed and distributed
00022 under  the  terms  and  conditions  of  the  Cypress  End User License
00023 Agreement.
00024 Full source code is available at: www.segger.com
00025 
00026 We appreciate your understanding and fairness.
00027 ----------------------------------------------------------------------
00028 Licensing information
00029 Licensor:                 SEGGER Microcontroller Systems LLC
00030 Licensed to:              Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA
00031 Licensed SEGGER software: emWin
00032 License number:           GUI-00319
00033 License model:            Services and License Agreement, signed June 10th, 2009
00034 Licensed platform:        Any Cypress platform (Initial targets are: PSoC3, PSoC5)
00035 ----------------------------------------------------------------------
00036 Support and Update Agreement (SUA)
00037 SUA period:               2009-06-12 - 2022-07-27
00038 Contact to extend SUA:    sales@segger.com
00039 ----------------------------------------------------------------------
00040 File        : PROGBAR_Private.h
00041 Purpose     : Internal header file
00042 ---------------------------END-OF-HEADER------------------------------
00043 */
00044 
00045 #ifndef PROGBAR_PRIVATE_H
00046 #define PROGBAR_PRIVATE_H
00047 
00048 #include "PROGBAR.h"
00049 #include "WIDGET.h"
00050 
00051 #if GUI_WINSUPPORT
00052 
00053 /*********************************************************************
00054 *
00055 *       Defines
00056 *
00057 **********************************************************************
00058 */
00059 #define PROGBAR_SF_HORIZONTAL PROGBAR_CF_HORIZONTAL
00060 #define PROGBAR_SF_VERTICAL   PROGBAR_CF_VERTICAL
00061 #define PROGBAR_SF_USER       PROGBAR_CF_USER
00062 
00063 /*********************************************************************
00064 *
00065 *       Types
00066 *
00067 **********************************************************************
00068 */
00069 typedef struct {
00070   WIDGET_DRAW_ITEM_FUNC * pfDrawSkin;
00071 } PROGBAR_SKIN_PRIVATE;
00072 
00073 typedef struct {
00074   const GUI_FONT * pFont;
00075   GUI_COLOR aBarColor[2];
00076   GUI_COLOR aTextColor[2];
00077   PROGBAR_SKIN_PRIVATE SkinPrivate;
00078 } PROGBAR_PROPS;
00079 
00080 typedef struct {
00081   WIDGET Widget;
00082   int v;
00083   WM_HMEM hpText;
00084   I16 XOff, YOff;
00085   I16 TextAlign;
00086   int Min, Max;
00087   PROGBAR_PROPS Props;
00088   WIDGET_SKIN const * pWidgetSkin;
00089   U8 Flags;
00090 } PROGBAR_Obj;
00091 
00092 /*********************************************************************
00093 *
00094 *       Macros for internal use
00095 *
00096 **********************************************************************
00097 */
00098 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00099   #define PROGBAR_INIT_ID(p) p->Widget.DebugId = PROGBAR_ID
00100 #else
00101   #define PROGBAR_INIT_ID(p)
00102 #endif
00103 
00104 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00105   PROGBAR_Obj * PROGBAR_LockH(PROGBAR_Handle h);
00106   #define PROGBAR_LOCK_H(h)   PROGBAR_LockH(h)
00107 #else
00108   #define PROGBAR_LOCK_H(h)   (PROGBAR_Obj *)GUI_LOCK_H(h)
00109 #endif
00110 
00111 /*********************************************************************
00112 *
00113 *       Public data (internal defaults)
00114 *
00115 **********************************************************************
00116 */
00117 extern PROGBAR_PROPS PROGBAR__DefaultProps;
00118 
00119 extern const WIDGET_SKIN PROGBAR__SkinClassic;
00120 extern       WIDGET_SKIN PROGBAR__Skin;
00121 
00122 extern WIDGET_SKIN const * PROGBAR__pSkinDefault;
00123 
00124 /*********************************************************************
00125 *
00126 *       Public functions (internal)
00127 *
00128 **********************************************************************
00129 */
00130 char * PROGBAR__GetTextLocked(const PROGBAR_Obj * pObj);
00131 void   PROGBAR__GetTextRect  (const PROGBAR_Obj * pObj, GUI_RECT * pRect, const char * pText);
00132 int    PROGBAR__Value2Pos    (const PROGBAR_Obj * pObj, int v);
00133 
00134 #endif /* GUI_WINSUPPORT */
00135 #endif /* PROGBAR_PRIVATE_H */
00136 
00137 /*************************** End of file ****************************/