NuMaker emWin HMI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SWIPELIST_Private.h Source File

SWIPELIST_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        : SWIPELIST.h
00040 Purpose     : SWIPELIST include
00041 --------------------END-OF-HEADER-------------------------------------
00042 */
00043 
00044 #ifndef SWIPELIST_PRIVATE_H
00045 #define SWIPELIST_PRIVATE_H
00046 
00047 #include "SWIPELIST.h"
00048 #include "GUI_Private.h"
00049 #include "GUI_ARRAY.h"
00050 
00051 #if GUI_WINSUPPORT
00052 
00053 /*********************************************************************
00054 *
00055 *       Object definition
00056 *
00057 **********************************************************************
00058 */
00059 typedef struct {
00060   WM_HWIN hWin;
00061   int     xPos;
00062   int     yPos;
00063 } SWIPELIST_WIN;
00064 
00065 typedef struct {
00066   GUI_ARRAY      WinArray;
00067   GUI_ARRAY      TextArray;
00068   int            TextSize;
00069   WM_HMEM        hDrawObj;
00070   GUI_COLOR      SepColor;
00071   int            SepSize;
00072   int            Pos;
00073   int            Size;
00074   int            BitmapAlign;
00075   int            TextAlign;
00076   U8             Flags;
00077   U32            UserData;
00078 } SWIPELIST_ITEM;
00079 
00080 typedef struct {
00081   const GUI_FONT * pSepFont;
00082   const GUI_FONT * pHeaderFont;
00083   const GUI_FONT * pTextFont;
00084   GUI_COLOR        aTextColor[5];
00085   GUI_COLOR        aBkColor[3];
00086   int              BitmapSpace;
00087   int              aBorderSize[4];
00088   U8               Flags;
00089   int              Threshold;
00090 } SWIPELIST_PROPS;
00091 
00092 typedef struct {
00093   WIDGET                  Widget;
00094   SWIPELIST_PROPS         Props;
00095   WIDGET_DRAW_ITEM_FUNC * pfDrawItem;
00096   GUI_ARRAY               ItemArray;
00097   int                     Pos;
00098   int                     Size;
00099   int                     FirstVisible;
00100   int                     LastVisible;
00101   int                     Sel;
00102   int                     ReleasedItem;
00103 } SWIPELIST_OBJ;
00104 
00105 /*********************************************************************
00106 *
00107 *       Macros for internal use
00108 *
00109 **********************************************************************
00110 */
00111 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00112   #define SWIPELIST_INIT_ID(p) p->Widget.DebugId = SWIPELIST_ID
00113 #else
00114   #define SWIPELIST_INIT_ID(p)
00115 #endif
00116 
00117 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00118   SWIPELIST_OBJ * SWIPELIST_LockH(SWIPELIST_Handle h);
00119   #define SWIPELIST_LOCK_H(h)   SWIPELIST_LockH(h)
00120 #else
00121   #define SWIPELIST_LOCK_H(h)   (SWIPELIST_OBJ *)GUI_LOCK_H(h)
00122 #endif
00123 
00124 /*********************************************************************
00125 *
00126 *       Module internal data
00127 *
00128 **********************************************************************
00129 */
00130 extern SWIPELIST_PROPS SWIPELIST__DefaultProps;
00131 extern GUI_COLOR       SWIPELIST__DefaultSepColor;
00132 extern int             SWIPELIST__DefaultSepSize;
00133 extern int             SWIPELIST__DefaultTextAlign;
00134 
00135 /*********************************************************************
00136 *
00137 *       Private functions
00138 *
00139 **********************************************************************
00140 */
00141 void SWIPELIST__SetDrawObj   (SWIPELIST_Handle hObj, int Index, int Align, GUI_DRAW_HANDLE hDrawObj);
00142 void SWIPELIST__CalcItemPos  (GUI_ARRAY ItemArray, int StartIndex, int EndIndex, int AddSize);
00143 int  SWIPELIST__CalcItemSize (SWIPELIST_Handle hObj, int ItemIndex);
00144 
00145 #endif   /* if GUI_WINSUPPORT */
00146 #endif   /* SWIPELIST_PRIVATE_H */