NuMaker emWin HMI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LISTWHEEL_Private.h Source File

LISTWHEEL_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        : LISTWHEEL_Private.h
00040 Purpose     : Private LISTWHEEL include
00041 --------------------END-OF-HEADER-------------------------------------
00042 */
00043 
00044 #ifndef LISTWHEEL_PRIVATE_H
00045 #define LISTWHEEL_PRIVATE_H
00046 
00047 #include "LISTWHEEL.h"
00048 #include "WM.h"
00049 #include "GUI_ARRAY.h"
00050 #include "WIDGET.h"
00051 
00052 #if GUI_WINSUPPORT
00053 
00054 /*********************************************************************
00055 *
00056 *       Defines
00057 *
00058 **********************************************************************
00059 */
00060 #define LISTWHEEL_STATE_PRESSED WIDGET_STATE_USER0
00061 
00062 /*********************************************************************
00063 *
00064 *       Object definition
00065 *
00066 **********************************************************************
00067 */
00068 
00069 typedef struct {
00070   void * pData;
00071   char   acText[1];
00072 } LISTWHEEL_ITEM;
00073 
00074 typedef struct {
00075   const GUI_FONT * pFont;
00076   GUI_COLOR        aBackColor[2];
00077   GUI_COLOR        aTextColor[2];
00078   I16              Align;
00079   unsigned         Deceleration;
00080 } LISTWHEEL_PROPS;
00081 
00082 typedef struct {
00083   WIDGET                  Widget;
00084   GUI_ARRAY               ItemArray;
00085   WIDGET_DRAW_ITEM_FUNC * pfOwnerDraw;
00086   LISTWHEEL_PROPS         Props;
00087   WM_HMEM                 hTimer;
00088   unsigned                LBorder;
00089   unsigned                RBorder;
00090   unsigned                LineHeight;
00091   int                     Sel;
00092   GUI_TIMER_TIME          TimeTouched;      // Time stamp of last touch event
00093   GUI_TIMER_TIME          TimeTouchedLast;  // Time of the last touch
00094   int                     PosTouchedLast;   // Last touched position in pixels
00095   int                     Pos;              // Current position in pixels
00096   int                     Velocity;         // Motion in pixels
00097   int                     SnapPosition;     // Snap position in pixels
00098   int                     TouchPos;         // Y-position of last touch event
00099   int                     ySizeData;        // Data size in pixels
00100   int                     Destination;      // Destination position in pixels
00101   GUI_TIMER_TIME          TimerPeriod;      // Period of timer events
00102 } LISTWHEEL_OBJ;
00103 
00104 /*********************************************************************
00105 *
00106 *       Macros for internal use
00107 *
00108 **********************************************************************
00109 */
00110 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00111   #define LISTWHEEL_INIT_ID(p)  (p->Widget.DebugId = LISTWHEEL_ID)
00112 #else
00113   #define LISTWHEEL_INIT_ID(p)
00114 #endif
00115 
00116 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00117   LISTWHEEL_OBJ * LISTWHEEL_LockH(LISTWHEEL_Handle h);
00118   #define LISTWHEEL_LOCK_H(h)   LISTWHEEL_LockH(h)
00119 #else
00120   #define LISTWHEEL_LOCK_H(h)   (LISTWHEEL_OBJ *)GUI_LOCK_H(h)
00121 #endif
00122 
00123 /*********************************************************************
00124 *
00125 *       Private (module internal) data
00126 *
00127 **********************************************************************
00128 */
00129 extern LISTWHEEL_PROPS LISTWHEEL_DefaultProps;
00130 
00131 /*********************************************************************
00132 *
00133 *       Private (module internal) functions
00134 *
00135 **********************************************************************
00136 */
00137 const char * LISTWHEEL__GetpStringLocked(LISTWHEEL_Handle hObj, int Index, LISTWHEEL_ITEM ** ppItem);
00138 
00139 #endif // GUI_WINSUPPORT
00140 #endif // LISTWHEEL_PRIVATE_H
00141 
00142 /*************************** End of file ****************************/