Nuvoton / Mbed OS NuMaker-mbed-emWin-example
Committer:
SHLIU1@OANBE02333.nuvoton.com
Date:
Thu Feb 25 15:40:31 2021 +0800
Revision:
4:3d28c66231b0
Parent:
1:c0f972361605
Support the both V5.X and V6.X for mbed-os

Who changed what in which revision?

UserRevisionLine numberNew contents of line
csyang2 1:c0f972361605 1 /*********************************************************************
csyang2 1:c0f972361605 2 * SEGGER Software GmbH *
csyang2 1:c0f972361605 3 * Solutions for real time microcontroller applications *
csyang2 1:c0f972361605 4 **********************************************************************
csyang2 1:c0f972361605 5 * *
csyang2 1:c0f972361605 6 * (c) 1996 - 2018 SEGGER Microcontroller GmbH *
csyang2 1:c0f972361605 7 * *
csyang2 1:c0f972361605 8 * Internet: www.segger.com Support: support@segger.com *
csyang2 1:c0f972361605 9 * *
csyang2 1:c0f972361605 10 **********************************************************************
csyang2 1:c0f972361605 11
csyang2 1:c0f972361605 12 ** emWin V5.48 - Graphical user interface for embedded applications **
csyang2 1:c0f972361605 13 All Intellectual Property rights in the Software belongs to SEGGER.
csyang2 1:c0f972361605 14 emWin is protected by international copyright laws. Knowledge of the
csyang2 1:c0f972361605 15 source code may not be used to write a similar product. This file may
csyang2 1:c0f972361605 16 only be used in accordance with the following terms:
csyang2 1:c0f972361605 17
csyang2 1:c0f972361605 18 The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
csyang2 1:c0f972361605 19 for the purposes of creating libraries for its
csyang2 1:c0f972361605 20 Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
csyang2 1:c0f972361605 21 under the terms and conditions of an End User
csyang2 1:c0f972361605 22 License Agreement supplied with the libraries.
csyang2 1:c0f972361605 23 Full source code is available at: www.segger.com
csyang2 1:c0f972361605 24
csyang2 1:c0f972361605 25 We appreciate your understanding and fairness.
csyang2 1:c0f972361605 26 ----------------------------------------------------------------------
csyang2 1:c0f972361605 27 Licensing information
csyang2 1:c0f972361605 28 Licensor: SEGGER Software GmbH
csyang2 1:c0f972361605 29 Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
csyang2 1:c0f972361605 30 Licensed SEGGER software: emWin
csyang2 1:c0f972361605 31 License number: GUI-00735
csyang2 1:c0f972361605 32 License model: emWin License Agreement, signed February 27, 2018
csyang2 1:c0f972361605 33 Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
csyang2 1:c0f972361605 34 ----------------------------------------------------------------------
csyang2 1:c0f972361605 35 Support and Update Agreement (SUA)
csyang2 1:c0f972361605 36 SUA period: 2018-03-26 - 2019-03-27
csyang2 1:c0f972361605 37 Contact to extend SUA: sales@segger.com
csyang2 1:c0f972361605 38 ----------------------------------------------------------------------
csyang2 1:c0f972361605 39 File : LISTWHEEL_Private.h
csyang2 1:c0f972361605 40 Purpose : Private LISTWHEEL include
csyang2 1:c0f972361605 41 --------------------END-OF-HEADER-------------------------------------
csyang2 1:c0f972361605 42 */
csyang2 1:c0f972361605 43
csyang2 1:c0f972361605 44 #ifndef LISTWHEEL_PRIVATE_H
csyang2 1:c0f972361605 45 #define LISTWHEEL_PRIVATE_H
csyang2 1:c0f972361605 46
csyang2 1:c0f972361605 47 #include "LISTWHEEL.h"
csyang2 1:c0f972361605 48 #include "WM.h"
csyang2 1:c0f972361605 49 #include "GUI_ARRAY.h"
csyang2 1:c0f972361605 50 #include "WIDGET.h"
csyang2 1:c0f972361605 51
csyang2 1:c0f972361605 52 #if GUI_WINSUPPORT
csyang2 1:c0f972361605 53
csyang2 1:c0f972361605 54 /*********************************************************************
csyang2 1:c0f972361605 55 *
csyang2 1:c0f972361605 56 * Defines
csyang2 1:c0f972361605 57 *
csyang2 1:c0f972361605 58 **********************************************************************
csyang2 1:c0f972361605 59 */
csyang2 1:c0f972361605 60 #define LISTWHEEL_STATE_PRESSED WIDGET_STATE_USER0
csyang2 1:c0f972361605 61
csyang2 1:c0f972361605 62 /*********************************************************************
csyang2 1:c0f972361605 63 *
csyang2 1:c0f972361605 64 * Object definition
csyang2 1:c0f972361605 65 *
csyang2 1:c0f972361605 66 **********************************************************************
csyang2 1:c0f972361605 67 */
csyang2 1:c0f972361605 68
csyang2 1:c0f972361605 69 typedef struct {
csyang2 1:c0f972361605 70 void * pData;
csyang2 1:c0f972361605 71 char acText[1];
csyang2 1:c0f972361605 72 } LISTWHEEL_ITEM;
csyang2 1:c0f972361605 73
csyang2 1:c0f972361605 74 typedef struct {
csyang2 1:c0f972361605 75 const GUI_FONT * pFont;
csyang2 1:c0f972361605 76 GUI_COLOR aBackColor[2];
csyang2 1:c0f972361605 77 GUI_COLOR aTextColor[2];
csyang2 1:c0f972361605 78 I16 Align;
csyang2 1:c0f972361605 79 unsigned Deceleration;
csyang2 1:c0f972361605 80 } LISTWHEEL_PROPS;
csyang2 1:c0f972361605 81
csyang2 1:c0f972361605 82 typedef struct {
csyang2 1:c0f972361605 83 WIDGET Widget;
csyang2 1:c0f972361605 84 GUI_ARRAY ItemArray;
csyang2 1:c0f972361605 85 WIDGET_DRAW_ITEM_FUNC * pfOwnerDraw;
csyang2 1:c0f972361605 86 LISTWHEEL_PROPS Props;
csyang2 1:c0f972361605 87 WM_HMEM hTimer;
csyang2 1:c0f972361605 88 unsigned LBorder;
csyang2 1:c0f972361605 89 unsigned RBorder;
csyang2 1:c0f972361605 90 unsigned LineHeight;
csyang2 1:c0f972361605 91 int Sel;
csyang2 1:c0f972361605 92 GUI_TIMER_TIME TimeTouched; // Time stamp of last touch event
csyang2 1:c0f972361605 93 GUI_TIMER_TIME TimeTouchedLast; // Time of the last touch
csyang2 1:c0f972361605 94 int PosTouchedLast; // Last touched position in pixels
csyang2 1:c0f972361605 95 int Pos; // Current position in pixels
csyang2 1:c0f972361605 96 int Velocity; // Motion in pixels
csyang2 1:c0f972361605 97 int SnapPosition; // Snap position in pixels
csyang2 1:c0f972361605 98 int TouchPos; // Y-position of last touch event
csyang2 1:c0f972361605 99 int ySizeData; // Data size in pixels
csyang2 1:c0f972361605 100 int Destination; // Destination position in pixels
csyang2 1:c0f972361605 101 GUI_TIMER_TIME TimerPeriod; // Period of timer events
csyang2 1:c0f972361605 102 } LISTWHEEL_OBJ;
csyang2 1:c0f972361605 103
csyang2 1:c0f972361605 104 /*********************************************************************
csyang2 1:c0f972361605 105 *
csyang2 1:c0f972361605 106 * Macros for internal use
csyang2 1:c0f972361605 107 *
csyang2 1:c0f972361605 108 **********************************************************************
csyang2 1:c0f972361605 109 */
csyang2 1:c0f972361605 110 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
csyang2 1:c0f972361605 111 #define LISTWHEEL_INIT_ID(p) (p->Widget.DebugId = LISTWHEEL_ID)
csyang2 1:c0f972361605 112 #else
csyang2 1:c0f972361605 113 #define LISTWHEEL_INIT_ID(p)
csyang2 1:c0f972361605 114 #endif
csyang2 1:c0f972361605 115
csyang2 1:c0f972361605 116 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
csyang2 1:c0f972361605 117 LISTWHEEL_OBJ * LISTWHEEL_LockH(LISTWHEEL_Handle h);
csyang2 1:c0f972361605 118 #define LISTWHEEL_LOCK_H(h) LISTWHEEL_LockH(h)
csyang2 1:c0f972361605 119 #else
csyang2 1:c0f972361605 120 #define LISTWHEEL_LOCK_H(h) (LISTWHEEL_OBJ *)GUI_LOCK_H(h)
csyang2 1:c0f972361605 121 #endif
csyang2 1:c0f972361605 122
csyang2 1:c0f972361605 123 /*********************************************************************
csyang2 1:c0f972361605 124 *
csyang2 1:c0f972361605 125 * Private (module internal) data
csyang2 1:c0f972361605 126 *
csyang2 1:c0f972361605 127 **********************************************************************
csyang2 1:c0f972361605 128 */
csyang2 1:c0f972361605 129 extern LISTWHEEL_PROPS LISTWHEEL_DefaultProps;
csyang2 1:c0f972361605 130
csyang2 1:c0f972361605 131 /*********************************************************************
csyang2 1:c0f972361605 132 *
csyang2 1:c0f972361605 133 * Private (module internal) functions
csyang2 1:c0f972361605 134 *
csyang2 1:c0f972361605 135 **********************************************************************
csyang2 1:c0f972361605 136 */
csyang2 1:c0f972361605 137 const char * LISTWHEEL__GetpStringLocked(LISTWHEEL_Handle hObj, int Index, LISTWHEEL_ITEM ** ppItem);
csyang2 1:c0f972361605 138
csyang2 1:c0f972361605 139 #endif // GUI_WINSUPPORT
csyang2 1:c0f972361605 140 #endif // LISTWHEEL_PRIVATE_H
csyang2 1:c0f972361605 141
csyang2 1:c0f972361605 142 /*************************** End of file ****************************/