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

« Back to documentation index

Show/hide line numbers HEADER.h Source File

HEADER.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        : HEADER.h
00041 Purpose     : HEADER include
00042 --------------------END-OF-HEADER-------------------------------------
00043 */
00044 
00045 #ifndef HEADER_H
00046 #define HEADER_H
00047 
00048 #include "WM.h"
00049 #include "DIALOG_Intern.h"      /* Req. for Create indirect data structure */
00050 #include "WIDGET.h"
00051 
00052 #if GUI_WINSUPPORT
00053 
00054 #if defined(__cplusplus)
00055   extern "C" {     /* Make sure we have C-declarations in C++ programs */
00056 #endif
00057 
00058 /*********************************************************************
00059 *
00060 *       Public Types
00061 *
00062 **********************************************************************
00063 */
00064 
00065 typedef WM_HMEM HEADER_Handle;
00066 
00067 typedef struct {
00068   GUI_COLOR aColorFrame[2];
00069   GUI_COLOR aColorUpper[2];
00070   GUI_COLOR aColorLower[2];
00071   GUI_COLOR ColorArrow;
00072 } HEADER_SKINFLEX_PROPS;
00073 
00074 /*********************************************************************
00075 *
00076 *       Create functions
00077 *
00078 **********************************************************************
00079 */
00080 
00081 HEADER_Handle HEADER_Create        (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags, int SpecialFlags);
00082 HEADER_Handle HEADER_CreateAttached(WM_HWIN hParent, int Id, int SpecialFlags);
00083 HEADER_Handle HEADER_CreateEx      (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id);
00084 HEADER_Handle HEADER_CreateUser    (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes);
00085 HEADER_Handle HEADER_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
00086 
00087 /*********************************************************************
00088 *
00089 *       The callback ...
00090 *
00091 * Do not call it directly ! It is only to be used from within an
00092 * overwritten callback.
00093 */
00094 void HEADER_Callback(WM_MESSAGE * pMsg);
00095 
00096 /*********************************************************************
00097 *
00098 *       Managing default values
00099 *
00100 **********************************************************************
00101 */
00102 /* Set defaults */
00103 GUI_COLOR          HEADER_SetDefaultArrowColor(GUI_COLOR Color);
00104 GUI_COLOR          HEADER_SetDefaultBkColor   (GUI_COLOR Color);
00105 const GUI_CURSOR * HEADER_SetDefaultCursor    (const GUI_CURSOR * pCursor);
00106 const GUI_FONT *   HEADER_SetDefaultFont      (const GUI_FONT * pFont);
00107 int                HEADER_SetDefaultBorderH   (int Spacing);
00108 int                HEADER_SetDefaultBorderV   (int Spacing);
00109 GUI_COLOR          HEADER_SetDefaultTextColor (GUI_COLOR Color);
00110 
00111 /* Get defaults */
00112 GUI_COLOR          HEADER_GetDefaultArrowColor(void);
00113 GUI_COLOR          HEADER_GetDefaultBkColor   (void);
00114 const GUI_CURSOR * HEADER_GetDefaultCursor    (void);
00115 const GUI_FONT *   HEADER_GetDefaultFont      (void);
00116 int                HEADER_GetDefaultBorderH   (void);
00117 int                HEADER_GetDefaultBorderV   (void);
00118 GUI_COLOR          HEADER_GetDefaultTextColor (void);
00119 
00120 /*********************************************************************
00121 *
00122 *       Member functions
00123 *
00124 **********************************************************************
00125 */
00126 void             HEADER_AddItem            (HEADER_Handle hObj, int Width, const char * s, int Align);
00127 void             HEADER_DeleteItem         (HEADER_Handle hObj, unsigned Index);
00128 GUI_COLOR        HEADER_GetArrowColor      (HEADER_Handle hObj);
00129 GUI_COLOR        HEADER_GetBkColor         (HEADER_Handle hObj);
00130 const GUI_FONT * HEADER_GetFont            (HEADER_Handle hObj);
00131 int              HEADER_GetHeight          (HEADER_Handle hObj);
00132 int              HEADER_GetItemText        (HEADER_Handle hObj, unsigned Index, char * pBuffer, int MaxSize);
00133 int              HEADER_GetItemWidth       (HEADER_Handle hObj, unsigned Index);
00134 int              HEADER_GetNumItems        (HEADER_Handle hObj);
00135 int              HEADER_GetSel             (HEADER_Handle hObj);
00136 GUI_COLOR        HEADER_GetTextColor       (HEADER_Handle hObj);
00137 int              HEADER_GetUserData        (HEADER_Handle hObj, void * pDest, int NumBytes);
00138 void             HEADER_SetArrowColor      (HEADER_Handle hObj, GUI_COLOR Color);
00139 void             HEADER_SetBitmap          (HEADER_Handle hObj, unsigned Index, const GUI_BITMAP * pBitmap);
00140 void             HEADER_SetBitmapEx        (HEADER_Handle hObj, unsigned Index, const GUI_BITMAP * pBitmap, int x, int y);
00141 void             HEADER_SetBkColor         (HEADER_Handle hObj, GUI_COLOR Color);
00142 void             HEADER_SetBMP             (HEADER_Handle hObj, unsigned Index, const void * pBitmap);
00143 void             HEADER_SetBMPEx           (HEADER_Handle hObj, unsigned Index, const void * pBitmap, int x, int y);
00144 void             HEADER_SetDirIndicator    (HEADER_Handle hObj, int Column, int Reverse); /* !!!Not to be documented!!! */
00145 void             HEADER_SetDragLimit       (HEADER_Handle hObj, unsigned DragLimit);
00146 unsigned         HEADER_SetFixed           (HEADER_Handle hObj, unsigned Fixed);
00147 void             HEADER_SetFont            (HEADER_Handle hObj, const GUI_FONT * pFont);
00148 void             HEADER_SetHeight          (HEADER_Handle hObj, int Height);
00149 void             HEADER_SetTextAlign       (HEADER_Handle hObj, unsigned Index, int Align);
00150 void             HEADER_SetItemText        (HEADER_Handle hObj, unsigned Index, const char * s);
00151 void             HEADER_SetItemWidth       (HEADER_Handle hObj, unsigned Index, int Width);
00152 void             HEADER_SetScrollPos       (HEADER_Handle hObj, int ScrollPos);
00153 void             HEADER_SetStreamedBitmap  (HEADER_Handle hObj, unsigned Index, const GUI_BITMAP_STREAM * pBitmap);
00154 void             HEADER_SetStreamedBitmapEx(HEADER_Handle hObj, unsigned Index, const GUI_BITMAP_STREAM * pBitmap, int x, int y);
00155 void             HEADER_SetTextColor       (HEADER_Handle hObj, GUI_COLOR Color);
00156 int              HEADER_SetUserData        (HEADER_Handle hObj, const void * pSrc, int NumBytes);
00157 
00158 /*********************************************************************
00159 *
00160 *       Member functions: Skinning
00161 *
00162 **********************************************************************
00163 */
00164 void HEADER_GetSkinFlexProps     (HEADER_SKINFLEX_PROPS * pProps, int Index);
00165 void HEADER_SetSkinClassic       (HEADER_Handle hObj);
00166 void HEADER_SetSkin              (HEADER_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
00167 int  HEADER_DrawSkinFlex         (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo);
00168 void HEADER_SetSkinFlexProps     (const HEADER_SKINFLEX_PROPS * pProps, int Index);
00169 void HEADER_SetDefaultSkinClassic(void);
00170 WIDGET_DRAW_ITEM_FUNC * HEADER_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
00171 
00172 #define HEADER_SKIN_FLEX          HEADER_DrawSkinFlex
00173 
00174 /*********************************************************************
00175 *
00176 *       Macros for compatibility with older versions
00177 *
00178 **********************************************************************
00179 */
00180 
00181 #ifdef HEADER_SPACING_H
00182   #define HEADER_BORDER_H_DEFAULT HEADER_SPACING_H
00183 #endif
00184 #ifdef HEADER_SPACING_V
00185   #define HEADER_BORDER_V_DEFAULT HEADER_SPACING_V
00186 #endif
00187 #define HEADER_SetDefaultSpacingH(Value) HEADER_SetDefaultBorderH(Value)
00188 #define HEADER_SetDefaultSpacingV(Value) HEADER_SetDefaultBorderV(Value)
00189 #define HEADER_GetDefaultSpacingH()      HEADER_GetDefaultBorderH()
00190 #define HEADER_GetDefaultSpacingV()      HEADER_GetDefaultBorderV()
00191 
00192 #if defined(__cplusplus)
00193   }
00194 #endif
00195 
00196 #endif  // GUI_WINSUPPORT
00197 #endif  // HEADER_H
00198 
00199 /*************************** End of file ****************************/