Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
emWin/Include/LISTWHEEL.h@10:c8165817d92a, 7 months ago (annotated)
- Committer:
- csyang2
- Date:
- Mon Mar 04 15:47:41 2024 +0800
- Revision:
- 10:c8165817d92a
- Parent:
- 1:c0f972361605
Support NuMaker-IoT-M467
Who changed what in which revision?
User | Revision | Line number | New 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.h |
csyang2 |
1:c0f972361605 | 40 | Purpose : LISTWHEEL widget include |
csyang2 |
1:c0f972361605 | 41 | --------------------END-OF-HEADER------------------------------------- |
csyang2 |
1:c0f972361605 | 42 | */ |
csyang2 |
1:c0f972361605 | 43 | |
csyang2 |
1:c0f972361605 | 44 | #ifndef LISTWHEEL_H |
csyang2 |
1:c0f972361605 | 45 | #define LISTWHEEL_H |
csyang2 |
1:c0f972361605 | 46 | |
csyang2 |
1:c0f972361605 | 47 | #include "WM.h" |
csyang2 |
1:c0f972361605 | 48 | #include "DIALOG_Intern.h" |
csyang2 |
1:c0f972361605 | 49 | #include "WIDGET.h" |
csyang2 |
1:c0f972361605 | 50 | |
csyang2 |
1:c0f972361605 | 51 | #if GUI_WINSUPPORT |
csyang2 |
1:c0f972361605 | 52 | |
csyang2 |
1:c0f972361605 | 53 | #if defined(__cplusplus) |
csyang2 |
1:c0f972361605 | 54 | extern "C" { // Make sure we have C-declarations in C++ programs |
csyang2 |
1:c0f972361605 | 55 | #endif |
csyang2 |
1:c0f972361605 | 56 | |
csyang2 |
1:c0f972361605 | 57 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 58 | * |
csyang2 |
1:c0f972361605 | 59 | * Defines |
csyang2 |
1:c0f972361605 | 60 | * |
csyang2 |
1:c0f972361605 | 61 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 62 | */ |
csyang2 |
1:c0f972361605 | 63 | #define LISTWHEEL_CI_UNSEL 0 |
csyang2 |
1:c0f972361605 | 64 | #define LISTWHEEL_CI_SEL 1 |
csyang2 |
1:c0f972361605 | 65 | |
csyang2 |
1:c0f972361605 | 66 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 67 | * |
csyang2 |
1:c0f972361605 | 68 | * Types |
csyang2 |
1:c0f972361605 | 69 | * |
csyang2 |
1:c0f972361605 | 70 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 71 | */ |
csyang2 |
1:c0f972361605 | 72 | typedef WM_HMEM LISTWHEEL_Handle; |
csyang2 |
1:c0f972361605 | 73 | |
csyang2 |
1:c0f972361605 | 74 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 75 | * |
csyang2 |
1:c0f972361605 | 76 | * Standard member functions |
csyang2 |
1:c0f972361605 | 77 | * |
csyang2 |
1:c0f972361605 | 78 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 79 | */ |
csyang2 |
1:c0f972361605 | 80 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 81 | * |
csyang2 |
1:c0f972361605 | 82 | * Create functions |
csyang2 |
1:c0f972361605 | 83 | * |
csyang2 |
1:c0f972361605 | 84 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 85 | */ |
csyang2 |
1:c0f972361605 | 86 | LISTWHEEL_Handle LISTWHEEL_Create (const GUI_ConstString * ppText, int x0, int y0, int xSize, int ySize, int Flags); |
csyang2 |
1:c0f972361605 | 87 | LISTWHEEL_Handle LISTWHEEL_CreateAsChild (const GUI_ConstString * ppText, WM_HWIN hWinParent, int x0, int y0, int xSize, int ySize, int Flags); |
csyang2 |
1:c0f972361605 | 88 | LISTWHEEL_Handle LISTWHEEL_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); |
csyang2 |
1:c0f972361605 | 89 | LISTWHEEL_Handle LISTWHEEL_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, |
csyang2 |
1:c0f972361605 | 90 | int WinFlags, int ExFlags, int Id, const GUI_ConstString * ppText); |
csyang2 |
1:c0f972361605 | 91 | LISTWHEEL_Handle LISTWHEEL_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, |
csyang2 |
1:c0f972361605 | 92 | int WinFlags, int ExFlags, int Id, const GUI_ConstString * ppText, int NumExtraBytes); |
csyang2 |
1:c0f972361605 | 93 | |
csyang2 |
1:c0f972361605 | 94 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 95 | * |
csyang2 |
1:c0f972361605 | 96 | * The callback ... |
csyang2 |
1:c0f972361605 | 97 | * |
csyang2 |
1:c0f972361605 | 98 | * Do not call it directly ! It is only to be used from within an |
csyang2 |
1:c0f972361605 | 99 | * overwritten callback. |
csyang2 |
1:c0f972361605 | 100 | */ |
csyang2 |
1:c0f972361605 | 101 | void LISTWHEEL_Callback(WM_MESSAGE * pMsg); |
csyang2 |
1:c0f972361605 | 102 | |
csyang2 |
1:c0f972361605 | 103 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 104 | * |
csyang2 |
1:c0f972361605 | 105 | * Member functions |
csyang2 |
1:c0f972361605 | 106 | * |
csyang2 |
1:c0f972361605 | 107 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 108 | */ |
csyang2 |
1:c0f972361605 | 109 | void LISTWHEEL_AddString (LISTWHEEL_Handle hObj, const char * s); |
csyang2 |
1:c0f972361605 | 110 | GUI_COLOR LISTWHEEL_GetBkColor (LISTWHEEL_Handle hObj, unsigned int Index); |
csyang2 |
1:c0f972361605 | 111 | void * LISTWHEEL_GetItemData (LISTWHEEL_Handle hObj, unsigned Index); /* not to be documented */ |
csyang2 |
1:c0f972361605 | 112 | void LISTWHEEL_GetItemText (LISTWHEEL_Handle hObj, unsigned Index, char * pBuffer, int MaxSize); |
csyang2 |
1:c0f972361605 | 113 | int LISTWHEEL_GetItemFromPos (LISTWHEEL_Handle hObj, int yPos); |
csyang2 |
1:c0f972361605 | 114 | int LISTWHEEL_GetLBorder (LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 115 | unsigned LISTWHEEL_GetLineHeight (LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 116 | int LISTWHEEL_GetNumItems (LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 117 | int LISTWHEEL_GetPos (LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 118 | int LISTWHEEL_GetRBorder (LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 119 | int LISTWHEEL_GetSel (LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 120 | int LISTWHEEL_GetSnapPosition(LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 121 | int LISTWHEEL_GetTextAlign (LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 122 | GUI_COLOR LISTWHEEL_GetTextColor (LISTWHEEL_Handle hObj, unsigned int Index); |
csyang2 |
1:c0f972361605 | 123 | int LISTWHEEL_GetUserData (LISTWHEEL_Handle hObj, void * pDest, int NumBytes); |
csyang2 |
1:c0f972361605 | 124 | int LISTWHEEL_IsMoving (LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 125 | void LISTWHEEL_MoveToPos (LISTWHEEL_Handle hObj, unsigned int Index); |
csyang2 |
1:c0f972361605 | 126 | int LISTWHEEL_OwnerDraw (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); |
csyang2 |
1:c0f972361605 | 127 | void LISTWHEEL_SetBkColor (LISTWHEEL_Handle hObj, unsigned int Index, GUI_COLOR Color); |
csyang2 |
1:c0f972361605 | 128 | void LISTWHEEL_SetDeceleration(LISTWHEEL_Handle hObj, unsigned Deceleration); |
csyang2 |
1:c0f972361605 | 129 | void LISTWHEEL_SetFont (LISTWHEEL_Handle hObj, const GUI_FONT * pFont); |
csyang2 |
1:c0f972361605 | 130 | void LISTWHEEL_SetItemData (LISTWHEEL_Handle hObj, unsigned Index, void * pData); /* not to be documented */ |
csyang2 |
1:c0f972361605 | 131 | void LISTWHEEL_SetLBorder (LISTWHEEL_Handle hObj, unsigned BorderSize); |
csyang2 |
1:c0f972361605 | 132 | void LISTWHEEL_SetLineHeight (LISTWHEEL_Handle hObj, unsigned LineHeight); |
csyang2 |
1:c0f972361605 | 133 | void LISTWHEEL_SetOwnerDraw (LISTWHEEL_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfOwnerDraw); |
csyang2 |
1:c0f972361605 | 134 | void LISTWHEEL_SetPos (LISTWHEEL_Handle hObj, unsigned int Index); |
csyang2 |
1:c0f972361605 | 135 | void LISTWHEEL_SetRBorder (LISTWHEEL_Handle hObj, unsigned BorderSize); |
csyang2 |
1:c0f972361605 | 136 | void LISTWHEEL_SetSel (LISTWHEEL_Handle hObj, int Sel); |
csyang2 |
1:c0f972361605 | 137 | void LISTWHEEL_SetSnapPosition(LISTWHEEL_Handle hObj, int SnapPosition); |
csyang2 |
1:c0f972361605 | 138 | void LISTWHEEL_SetText (LISTWHEEL_Handle hObj, const GUI_ConstString * ppText); |
csyang2 |
1:c0f972361605 | 139 | void LISTWHEEL_SetTextAlign (LISTWHEEL_Handle hObj, int Align); |
csyang2 |
1:c0f972361605 | 140 | void LISTWHEEL_SetTextColor (LISTWHEEL_Handle hObj, unsigned int Index, GUI_COLOR Color); |
csyang2 |
1:c0f972361605 | 141 | void LISTWHEEL_SetTimerPeriod (LISTWHEEL_Handle hObj, GUI_TIMER_TIME TimerPeriod); |
csyang2 |
1:c0f972361605 | 142 | int LISTWHEEL_SetUserData (LISTWHEEL_Handle hObj, const void * pSrc, int NumBytes); |
csyang2 |
1:c0f972361605 | 143 | void LISTWHEEL_SetVelocity (LISTWHEEL_Handle hObj, int Velocity); |
csyang2 |
1:c0f972361605 | 144 | |
csyang2 |
1:c0f972361605 | 145 | const GUI_FONT * LISTWHEEL_GetFont(LISTWHEEL_Handle hObj); |
csyang2 |
1:c0f972361605 | 146 | |
csyang2 |
1:c0f972361605 | 147 | #if defined(__cplusplus) |
csyang2 |
1:c0f972361605 | 148 | } |
csyang2 |
1:c0f972361605 | 149 | #endif |
csyang2 |
1:c0f972361605 | 150 | |
csyang2 |
1:c0f972361605 | 151 | #endif // GUI_WINSUPPORT |
csyang2 |
1:c0f972361605 | 152 | #endif // LISTWHEEL_H |
csyang2 |
1:c0f972361605 | 153 | |
csyang2 |
1:c0f972361605 | 154 | /*************************** End of file ****************************/ |