Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
emWin/Include/ICONVIEW.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 : ICONVIEW.h |
csyang2 |
1:c0f972361605 | 40 | Purpose : ICONVIEW include |
csyang2 |
1:c0f972361605 | 41 | --------------------END-OF-HEADER------------------------------------- |
csyang2 |
1:c0f972361605 | 42 | */ |
csyang2 |
1:c0f972361605 | 43 | |
csyang2 |
1:c0f972361605 | 44 | #ifndef ICONVIEW_H |
csyang2 |
1:c0f972361605 | 45 | #define ICONVIEW_H |
csyang2 |
1:c0f972361605 | 46 | |
csyang2 |
1:c0f972361605 | 47 | #include "WM.h" |
csyang2 |
1:c0f972361605 | 48 | #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */ |
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 | // |
csyang2 |
1:c0f972361605 | 64 | // Status- and create flags |
csyang2 |
1:c0f972361605 | 65 | // |
csyang2 |
1:c0f972361605 | 66 | #define ICONVIEW_CF_AUTOSCROLLBAR_V (1 << 1) |
csyang2 |
1:c0f972361605 | 67 | #define ICONVIEW_SF_AUTOSCROLLBAR_V ICONVIEW_CF_AUTOSCROLLBAR_V |
csyang2 |
1:c0f972361605 | 68 | |
csyang2 |
1:c0f972361605 | 69 | // |
csyang2 |
1:c0f972361605 | 70 | // Color indices |
csyang2 |
1:c0f972361605 | 71 | // |
csyang2 |
1:c0f972361605 | 72 | #define ICONVIEW_CI_BK 0 |
csyang2 |
1:c0f972361605 | 73 | #define ICONVIEW_CI_UNSEL 0 |
csyang2 |
1:c0f972361605 | 74 | #define ICONVIEW_CI_SEL 1 |
csyang2 |
1:c0f972361605 | 75 | #define ICONVIEW_CI_DISABLED 2 |
csyang2 |
1:c0f972361605 | 76 | |
csyang2 |
1:c0f972361605 | 77 | // |
csyang2 |
1:c0f972361605 | 78 | // Icon alignment flags, horizontal |
csyang2 |
1:c0f972361605 | 79 | // |
csyang2 |
1:c0f972361605 | 80 | #define ICONVIEW_IA_HCENTER (0 << 0) |
csyang2 |
1:c0f972361605 | 81 | #define ICONVIEW_IA_LEFT (1 << 0) |
csyang2 |
1:c0f972361605 | 82 | #define ICONVIEW_IA_RIGHT (2 << 0) |
csyang2 |
1:c0f972361605 | 83 | |
csyang2 |
1:c0f972361605 | 84 | // |
csyang2 |
1:c0f972361605 | 85 | // Icon alignment flags, vertical |
csyang2 |
1:c0f972361605 | 86 | // |
csyang2 |
1:c0f972361605 | 87 | #define ICONVIEW_IA_VCENTER (0 << 2) |
csyang2 |
1:c0f972361605 | 88 | #define ICONVIEW_IA_BOTTOM (1 << 2) |
csyang2 |
1:c0f972361605 | 89 | #define ICONVIEW_IA_TOP (2 << 2) |
csyang2 |
1:c0f972361605 | 90 | |
csyang2 |
1:c0f972361605 | 91 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 92 | * |
csyang2 |
1:c0f972361605 | 93 | * Types |
csyang2 |
1:c0f972361605 | 94 | * |
csyang2 |
1:c0f972361605 | 95 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 96 | */ |
csyang2 |
1:c0f972361605 | 97 | typedef WM_HMEM ICONVIEW_Handle; |
csyang2 |
1:c0f972361605 | 98 | |
csyang2 |
1:c0f972361605 | 99 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 100 | * |
csyang2 |
1:c0f972361605 | 101 | * Public functions |
csyang2 |
1:c0f972361605 | 102 | * |
csyang2 |
1:c0f972361605 | 103 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 104 | */ |
csyang2 |
1:c0f972361605 | 105 | ICONVIEW_Handle ICONVIEW_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int xSizeItems, int ySizeItems); |
csyang2 |
1:c0f972361605 | 106 | ICONVIEW_Handle ICONVIEW_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int xSizeItems, int ySizeItems, int NumExtraBytes); |
csyang2 |
1:c0f972361605 | 107 | ICONVIEW_Handle ICONVIEW_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb); |
csyang2 |
1:c0f972361605 | 108 | |
csyang2 |
1:c0f972361605 | 109 | int ICONVIEW_AddBitmapItem (ICONVIEW_Handle hObj, const GUI_BITMAP * pBitmap, const char * pText); |
csyang2 |
1:c0f972361605 | 110 | int ICONVIEW_AddBMPItem (ICONVIEW_Handle hObj, const U8 * pBMP, const char * pText); |
csyang2 |
1:c0f972361605 | 111 | int ICONVIEW_AddBMPItemEx (ICONVIEW_Handle hObj, const void * pBMP, GUI_GET_DATA_FUNC * pfGetData, const char * pText); |
csyang2 |
1:c0f972361605 | 112 | int ICONVIEW_AddStreamedBitmapItem (ICONVIEW_Handle hObj, const void * pStreamedBitmap, const char * pText); |
csyang2 |
1:c0f972361605 | 113 | void ICONVIEW_DeleteItem (ICONVIEW_Handle hObj, unsigned Index); |
csyang2 |
1:c0f972361605 | 114 | //void ICONVIEW_EnableStreamAuto (void); |
csyang2 |
1:c0f972361605 | 115 | GUI_COLOR ICONVIEW_GetBkColor (ICONVIEW_Handle hObj, int Index); |
csyang2 |
1:c0f972361605 | 116 | const GUI_FONT * ICONVIEW_GetFont (ICONVIEW_Handle hObj); |
csyang2 |
1:c0f972361605 | 117 | U32 ICONVIEW_GetItemUserData (ICONVIEW_Handle hObj, int Index); |
csyang2 |
1:c0f972361605 | 118 | int ICONVIEW_GetNumItems (ICONVIEW_Handle hObj); |
csyang2 |
1:c0f972361605 | 119 | int ICONVIEW_GetItemText (ICONVIEW_Handle hObj, int Index, char * pBuffer, int MaxSize); |
csyang2 |
1:c0f972361605 | 120 | int ICONVIEW_GetSel (ICONVIEW_Handle hObj); |
csyang2 |
1:c0f972361605 | 121 | GUI_COLOR ICONVIEW_GetTextColor (ICONVIEW_Handle hObj, int Index); |
csyang2 |
1:c0f972361605 | 122 | int ICONVIEW_GetUserData (ICONVIEW_Handle hObj, void * pDest, int NumBytes); |
csyang2 |
1:c0f972361605 | 123 | GUI_BITMAP * ICONVIEW_GetItemBitmap (ICONVIEW_Handle hObj, int ItemIndex); |
csyang2 |
1:c0f972361605 | 124 | int ICONVIEW_GetReleasedItem (ICONVIEW_Handle hObj); |
csyang2 |
1:c0f972361605 | 125 | int ICONVIEW_InsertBitmapItem (ICONVIEW_Handle hObj, const GUI_BITMAP * pBitmap, const char * pText, int Index); |
csyang2 |
1:c0f972361605 | 126 | int ICONVIEW_InsertBMPItem (ICONVIEW_Handle hObj, const U8 * pBMP, const char * pText, int Index); |
csyang2 |
1:c0f972361605 | 127 | int ICONVIEW_InsertBMPItemEx (ICONVIEW_Handle hObj, const void * pBMP, GUI_GET_DATA_FUNC * pfGetData, const char * pText, int Index); |
csyang2 |
1:c0f972361605 | 128 | int ICONVIEW_InsertStreamedBitmapItem(ICONVIEW_Handle hObj, const void * pStreamedBitmap, const char * pText, int Index); |
csyang2 |
1:c0f972361605 | 129 | int ICONVIEW_OwnerDraw (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo); |
csyang2 |
1:c0f972361605 | 130 | int ICONVIEW_SetBitmapItem (ICONVIEW_Handle hObj, int Index, const GUI_BITMAP * pBitmap); |
csyang2 |
1:c0f972361605 | 131 | void ICONVIEW_SetBkColor (ICONVIEW_Handle hObj, int Index, GUI_COLOR Color); |
csyang2 |
1:c0f972361605 | 132 | int ICONVIEW_SetBMPItem (ICONVIEW_Handle hObj, const U8 * pBMP, int Index); |
csyang2 |
1:c0f972361605 | 133 | int ICONVIEW_SetBMPItemEx (ICONVIEW_Handle hObj, const void * pBMP, GUI_GET_DATA_FUNC * pfGetData, int Index); |
csyang2 |
1:c0f972361605 | 134 | void ICONVIEW_SetFont (ICONVIEW_Handle hObj, const GUI_FONT * pFont); |
csyang2 |
1:c0f972361605 | 135 | void ICONVIEW_SetFrame (ICONVIEW_Handle hObj, int Coord, int Value); |
csyang2 |
1:c0f972361605 | 136 | void ICONVIEW_SetItemText (ICONVIEW_Handle hObj, int Index, const char * pText); |
csyang2 |
1:c0f972361605 | 137 | void ICONVIEW_SetItemUserData (ICONVIEW_Handle hObj, int Index, U32 UserData); |
csyang2 |
1:c0f972361605 | 138 | void ICONVIEW_SetOwnerDraw (ICONVIEW_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawItem); |
csyang2 |
1:c0f972361605 | 139 | void ICONVIEW_SetSel (ICONVIEW_Handle hObj, int Sel); |
csyang2 |
1:c0f972361605 | 140 | void ICONVIEW_SetSpace (ICONVIEW_Handle hObj, int Coord, int Value); |
csyang2 |
1:c0f972361605 | 141 | int ICONVIEW_SetStreamedBitmapItem (ICONVIEW_Handle hObj, int Index, const void * pStreamedBitmap); |
csyang2 |
1:c0f972361605 | 142 | void ICONVIEW_SetIconAlign (ICONVIEW_Handle hObj, int IconAlign); |
csyang2 |
1:c0f972361605 | 143 | void ICONVIEW_SetTextAlign (ICONVIEW_Handle hObj, int TextAlign); |
csyang2 |
1:c0f972361605 | 144 | void ICONVIEW_SetTextColor (ICONVIEW_Handle hObj, int Index, GUI_COLOR Color); |
csyang2 |
1:c0f972361605 | 145 | int ICONVIEW_SetUserData (ICONVIEW_Handle hObj, const void * pSrc, int NumBytes); |
csyang2 |
1:c0f972361605 | 146 | void ICONVIEW_SetWrapMode (ICONVIEW_Handle hObj, GUI_WRAPMODE WrapMode); |
csyang2 |
1:c0f972361605 | 147 | |
csyang2 |
1:c0f972361605 | 148 | void ICONVIEW_Callback (WM_MESSAGE * pMsg); |
csyang2 |
1:c0f972361605 | 149 | |
csyang2 |
1:c0f972361605 | 150 | // |
csyang2 |
1:c0f972361605 | 151 | // Compatibility macro |
csyang2 |
1:c0f972361605 | 152 | // |
csyang2 |
1:c0f972361605 | 153 | #define ICONVIEW_EnableStreamAuto() GUI_DrawStreamedEnableAuto() |
csyang2 |
1:c0f972361605 | 154 | |
csyang2 |
1:c0f972361605 | 155 | #if defined(__cplusplus) |
csyang2 |
1:c0f972361605 | 156 | } |
csyang2 |
1:c0f972361605 | 157 | #endif |
csyang2 |
1:c0f972361605 | 158 | |
csyang2 |
1:c0f972361605 | 159 | #endif // GUI_WINSUPPORT |
csyang2 |
1:c0f972361605 | 160 | #endif // ICONVIEW_H |
csyang2 |
1:c0f972361605 | 161 | |
csyang2 |
1:c0f972361605 | 162 | /*************************** End of file ****************************/ |